TL;DR
- A real code editor for your HTML — line numbers, syntax highlighting, a Format button that reindents by tag nesting — not a bare textarea.
- Live preview updates as you type, in a sandboxed iframe with no access to this site.
- Publish sends the exact text in the editor. Free pages stay live for 30 days, +30-day recovery window.
HTML Code to Link Converter
Paste or upload your HTML, edit it in a real code editor — highlighting, line numbers, a reindent action — watch it render live next to the code, then publish it to a link.
- Why a textarea isn't enough
- What Format actually does
- vs. other tools
- FAQ
- Same file, start to finish
Why a plain textarea isn't enough for a whole document
A one-line snippet is fine in a bare box. A whole HTML document is not — no line numbers to reference when something's wrong, no colour to separate a tag from the text inside it, and no way to tell "the third <div>" from "the third line" once anything wraps. That gap is what an editor closes: the same text, with enough structure visible that scanning it is fast instead of a squint.
This one is deliberately small. It understands HTML tags, attributes and comments — enough to colour a document and reindent it — and nothing else. It doesn't try to be a full IDE; the live preview beside it, running your actual markup in a sandboxed iframe, is the real check on whether the page works.
Source: WHATWG HTML: the iframe sandbox attribute ↗
What Format actually does
It walks the document tag by tag: every opening tag steps the indent in one level, every closing tag steps it back out, and void elements like <img> and <meta> never open a level at all. <script> and <style> elements are reindented as a single block — their contents are left exactly as written, on purpose: this reindenter understands HTML tag structure, not JavaScript or CSS, and rewriting either safely needs a parser for that language, not this one.
Source: WHATWG HTML: void elements ↗
Before
<div><p>Hello</p><ul><li>One</li><li>Two</li></ul></div>
After Format
<div>
<p>Hello</p>
<ul>
<li>One</li>
<li>Two</li>
</ul>
</div>
How this differs from a paste-and-link tool
| Feature | This page | htmltourl.com | CodePen |
|---|---|---|---|
| Paste OR upload HTML, get a link | Yes | Yes — paste or upload, 20MB limit (same as ours) | No — you write in their editor, there is no "paste and get a link" flow |
| Line numbers + syntax highlighting while you type | Yes | Not shown in its own page copy — it links a separate "full-screen editor" with no confirmation either way | Yes — this is what CodePen is built around |
| Reindent / format the markup for you | Yes, tag-based | Not shown in its own page copy | Yes, more capable — it understands JS and CSS too, not just HTML tags |
| Signup required | No | No — states "No account required" on its own page | No to try a pen, yes to save or keep one private |
| Free page lifetime | 30 days, +30-day recovery window | 90 days, +60-day recovery — longer than ours | Pens don't expire, but they're not really a hosted page — no custom domain, no direct download of the rendered HTML |
The free-tier lifetime row goes against us on purpose — htmltourl.com genuinely keeps a page alive longer. And CodePen is the more capable editor once JavaScript or CSS enters the picture; ours only understands HTML tag structure, on purpose, to stay something you can read in one file.
Checked against each competitor's own site as of 2026-09-01.
Questions people actually ask
How is this different from the paste box on the homepage?
Same publish underneath, different box. This one is a real code editor over your HTML — line numbers down the left, syntax highlighting as you type, and a Format button that reindents it — built for reading and cleaning up a block of markup, not just previewing it.
Does it check my HTML for problems before publishing?
No — this page is about getting from code to a link quickly, not about finding what will break on someone else’s screen. For the six-check inspector (broken local paths, dead CDN links, a missing viewport tag, and more), use the AI HTML checker; it takes the exact same kind of document.
What does the Format button actually do?
It reindents your markup by tag nesting — each opening tag steps in, each closing tag steps back out, void elements like <img> and <meta> never open a level. It does not reformat the text INSIDE a <script> or <style> block (JavaScript and CSS need a real parser to reindent safely, and this one only understands HTML tags), and it is not a validator — it will happily reindent HTML that is already broken. Think of it as tidy-up, not correction.
Can I upload a file instead of typing or pasting?
Yes — the Upload button next to the editor reads a local .html/.htm file with FileReader and drops its text straight into the editor, the same file-reading path the homepage’s attach button uses. Nothing is sent to a server until you click Publish.
Is there a size limit?
The same 20 MB limit every publish on this site has, enforced server-side. Ordinary HTML documents — even a large one with a lot of inline CSS — sit nowhere near it.
Will the link this generates be indexed by Google?
No. Every published page carries a noindex header and lives on a separate domain from this one, the same as every other tool on this site.
Same file, start to finish
A realistic sprint update, walked through the whole path — not a screenshot, the actual source at each step. The bug on purpose here is one this page's checker on the AI HTML checker would never catch, because nothing about it is broken: a bullet point pasted twice, invisible while the whole document sits on one line the way an export often lands.
<!doctype html><html><head><title>Sprint Report</title></head><body><h1>Sprint Report — Week 6</h1><p>Shipped:</p><ul><li>Fixed the CSV export bug</li><li>Fixed the CSV export bug</li><li>Started the billing migration</li></ul></body></html>
Valid HTML, minified onto one line by whatever exported it. Nothing about it looks wrong — there is nothing to look at.
<!doctype html>
<html>
<head>
<title>Sprint Report</title>
</head>
<body>
<h1>Sprint Report — Week 6</h1>
<p>Shipped:</p>
<ul>
<li>Fixed the CSV export bug</li>
<li>Fixed the CSV export bug</li>
<li>Started the billing migration</li>
</ul>
</body>
</html>
One click reindents it by tag nesting. The duplicate line was always there; it only becomes readable once it has its own line to sit on.
<!doctype html>
<html>
<head>
<title>Sprint Report</title>
</head>
<body>
<h1>Sprint Report — Week 6</h1>
<p>Shipped:</p>
<ul>
<li>Fixed the CSV export bug</li>
<li>Started the billing migration</li>
</ul>
</body>
</html>
The extra line is deleted directly in the same textarea Format just reindented — no separate "fix" step, no re-upload.
The corrected document, live at its own link — not a second copy, the same text the editor now holds.
Same textarea, same tab, the whole way through — Format doesn't fix the duplicate, it just gives you enough structure to see it, which is what an editor is actually for.
Two related tools
What comes out the other end
Six pages published with this tool, exactly as a stranger receives them. These are live — the previews below are the real documents, not screenshots.