toolqik

177 · HTML & SEO

HTML Preview

Write HTML, CSS and JavaScript and see the result live, at desktop, tablet and phone widths.

Runs in your browser

About this tool

Write or paste HTML, including <style> and <script> blocks, and see it rendered as you type. Switch between full width, laptop, tablet and phone widths to check a responsive layout, and see console.log output and JavaScript errors below the preview.

Secure by design

The preview runs in a sandboxed iframe with its own unique origin. Scripts in your HTML can run, but they can’t read this site’s storage or cookies or touch the page around the preview. Turn off Run JavaScript to see a page as it renders with scripts disabled, which is also the safe way to look at HTML you don’t trust.

Tips

  • Press Ctrl + Enter (⌘ + Enter on a Mac) to refresh the preview, useful when Update as I type is off.
  • External stylesheets, scripts, fonts and images load normally, so you can link a CSS framework from a CDN.
  • Relative links such as styles.css won’t resolve, because there’s no folder around the file. Paste the CSS into a <style> block instead.
  • Download saves your code as an .html file you can open in any browser.

Your code isn’t saved or uploaded. Reloading the page clears it, so download anything you want to keep.

FAQ

How do I preview HTML code?

Paste it into the editor. The preview updates as you type; press Ctrl+Enter to refresh it manually.

Can I use CSS and JavaScript?

Yes. Put CSS in a <style> block and JavaScript in a <script> block, or link files from a CDN. Console output and errors appear below the preview.

Is it safe to preview untrusted HTML?

The preview is sandboxed with its own origin, so scripts can’t access this site. For extra safety turn off “Run JavaScript”, which blocks all scripts.

How do I test mobile layouts?

Choose Tablet or Phone above the preview to render it at 768 or 375 pixels wide.

Is my code saved?

No. Nothing is stored or uploaded. Use Download to keep a copy.

esc
↑↓ navigate↵ open