Notepad++ 本身在磁碟上儲存的是純文字,但讓寫作者感到困擾的樣式,幾乎總是在內容進入編輯器之前就先抵達剪貼簿:粗體片段、彩色字型、標題層級、項目符號、清單項目符號、超連結、嵌入的表格,以及從文書處理器、CMS 或網頁送出的行內樣式。所謂「去除樣式」,就是把富文本酬載轉成普通字元,同時保留來源應用程式實際送出的文字、標點、變音符號、表情符號和換行符號。Notepad++ 可以透過「Paste Special → Plain Text(選擇性貼上 → 純文字)」以及它的「Language(語言)」選單完成部分工作,而像 Remove Text Formatting 這樣的瀏覽器工具,則能在任何裝置上完成剩下的步驟,而且完全不需要開啟編輯器。兩者之間的選擇,取決於樣式究竟已經位於一個開啟的檔案中、附加在剪貼簿上,還是藏在一段您希望逐字檢查、之後再貼回 Notepad++ 的帶樣式片段中。

What Counts as Text Formatting in a Clipboard Paste
When a word processor such as Microsoft Word, Google Docs, or a rich-text CMS puts content on the clipboard, it usually offers several representations at once: a text/plain version, a text/html version, an image fallback, and often an application-specific blob. The text/html layer carries the inline styling, the heading levels, the table cells, the link targets, and the list markers. The text/plain layer carries the words with whatever the source application decided to use for a line break, a tab, or a list bullet.
Notepad++ has no rich-text rendering of its own, so any styling you see after pasting came from one of two places: either the editor interpreted the text/html layer through its HTML viewer, or the styling was already baked into the document file you opened. In both cases the goal is the same: end up with a buffer that contains only the characters you intend to keep, in the order you intend to keep them, separated by the line breaks you intend to keep.
Three properties distinguish a clean plain-text result from a dirty one. First, every HTML tag, style attribute, and span wrapper has been removed or rendered as literal characters. Second, the line endings are consistent, because CRLF, CR, and LF sources all flow through the same buffer. Third, the words, punctuation, spaces, tabs, and accents are byte-for-byte identical to what the source supplied in its text/plain representation. Any tool that does not preserve the third property is changing more than the formatting.
Inside Notepad++: Built-In Ways to Strip Styling
Notepad++ has two reliable built-in paths for stripping formatting from a paste, and one path for cleaning a file that is already open.
- Open Notepad++ and put your cursor in the destination tab. Do not use the standard Ctrl+V shortcut, because that path can pick up the rich-text layer in some clipboard modes.
- Open the Edit menu and choose Paste Special → Plain Text (or click the Paste as Plain Text button on the toolbar if you have it visible). The paste will land in the buffer as ordinary text, without fonts, colors, or styles.
- If the file is already open and you want to clear highlighting or language-specific coloring, choose Language → N → Normal Text. This stops Notepad++ from painting syntax colors on the buffer; it does not change the characters themselves.
- To remove leftover color marks from past searches, use Search → Clear All Highlights, or Clear All Color Marks in older builds. These commands erase the visual markers but never delete characters from the buffer.
- Save the cleaned buffer as plain text using File → Save As and pick the .txt extension or the UTF-8 (without BOM) encoding so the saved file matches the on-screen characters.
These steps cover every common Notepad++ scenario: a styled clipboard paste, an open file with syntax coloring you no longer want, or a document that was opened in the wrong language mode. They do not, however, let you inspect every character before committing, and they do not normalize mixed line endings across CRLF, CR, and LF sources.
Notepad++ vs. a Browser Plain-Text Field
Each approach has clear strengths, and the right one depends on where the styled content currently lives and how much verification you want to do before pasting back.
| Scenario | Notepad++ Built-In Path | Remove Text Formatting Browser Tool |
|---|---|---|
| Styled clipboard from Word, web page, or CMS | Paste Special → Plain Text, then save as UTF-8 TXT | Paste into the native textarea, click Create plain text, then copy or download |
| Already open styled file in Notepad++ | Language → Normal Text, Clear All Highlights, Save As .txt | Open the file in a viewer, copy the visible text, paste into the tool |
| Need character-level inspection before commit | Limited; relies on what the buffer displays | Preview pane shows the exact normalized string before you copy |
| Source uses mixed CRLF / CR / LF endings | Notepad++ preserves whatever was pasted | Tool normalizes CRLF and standalone CR to LF for consistency |
| Working on a phone, tablet, or borrowed machine | Requires Notepad++ to be installed | Works in any modern browser, no install |
| Need a downloadable UTF-8 TXT file | Manual Save As with UTF-8 chosen | One-click download named plain-text.txt |
For a quick in-editor cleanup of an open file, Notepad++ alone is enough. For anything coming off the clipboard, especially from a word processor or a web page, a browser plain-text field gives you a chance to verify the result before it lands in your destination tab.
How to Strip Formatting with the Remove Text Formatting Tool
The tool follows a deliberately small five-step path. Each stage is explicit, so the result you see in the preview is the result you copy or download.
- Open Remove Text Formatting in any modern browser. The page has one native plain-text textarea, a Create plain text button, a Copy plain text button, and a Download TXT button. There is no upload field, no file picker, and no remote endpoint.
- Copy the styled content from your source application the way you normally would (Ctrl+C in Word, Cmd+C on a Mac, the Copy action on a phone). Switch to the tool and paste with Ctrl+V, Cmd+V, or your browser's paste gesture into the textarea. Because the field is a native HTML textarea, the browser supplies the text/plain clipboard representation directly; rich HTML, scripts, and embedded layout nodes are not retained.
- Click Create plain text. The tool validates the current value, rejects empty or malformed input, and normalizes any CRLF or standalone CR line endings to LF. Tabs, ordinary spaces, repeated spaces, blank lines, punctuation, emoji, accented letters, and other scripts are preserved exactly. Literal HTML source such as the 14 characters <b>literal</b> stays literal; the tool does not interpret or strip it.
- Inspect the preview pane. This is the exact string that will be copied or downloaded, so confirm that line breaks, tabs, list markers, and any literal tag characters look the way you expect for the source application you pasted from.
- Click Copy plain text. The browser's Clipboard API writes the preview string without an extra newline or invisible prefix. A success message appears only after the write resolves; on permission failure you get an honest manual-copy instruction rather than a silent fail. If you want a file instead, click Download TXT and the browser saves plain-text.txt with the text/plain;charset=utf-8 media type from a short-lived Blob URL that is revoked as soon as the download starts.
Once the cleaned text is on your clipboard, return to Notepad++ and use Paste Special → Plain Text to drop it into the open tab. The two paths together give you a clean in-editor result plus a verifiable, deterministic plain-text artifact you can keep.
What the Tool Preserves and What It Changes
Understanding the exact transformation matters when the result has to round-trip into Notepad++ without surprises. The only change is line-ending normalization; every other accepted code point is preserved.
| Input Property | Tool Behavior | Notes |
|---|---|---|
| CRLF line endings (\r\n) | Replaced with LF (\n) | Mixed CRLF/LF sources become consistent |
| Standalone CR (\r) | Replaced with LF (\n) | Classic Mac line endings join CRLF normalization |
| LF line endings (\n) | Preserved as LF | No change needed |
| Tabs, ordinary spaces, repeated spaces | Preserved exactly | Tool does not collapse or reflow |
| Blank lines | Preserved exactly | Not removed or trimmed |
| Literal HTML such as <b>literal</b> | Preserved as literal characters | Not parsed, not stripped, not interpreted |
| Emoji, accents, scripts (Cyrillic, Greek, CJK) | Preserved exactly | Subject to one-million-code-point limit |
| Leading and trailing whitespace | Preserved exactly | Tool does not trim |
| Empty input | Rejected before output | No partial result is returned |
| Malformed isolated surrogates | Rejected before output | Keeps UTF-8 Blob and clipboard contract consistent |
| Input over 1,000,000 code points | Rejected before output | Bounded for memory and validation |
The clipboard write uses the standard Clipboard.writeText method described in the MDN Clipboard API, so the exact preview string is what reaches the destination application. The TXT download wraps the same string in a Blob with the text/plain;charset=utf-8 media type, so the saved bytes match the on-screen result on every platform.
何時該改用其他清理工具
移除文字格式是一個刻意設計得功能很單純的工具。它不是空白字元移除器、HTML 轉純文字解析器、OCR 服務、表情符號清理器,也不是 Markdown 轉換器,在不適合的場景中使用它,只會得到錯誤的結果。如果樣式已經在緩衝區中,而且你想維持在 Notepad++ 的工作流程,那麼在編輯器中使用「貼上特殊 → 純文字」會是更快的做法。如果樣式在剪貼簿上,而且你想要逐字元驗證並下載一個 UTF-8 成品,那麼瀏覽器工具會是更安全的選擇。對於更廣泛的清理工作,例如刪除重複的詞彙、移除空行,或將引號類智慧標點統一標準化,針對該特定任務打造的專用工具,會比通用的純文字貼上產生更可預期的結果。
對大多數 Notepad++ 使用者來說,最乾淨的工作流程是兩步驟的固定程序。第一步:將帶有樣式的剪貼簿內容貼到瀏覽器工具中,產生純文字,然後複製或下載結果。第二步:回到 Notepad++,在目標分頁中使用「貼上特殊 → 純文字」,並將檔案儲存為 UTF-8 純文字。這個工具能給你一個可驗證、具確定性的成品,而 Notepad++ 則提供你一個熟悉的編輯器,讓你繼續工作。
如需更深入的瞭解,請參閱如何在 Google Sheets 中移除文字變音符號。
如需更深入的瞭解,請參閱如何在 Illustrator 中移除重複的行。