How to use HTML Viewer
- Paste your HTML into the input box.
- Open the "Preview" tab to see the rendered page, and pick a width (360, 768, 1024 px or full) to test mobile, tablet and desktop layouts.
- Tick "Load remote images and styles" only if you trust the code and want to see its external images and stylesheets.
- Open the "Source" tab to read the HTML re-indented, then copy it or download it as an .html file.
Features
- Preview in an iframe with sandbox="", so no scripts, forms or popups
- The preview cannot access the OneVixa page or its cookies
- Remote images, stylesheets and fonts are blocked by default
- Checkbox to load remote images and styles when you want them
- Width selector, 360, 768, 1024 px or full width
- Source tab with beautified HTML, copy and download .html buttons
- Works with snippets and complete pages, up to 1 million characters
Supported formats and limits
- Maximum input: 1,000,000 characters
Examples
| Input | Result |
|---|---|
| <h1>Hello</h1><p>A <strong>short</strong> page.</p> | Preview shows a large heading "Hello" and a paragraph with the word "short" in bold. The Source tab shows the same code indented over several lines. — Good for checking a snippet before you paste it into a page or an email template. |
| <img src="https://example.com/photo.jpg" alt="Photo"> | By default the image is blocked and only its alt text area is shown. Tick "Load remote images and styles" to request it. — This protects you from trackers and unknown servers when you preview untrusted HTML. |
Limitations
- JavaScript never runs, so pages that depend on scripts look empty or unfinished.
- It previews a snippet or a single page, not a live URL. It does not fetch websites.
- Relative links and images do not resolve, because the preview has no base address.
- It is a preview and not a validator. Browsers display broken HTML as best they can, so a clean preview does not mean the code is valid.
Learn more
An HTML viewer turns markup into the page a visitor would see. That is useful when you write an email template, edit a snippet from a content system or review code that someone sent you and you do not want to open a raw file on your computer.
The safety of the preview depends on the sandbox. An iframe with an empty sandbox attribute is treated by the browser as a separate origin with almost all powers switched off. It cannot run scripts, submit forms, open popups or read cookies and storage from the page around it. This viewer also blocks remote images, stylesheets and fonts by default, because even a harmless looking image tag tells another server that you opened the page.
Remember what a preview cannot show. Scripts, relative files and server behavior are missing, so treat the result as a quick look and test the final page in a real browser.
Frequently asked questions
How do I preview HTML code online?
Paste the code into the box and open the "Preview" tab. It renders the HTML in a sandboxed frame inside your browser, with no upload.
Is it safe to preview HTML from an unknown source?
It is safer than opening the file. The frame blocks scripts, forms and popups, cannot reach this page or its cookies, and remote files are blocked until you tick the option.
Why does my page look empty or broken?
Pages that build their content with JavaScript need scripts to run, and they never run here. Static HTML and CSS display normally.
Can I view a website by typing its address?
No. This tool only renders the HTML you paste. It does not load web pages from the internet.
Sources
Last reviewed: October 1, 2026