How to use the text to HTML converter
- 1Paste or type text into Plain text, or press Example. The HTML appears as you type.
- 2Choose how Line breaks are handled: blank line = new paragraph with
<br>for single breaks, every line as its own paragraph, or<br>only. - 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.
- 4Press Copy or Download (
text.html).
Example
Opening hours Mon–Fri: 9am–5pm Email hello@example.com or visit www.example.com/contact. Prices < £10 & free returns.
<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 < £10 & 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 <, > becomes > and & becomes &. 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 é, 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 type | You 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.
