Text to HTML Converter

Wrap plain text in paragraphs, lists and links so it can go straight into a page or an email.

Plain text
HTML
Runs locally in your browser

About the Text to HTML Converter

Pasting a plain text note into a CMS field usually produces one grey wall of words, because a browser ignores the newlines that gave the note its shape. This converter puts that shape back. In paragraph mode a blank line ends a paragraph and single newlines inside it become <br>, which is how nearly all written notes are structured. Line break mode maps every newline to a break with no paragraphs at all, useful for an address block or a short list of values. Preformatted mode wraps everything in <pre> so ASCII tables and log excerpts keep their column alignment.

List detection looks at a block where every line starts with a dash, an asterisk, a bullet character or a number followed by a dot or a bracket. Such a block becomes a <ul> or an <ol> with the marker stripped from each item. Autolinking finds bare web addresses, including ones that begin with www, and email addresses, turning the latter into mailto: links. Trailing punctuation is left outside the link so a sentence ending in a URL still reads properly.

Escaping is on by default, so an ampersand becomes &amp; and an angle bracket cannot open a tag by accident. Turn it off only when the text already contains markup you want to keep live. The full page option adds a doctype, a charset and a title around the result. If your text is really Markdown, Markdown to HTML will understand its headings and emphasis as well.

How to use

  1. Paste your text, or drop a .txt file onto the left pane.
  2. Choose a Layout. Paragraphs suits prose, preformatted suits logs and tables.
  3. Copy the HTML, or tick the full page option first and download a ready to open file.

Common questions

When should I turn escaping off?
Only when the input already contains HTML you want to survive. With escaping off, a stray angle bracket in the text can break the surrounding markup.
Why did my numbered list not become an ol?
Every line in the block must start with a number followed by a dot or a bracket. A single unnumbered line in the middle makes the block a paragraph instead.
Are line breaks inside a paragraph preserved?
Yes. In paragraph mode a single newline becomes a br element and a blank line starts a new paragraph.
Does it link a URL that has no https prefix?
Addresses beginning with www are linked and given an https prefix in the href. Bare domains without a scheme or a www prefix are left as text.