HTML Viewer
Open a local HTML file or paste HTML code to see how it looks in your browser. Check the layout at phone, tablet or desktop width. CalcWren processes your source locally and requires no sign-up.
Choose an HTML file from Files or Downloads, or paste code into HTML source below. On a phone, tap Preview to see the page.
Choose an example, then Load example to replace the source. See what to try.
Scripts are off by default. The sandbox isolates the preview from this page, but images and stylesheets can still contact external servers.
On phones, use Source and Preview above to switch panels. Choosing Preview renders your latest edits even when automatic updates are off. The separate preview tab uses its full width and keeps the same sandbox and script setting.
How to open a local HTML file
- Save the attachment or download to your device as an
.html,.htmor.xhtmlfile. - Select Open HTML file and choose it from your file picker. You can also drop it on the source box on desktop.
- Read the rendered page in Preview. On a phone, tap the Preview tab above the source. Use the width presets to check a responsive layout.
The viewer opens one file at a time. Images and stylesheets in the same folder are not loaded from your device. A self-contained file with inline styles and embedded images works without those extra files.
What this HTML viewer does
It renders HTML the way a browser would, without saving a file or leaving the page. Paste a snippet, a whole document, or the source of an email template, and the preview updates on every keystroke. Open an .html file from your computer to read it as a page rather than as code. Fragments without <html> and <body> tags are wrapped in a minimal document so they still display, and a default link target opens links in a new tab. An explicit target in your markup can override that default.
Alongside the preview, the source summary reports the document title, size, element count, how many inline and external scripts and stylesheets it uses, and external hosts found in common source attributes. This summary is a quick inspection aid, not a complete network monitor: CSS URLs and addresses constructed by scripts may be missing. Resources can load as soon as the preview renders.
Three examples to try in the HTML viewer
Pick an example above the Load example button. Each one includes its own styles and works without external assets, so you can change the source and see the result immediately.
- Responsive cards: switch between Phone and Tablet to see the columns change at a CSS breakpoint. Edit a card heading, then download the HTML to keep your changes.
- HTML email template: edit the subject heading, message and call to action in a table-based layout. This is a browser preview; Outlook, Gmail and other email clients may render the same HTML differently.
- Accessible HTML table: inspect a caption, column headers and row headers, then change a value. On narrow screens, scroll inside the sample to read the table.
To tidy your markup first, use the HTML formatter, then paste the result here.
Preview widths
| Preset | Width | Approximates |
|---|---|---|
| Desktop (fill) | Whatever the preview panel allows; use Fullscreen for the full window | Laptop and desktop browsers |
| Tablet | 768 px | iPad portrait and the classic tablet breakpoint |
| Phone | 375 px | iPhone widths from the 6 through the 13 mini and most Android phones in CSS pixels |
Width presets change the iframe's CSS width, so media queries in the pasted CSS respond exactly as they would on a device of that width. They do not emulate touch, device pixel ratio or a mobile user agent, so a page that serves different HTML to phones will still show its desktop version.
Why some things do not render
- Relative paths.
src="images/hero.jpg"orhref="style.css"refer to files next to the original document, which the preview does not have. Use absolute URLs, inline the CSS, or embed images as data URIs (the Base64 encoder makes those). - Mixed content. This page is served over https, so browsers block
http://images and scripts inside it. Switch the URL to https if the server supports it. - Sites that refuse embedding. Some hosts send headers that stop their assets or pages loading inside another origin's frame.
- Storage and cookies. The sandbox has an opaque origin, so scripts that depend on localStorage or cookies from a specific site will not find them.
- Scripts turned off. With Run scripts unchecked, anything JavaScript builds after load will be missing. That is often what you want when checking an unknown file.
HTML viewer, formatter or editor?
Use this viewer when the question is "what does this markup look like". Use the HTML formatter when the question is "why is this markup so hard to read", and paste the tidied result back here to check nothing changed visually. A full online editor adds syntax highlighting and multi-file projects, which is more than a quick preview needs; the viewer focuses on rendering a single HTML document, and local previews work offline once the page has loaded.
Frequently asked questions
Is it safe to preview HTML from an email or an unknown file here?
Both previews isolate the HTML in a sandboxed frame. Scripts are off by default. Images and stylesheets may still contact external servers, and the list of detected hosts is partial. If you download the source and open that file directly, it is outside this viewer’s sandbox.
Why do my images or stylesheets not show in the preview?
A single file does not include images or stylesheets in neighboring folders. Use inline styles or embed the images, or reference an HTTPS URL that allows the resource to load. Browser security rules and the resource’s server can still block a request.
Can I view the HTML source of a website URL?
Not from this page: browsers do not allow one site to fetch another site's HTML, so a URL fetcher would need a server, and this tool deliberately has none. For a live site, prefix its address with view-source: in the address bar, or press Ctrl+U, then paste the markup here to preview it.
Does the HTML viewer run JavaScript?
Only when you turn on Run scripts. The setting applies to the preview on this page and the separate preview tab when you open it. Enable scripts only for HTML you trust.
Is my HTML uploaded anywhere?
CalcWren reads your file or pasted HTML in the browser without uploading it. Resources referenced by the HTML can still make network requests, and scripts you enable can make their own requests. A self-contained file can be previewed offline after the viewer loads.