Skip to content
Free tool · runs in your browser

Online HTML viewer

Paste HTML or open an .html file and it renders as you type — CSS, JavaScript and all. Check it at phone, tablet and desktop width, then turn it into a shareable link without leaving the page.

What an online HTML viewer does

An HTML viewer renders HTML source as the page it describes — the same thing a browser does when it opens a website. This one runs inside a sandboxed frame on this page: the code on the left is loaded into the frame on the right every time you stop typing, so styles, scripts, canvas drawing and even alert() behave exactly as they would in a real tab. Nothing is sent to a server; the preview is generated entirely in your browser.

When to use it

  • Checking AI-generated HTML. Paste what ChatGPT, Claude or Gemini produced and see if it actually works before you share it.
  • Opening an .html attachment safely. The preview frame is sandboxed, so the page cannot read this site's storage or navigate the tab.
  • Testing on mobile widths. Switch to Phone (390 px) or Tablet (768 px) to catch layouts that overflow. If the page looks tiny on Phone, it is probably missing the viewport meta tag.
  • Learning HTML. Change a value and watch the result — the fastest feedback loop there is.

From preview to a shareable link

A preview only exists on your screen. When someone else needs to see it, press Publish as link: the code moves to the converter on the home page, where you can pick an address like my-demo.htmltolink.dev, add a password, and get a live URL. The HTML to link guide explains the options.

HTML viewer vs "view source"

"View source" (Ctrl+U) shows the code of a page; a viewer does the reverse and shows the page for some code. Developer tools sit in between: they show the live DOM after JavaScript has changed it. If a page renders differently here than on your site, compare against the live DOM, not the original source.

Related guides

Frequently asked questions

Does the viewer run JavaScript?

Yes. The preview frame allows scripts, forms, modals and pop-ups, so interactive pages work. It does not allow the frame to access this site's cookies or storage.

Is my HTML uploaded anywhere?

No. The preview is built in your browser with an iframe's srcdoc. Your code only leaves the page if you press Publish as link and then publish.

Why do my images or CSS files not load in the preview?

Relative files like style.css or img/logo.png only exist on your computer. Inline them with the combiner and image to Base64, or upload the whole folder as a ZIP on the home page.

Can I open an .html file from my phone?

Yes. Tap Open .html file, pick the file from your downloads, and it renders here. The phone guide covers Android and iPhone in detail.

More free tools

Your HTML deserves a real link

Paste code, drop a file, a ZIP or a whole folder — get a live URL with your own address, an optional password and a QR code. Free to start with Google sign-in; paid plans keep links online for good.

Turn HTML into a link