Why
HTML Viewer Cat is a few small tools that each do one thing in the browser.
Paste HTML and see it render in the HTML viewer. Write markdown and copy out clean HTML in the markdown editor. Turn HTML into a print-ready PDF in the HTML-to-PDF converter. Read minified or messy JSON as a collapsible tree in the JSON viewer. That's the whole site.
What is an HTML viewer?
An HTML viewer is a tool that takes raw HTML markup as input and renders it as a live web page, without requiring you to save the markup to a file and open it in a browser. The most common form is a paste-and-render text box on a webpage — you paste HTML on the left, the rendered result appears on the right, and any change you make updates the preview as you type. HTML viewers are typically used for previewing AI-generated HTML, debugging email templates, sanity-checking React component output, and sharing visual mockups via URL.
How HTML viewers work
Modern HTML viewers run entirely in the browser. The user-pasted HTML is written into an <iframe srcDoc="..."> element on the page, which causes the browser to render that HTML as if it were a separate document loaded from a separate origin. The sandbox attribute on the iframe restricts what the rendered HTML can do — typically scripts are allowed (so interactive components work) but the iframe can't navigate the parent page or read its cookies.
Because the rendering happens client-side, the source HTML never has to leave the user's browser. There is no upload, no server-side parser, and no risk of the operator reading your code. The trade-off is that browser-based viewers can't render anything that requires server resources (your local API endpoints aren't reachable from the iframe, for example) and the URL-fragment share format caps at a few kilobytes — past that, you're better off pushing the HTML to a file.
HTML viewer vs CodePen, JSFiddle, your local file
Each tool excels at a different scope. CodePen and JSFiddle are the right call when you need to share a complete, persistent demo across multiple sessions — they save your snippet to their server, give it a stable URL, and offer collaboration features for paid tiers. They expect you to log in, link the snippet to your account, and treat it as a small project file. The trade-off is that your code lives on someone else's infrastructure, the editor adds chrome (collections, settings, comments), and the page itself is heavier than just a preview.
Opening an HTML file directly in your browser is the lightest option for one-off rendering — no third-party site involved at all. The trade-off is that you have to save the file first, your browser may treat the file as a different origin from localhost, and you can't share it without sending the file or hosting it somewhere.
A paste-and-render HTML viewer sits between the two. There's no save, no account, no project file — paste in, see it render, share via a URL fragment if you want. It's the tool to reach for when the HTML is ephemeral: a snippet from an AI, an email-template preview, a quick component sanity check. When the snippet starts feeling like a real project — version control, collaborators, persistence — graduate to CodePen or a local file.
Why this set
We built the tools we actually use. Each one earns its slot — if a tool can't be explained in a sentence, it doesn't ship. We add a tool only when we'd reach for it ourselves, not to pad out a list.
How they work
Three things matter in any of these tools: speed, safety, and realistic widths. Speed means the preview updates as you type, not on a button click. Safety means anything you paste runs in a sandboxed iframe so it can't read your cookies or redirect your tab. Realistic widths means you can flip between desktop, tablet, and phone in a single click instead of resizing your browser.
The HTML viewer's editor is a full CodeMirror instance with syntax highlighting, bracket matching, line numbers, and keyboard shortcuts. The preview is a sandboxed iframe with scripts allowed, so interactive components actually behave. The split between editor and preview is draggable and remembers its position between visits. Drafts are auto-saved to localStorage, and the share button base64-encodes your HTML into a URL fragment (#s=…) so the link itself carries the content — nothing touches a server.
What stays true
- Free. No signup, no account, no email wall.
- Runs in your browser. Your HTML doesn't leave your machine unless you share a link.
- No tracking beyond anonymous, cookieless usage counts.
- No feature sprawl. If a tool can't be explained in a sentence, it doesn't ship.
Built and maintained by Axel, a solo developer in Norway.