Skip to main content
Premier SEO Services

Developer tools

Text to HTML Converter

Convert plain text into HTML: blank lines become paragraphs, single line breaks become <br>, special characters are escaped, and web and email addresses become links.

  • Runs in your browser
  • Free, no sign-up
  • Unlimited use
  • Updated 30 September 2026

Text to HTML Converter

Paste your text — the result updates as you type

How to use the text to HTML converter

  1. 1Paste or type text into Plain text, or press Example. The HTML appears as you type.
  2. 2Choose how Line breaks are handled: blank line = new paragraph with <br> for single breaks, every line as its own paragraph, or <br> only.
  3. 3Keep Escape < > & ticked for normal text, and Turn URLs and emails into links if you want clickable links (optionally Open links in a new tab). Tick Markdown-style formatting for bold, headings and lists.
  4. 4Press Copy or Download (text.html).

Example

Input
Opening hours
Mon–Fri: 9am–5pm

Email hello@example.com or visit www.example.com/contact.
Prices < £10 & free returns.
Output
<p>Opening hours<br>
Mon–Fri: 9am–5pm</p>
<p>Email <a href="mailto:hello@example.com">hello@example.com</a> or visit <a href="https://www.example.com/contact">www.example.com/contact</a>.<br>
Prices &lt; £10 &amp; free returns.</p>

The full stop after the URL isn't included in the link, and www. addresses get https:// added.

Paragraphs vs line breaks

In plain text, a blank line usually separates paragraphs and a single line break is just a new line inside one (an address, a poem). The default setting follows that convention: each block of text becomes a <p>, and line breaks within it become <br>, which is the same as PHP's nl2br plus paragraphs.

Choose Every line is a <p> for lists of short items where each line is its own paragraph, or Only <br>, no paragraphs when the HTML goes inside an existing element, such as a table cell or an email template slot.

Escaping special characters

Three characters have special meaning in HTML and must be escaped in text: < becomes &lt;, > becomes &gt; and & becomes &amp;. Without that, a < b can swallow the rest of the line as a broken tag, and pasted text containing <script> would become real code. Accented letters, curly quotes and emoji don't need escaping in a UTF-8 page and are left as they are, which keeps the HTML readable.

Untick Escape < > & only when the text already contains HTML tags you want to keep. For converting characters to entities such as &eacute;, use the Unicode converter.

Auto-linking URLs

Addresses starting with http://, https:// or www. become links, and www. addresses get https:// added to the href. Email addresses become mailto: links. Punctuation at the end of a URL, such as a full stop or closing bracket, is left outside the link, because it almost always belongs to the sentence.

Open links in a new tab adds target="_blank" rel="noopener". Use it sparingly: opening new tabs takes control away from visitors, and it is mainly useful in emails or for links to documents.

Markdown-style formatting

Tick Markdown-style formatting to convert the common basics:

You typeYou get
# Title to ###### Title<h1> to <h6>
**bold**<strong>bold</strong>
*italic* or _italic_<em>italic</em>
a word between backticks<code>…</code>
lines starting - or 1. <ul> or <ol> lists
lines starting > <blockquote>
[text](https://…)a link

It is a practical subset, not full CommonMark: nested lists, tables and code blocks aren't converted. Check the result in the HTML viewer.

Is my text private?

This tool runs entirely in your browser. Your text is not uploaded to our servers.

Sources

Questions about the text to HTML converter

How do I convert line breaks to <br>?

Paste your text with Line breaks on the default setting: single line breaks become <br> and blank lines start new paragraphs. Choose Only <br>, no paragraphs to get <br> without any <p> tags.

Which characters need escaping in HTML?

In text, <, > and &. Inside attribute values, also the quote character that delimits the value (&quot;).

Can I convert Markdown?

The common parts: headings, bold, italic, inline code, simple lists, quotes and links. Tick Markdown-style formatting.

Last updated 30 September 2026Maintained by Premier SEO Services

Report a problem