HTML Viewer
Open an .html file or paste code and watch it render live beside the editor. Edit it, then download the result as .html. Runs in your browser, no upload.
To open an HTML file online, click Open file (or drag the .html onto the editor) - the source appears on the left and the rendered page on the right. You can also paste markup directly. Edit with syntax highlighting, then download the result as an .html file or copy it. Files are read locally and rendered in a sandboxed iframe, so nothing is uploaded anywhere.
HTML Viewer
1484
Editor
Code
Preview
Live Preview
You May Also Need
How to use the HTML viewer
- 1
Open or paste your HTML
Click Open file to pick an .html or .htm document, drag one onto the editor, or paste source code you copied from somewhere else.
- 2
Check the detected encoding
Files declaring a legacy charset such as windows-1251, Shift_JIS or GBK in a meta tag are decoded with it; everything else is read as UTF-8. The file name and encoding show in the header.
- 3
Read the live preview
The right pane renders the markup roughly half a second after you stop typing, exactly as a browser would.
- 4
Edit and save
Adjust the code and watch the result change, then press Download .html to save the page, Copy to grab the markup, or Fullscreen for more room.
References
- MDN - HTML
Reference and tutorials for every HTML element and attribute.
- WHATWG - HTML Standard
The living specification that defines HTML syntax and how browsers render it.
- MDN - The iframe element and its sandbox attribute
Explains the sandbox restrictions this tool applies to the preview frame.
Related Tools
HTML Minifier
Strip whitespace and comments to shrink HTML for production.
HTML to JSON
Turn HTML markup into a structured JSON tree.
Markdown Viewer
Preview Markdown rendered as HTML in real time.
CSS Minifier
Compress the stylesheets you paste into your page.
JS Minifier
Compress the scripts you paste into your page.
Frequently Asked Questions
- How do I open an HTML file online?
- Click Open file and choose the .html document, or drag it from your desktop onto the editor. The source is loaded into the left pane and rendered on the right straight away - the file never leaves your computer.
- What should I open a .html file with?
- Double-clicking it opens the rendered page in your browser; opening it with Notepad, TextEdit or a code editor shows the source. This viewer gives you both at once - code on the left, rendered result on the right.
- Do .htm and .mhtml files work?
- A .htm file is the same format as .html and opens directly with Open file. .mhtml is a packed archive of a page plus its assets, so it will not render here - re-save it as plain HTML first.
- Why does my file show garbled characters?
- The viewer decodes the file with the charset named in its <meta charset> or http-equiv tag and falls back to UTF-8. If an old page omits that tag but was saved in a legacy encoding, add the correct meta charset line and open it again.
- Can I open an HTML file on iPhone or Android?
- Yes. Open file brings up the system file picker in mobile Safari and Chrome, so documents in Files, Google Drive or Downloads can be loaded; on phones the editor and the preview stack vertically.
- Can I save or download the edited page?
- Yes. Download .html saves the current editor contents as a UTF-8 file, keeping the original file name when you opened one. If the source declared another charset, that meta tag is switched to utf-8 in the saved copy so it still displays correctly.
- Can I convert HTML to PDF here?
- Not directly - this tool renders and edits HTML only. Download the page as .html, open it in your browser and use Print, then choose Save as PDF as the destination.
- Do external CSS, JavaScript and images load in the preview?
- Absolute https URLs load normally, so CDN stylesheets, scripts and images all work. Relative paths like ./style.css cannot resolve because the preview has no directory of its own. The frame is sandboxed with scripts allowed but no same-origin access, so cookies, storage and alert dialogs stay blocked.