Plain text is just characters: letters, digits, punctuation, spaces and line breaks. Rich text adds formatting on top: fonts, sizes, bold and italics, colors, headings, lists, tables, links and images.
How rich text is stored
Rich text always needs a way to mark up the formatting, and each format does it differently:
- HTML uses tags:
<strong>bold</strong>. - Markdown uses characters:
**bold**. - RTF uses control words:
{\b bold}. - Word documents use XML elements inside a ZIP package.
Plain text has no such layer, which is why a .txt file looks the same in every editor.
What happens when you copy and paste
When you copy from a web page or a document, the clipboard typically holds several versions at once: rich (usually HTML) and plain. The application you paste into chooses one. Rich pasting brings fonts, colors, links and sometimes hidden elements with it, which is why pasted text can look out of place.
To paste only the text, use Paste as plain text or Paste without formatting, usually Ctrl+Shift+V (on a Mac, often Cmd+Shift+Option+V). Pasting into a plain-text field, such as any tool on this site, drops formatting automatically.
Invisible leftovers
Even plain text copied from a rich source can carry invisible traces: non-breaking spaces, soft hyphens, zero-width characters, curly quotes and special dashes. They are legitimate characters, but they can break searches, comparisons and code. Remove Extra Spaces normalizes the space characters.
Converting between them
- Rich to plain: HTML to Text removes tags while keeping paragraphs and lists as line breaks.
- Plain to rich: Text to HTML wraps paragraphs and line breaks in HTML, and the Markdown Previewer turns Markdown into formatted HTML.
When to prefer plain text
Plain text is the better choice for notes you want to keep for decades, for anything that will be processed by software, for version control and for exchanging data. Rich text is better when presentation matters and the recipient uses compatible software. A common compromise is to write in a plain-text format with lightweight markup, such as Markdown, and convert to rich formats when needed.