HTML Viewer & Live Preview
Preview HTML with a responsive viewport switcher, live console output, and basic error linting.
How this tool works
Paste your HTML
Drop in a full page or a snippet - scripts and styles work too.
Check the linter warnings
Unclosed tags, mismatched tags, and duplicate IDs are flagged automatically.
Preview across viewports
Switch between Desktop, Tablet, and Mobile widths to check the real layout.
Debug with the console panel
console.log output and runtime errors from your scripts show up live below the preview.
Quick facts
- Category
- Formatters & Beautifiers
- Best for
- Checking a pasted landing page layout across screen sizes before shipping it
About this tool
Paste HTML and see it rendered live in a sandboxed preview, but this goes well past a basic paste-and-render viewer. Switch the preview between Desktop, Tablet, and Mobile widths to actually check how a layout responds, instead of only ever seeing one fixed-width render. A captured console panel shows console.log/warn/error output - and uncaught runtime errors - from scripts running inside the preview, so you can actually debug broken JavaScript in the pasted page rather than staring at a silently blank result. A lightweight linter scans for unclosed tags, mismatched tags, and duplicate id attributes and lists them as non-blocking warnings above the preview, so markup problems are visible instead of silently swallowed. A "Formatted source" mode shows the HTML with basic tag/attribute/string syntax coloring, and you can export the result as a downloadable .html file or a shareable data URI. The preview iframe runs with sandbox="allow-scripts" only - scripts execute for the preview, but the sandbox blocks the page from accessing the parent site, cookies, or top-level navigation.
Why use this tool
Actually check responsiveness
Switch between Desktop, Tablet, and Mobile widths instead of guessing how a layout will hold up.
Debug scripts, not guess
Captured console output and runtime errors show up live, so broken JavaScript is visible immediately.
Sandboxed by default
Scripts run in an isolated iframe with no access to this site or your data - safe to experiment.
Export when you’re done
Download the page as a .html file or copy it as a shareable data URI, no hosting required.
Frequently asked questions
Scripts do run, but only inside a sandboxed iframe using sandbox="allow-scripts" with no "allow-same-origin" - that combination means the preview gets an opaque, isolated origin with no access to this site’s cookies, storage, or parent page, and it can’t navigate the top-level page or escape the frame. That said, sandboxing limits what a script can reach, not what it can compute - a malicious script could still, say, try to phish via convincing-looking preview content, so you should still avoid pasting HTML from sources you don’t trust, the same caution you’d apply to running any unfamiliar code.
The Desktop/Tablet/Mobile buttons resize the preview iframe itself to 100%, 768px, and 375px respectively - common breakpoint reference widths - rather than just shrinking a screenshot, so CSS media queries and responsive layout rules in your HTML genuinely re-evaluate at each width, the same way they would in a real browser resized to that viewport.
No - it checks a specific, common set of issues (unclosed tags, mismatched open/close tags, duplicate id attributes) using a lightweight tag-stack scan, not a full HTML5 parser or validator. It’s meant to catch the mistakes that most often silently break a layout or a getElementById lookup, not to replace a complete markup validator for spec compliance.
Explore more free tools
Formatters, converters, validators, and generators - all free and running entirely in your browser.
Browse more tools