Convert Plain Text to HTML

Wrap paragraphs in <p> tags and line breaks in <br>, escaping special characters.

Input

Output

Words 28Characters 193Without spaces 161Sentences 4Lines 9Paragraphs 2Reading time < 1 min

About Text to HTML

Paste text from an email, a document or a note and get HTML you can drop into a web page or CMS. Blank lines start a new paragraph wrapped in <p>, single line breaks become <br>, and special characters such as <, >, & and quotes are turned into entities.

You can switch the paragraph and line-break handling on or off independently. The conversion runs in your browser, so the text stays private.

How to use it

  1. Paste your plain text, leaving a blank line between paragraphs.
  2. Choose whether paragraphs become <p> tags and line breaks become <br>.
  3. Copy the HTML from the right, or download it as a .txt file.

Frequently asked questions

Are special characters escaped?

Yes. <, >, &, double quotes and apostrophes are encoded as HTML entities, so text like “a < b” displays correctly instead of breaking the page.

How are paragraphs detected?

Any blank line (or a line with only spaces) separates one paragraph from the next.

Can I turn Markdown into HTML instead?

Yes. Use the Markdown to HTML converter, which also handles headings, lists, links and tables.

Related tools