Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

HTML Viewer

Live preview

  • Free
  • Runs in your browser
  • No account needed

You get an instant, local preview of pasted HTML, CSS and optional JavaScript in a sealed sandbox. Choose full width, phone 390 px or tablet 768 px, and download the page as an .html file.

Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About HTML Viewer

This tool renders HTML, CSS and optional JavaScript you paste into it, directly in your browser. Testers, designers, teachers and students use it to check layouts, mobile views and interactions without installing anything. The preview runs in a sandboxed iframe so your code stays local by default. Scripts remain disabled until you enable them, and the sandbox prevents the preview from accessing the site or your data. You can switch between full width, phone 390 px and tablet 768 px. When ready, download the rendered page as an .html file. Because the tool runs entirely in the browser, nothing is uploaded while you edit. The implementation follows common browser patterns such as iframe srcdoc or blob URLs described by MDN and the HTML spec.

How to use it

  1. 1Paste your HTML, and optionally add CSS and JavaScript.
  2. 2Choose a viewport: full, phone (390 px) or tablet (768 px).
  3. 3Toggle scripts on only if you need JavaScript to run.
  4. 4View the live page in the sandboxed preview pane.
  5. 5Click download to save the page as an .html file.
Advertisement

Worked example

Input: <!doctype html><html><head><meta name="viewport" content="width=device-width,initial-scale=1"><style>body{font-family:Arial}</style></head><body><h1>Hello FreeToolr</h1></body></html>. Choose phone 390 px. Result: preview shows the H1 at 390 px width, and download saves the document as an .html file.

How it works

Shows pasted HTML, CSS and optional JavaScript as a live page in a sealed sandbox, at full, phone (390 px) or tablet (768 px) width, and downloads it as an .html fileScripts stay off unless turned on and cannot reach the site or your dataWorks in the browser with nothing to install

Source: MDN iframe and srcdoc documentationWHATWG HTML Living Standard (iframe). Last checked 7 November 2026.

What it is good for

  • Preview pages locally in your browser without uploads.
  • Quickly check mobile (390 px) and tablet (768 px) layouts.
  • Download a ready .html file for testing or sharing offline.
  • No server side code execution or backend hosting from the preview.
  • No persistent public hosting or shareable server URLs from the editor.
Advertisement

Questions people ask

Is my HTML uploaded to a server when I paste it?

No. The editor runs in your browser and keeps edits local. Nothing uploads while you edit. Only explicit publish actions on other sites can send data to a server.

Will JavaScript I paste run in the preview?

Not by default. Scripts stay off until you enable them. If enabled, the sandbox isolates the preview so scripts cannot access your site or data.

How does the tool isolate the preview?

It renders your page inside a sandboxed iframe using srcdoc or a blob URL. That creates an opaque origin and limits access, as described by MDN and the HTML spec.

Can I open a local .html file from my computer?

Yes. You can import a local .html file and the browser reads it client side. The file is not uploaded while you edit unless you explicitly publish it elsewhere.

What sizes can I test?

You can test full width, phone at 390 px, and tablet at 768 px. These preset widths match common device breakpoints for quick checks.

How do I save my work?

Click download to save the rendered document as an .html file. The file contains your HTML and inline CSS so you can open it locally or share it manually.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement