HTML to link converter

HTML code to link

Copied some markup from a tutorial, a CodePen, a template or your editor? Paste it into the box below. The converter wraps snippets into a valid page, hosts it, and returns a link — the fastest route from code on your clipboard to something people can open.

Quick answerTo convert HTML code to a link, paste the code into the converter's Paste HTML code box and press Convert to link. You get an https URL; open it to check the rendered page, then share it.
HTML → linkFree · no install
 · 
.htmltolink.dev
Link lifetime
24 hours on Free · make it permanent

Sign in with Google once — your links appear in My links. Ctrl/⌘ + Enter converts.

Full documents and snippets both work

A full document starts with <!DOCTYPE html> and has <head> and <body>. A snippet is just a piece — say a <table> or a styled <div>. Both convert. Browsers are forgiving: missing <html> or <body> tags are filled in automatically when the page loads.

One thing worth adding to a snippet is <meta name="viewport" content="width=device-width, initial-scale=1">. Without it, phones render the page zoomed out as if it were a desktop site.

Preview before you convert

Press Preview under the code box to render your HTML in a sandboxed frame right here. It is the same engine your visitors will use, so what you see is what they get — minus anything that needs other files you have not included.

Keep everything inline

Pasted code is a single file, so put CSS in a <style> tag and JavaScript in a <script> tag rather than linking to local files. Images can be hosted elsewhere and referenced by full https:// URL, or embedded as data URIs. If your project already has separate files, use ZIP to link instead.

Free here · permanent on htmltolink.dev

Need the link to stay online?

Free links from this converter last 24 hours. Permanent links, bigger uploads (up to 75 MB) and no badge live on our sister site htmltolink.dev — same backend, same Google sign-in. Open it, sign in with the same account, choose a plan, and the links you already made here switch to permanent. Nothing to re-upload.

Pro plans from

$5/month

See Pro on htmltolink.dev

Sign in there with the Google account you use here.

Questions about html code to link

Is my draft saved if I close the tab?
Yes, the code box keeps a draft in your browser's local storage until you convert or clear it. It never leaves your device until you press Convert.
Does JavaScript run on the converted page?
Yes. Scripts run as they would on any website. Pages that try to collect passwords or card details for other brands are blocked as phishing.
Can I use PHP or Python code?
No. The link serves static files — HTML, CSS, JavaScript and assets. Server-side code is shown as text, not executed.
How long can the code be?
Up to 2 MB on Free, which is roughly two million characters.