HTML Viewer
Paste or type HTML (with CSS) and watch the page render as you edit. Check how it looks at phone and tablet widths, open a local .html file, and turn JavaScript on only when you need it.
How to use the HTML viewer
- Paste HTML into the editor, or press Open .html file.
- The preview below updates as you type.
- Switch the preview to Phone 375 or Tablet 768 to check responsive layouts.
- Tick Run JavaScript to allow scripts in the preview.
- Download saves your code as an .html file.
Press Tab in the editor to insert two spaces.
Safe by design
The preview runs in a sandboxed iframe with its own separate origin. Even with JavaScript turned on, code in the preview can't read this page, your cookies or other sites' data. Scripts are off by default, so pasted code from an email or a website can't run until you choose. Nothing you paste is uploaded.
What you can preview
| Content | Works? |
|---|---|
HTML and inline CSS (<style>) |
Yes |
| Images, fonts and CSS from full https:// URLs | Yes, if the other site allows it |
JavaScript (<script>) |
Yes, with Run JavaScript ticked |
Relative links to local files (images/logo.png) |
No; use full URLs or data URIs |
| Email templates | Yes (great for checking HTML emails) |
To embed small images without separate files, turn them into data URIs with the Base64 encoder.
Uses
- Checking HTML email templates before sending
- Testing a snippet from a tutorial or Stack Overflow
- Previewing an .html attachment safely
- Learning HTML and CSS with instant feedback
Frequently asked questions
Why don't my images show?
Relative paths (like img/photo.jpg) point to files on your computer that the preview can't reach. Use full https:// image URLs or Base64 data URIs.
Is it safe to preview HTML from an unknown source?
The preview is sandboxed and scripts are off by default, so it can't access this page or your accounts. Avoid turning on JavaScript for code you don't trust.
Can I edit and save the HTML?
Yes. Edit in the box and press Download to save it as an .html file.