Free tool

HTML previewer

Paste HTML and CSS, see it live in a safe sandbox, then download it as an index.html file.

Paste a full page or just a snippet. CSS in a <style> tag and JavaScript in a <script> tag both work.

0 BFile size
0Lines
NoHas <!doctype html>

Before you publish

    How to use the HTML previewer

    Paste HTML into the box and the preview updates as you type. It is handy for checking a page that an AI assistant wrote for you, a snippet from a tutorial, or a file someone sent you, before you put it online. Everything happens in your browser. The code is not uploaded, saved or shared.

    Why the preview is sandboxed

    The preview runs inside a sandboxed frame. Scripts can run if you leave "Run JavaScript" on, but the frame is treated as a separate, unique origin: it cannot read this site, its cookies or its storage, and it cannot open pop-ups or submit forms. Turn JavaScript off if you only want to see the layout, or if you are unsure what a script does.

    What the checks look for

    • Doctype. Without <!doctype html> at the top, browsers fall back to an older rendering mode and layouts can shift.
    • Viewport tag. Without <meta name="viewport">, phones show a zoomed-out desktop page.
    • Title. The <title> is what people see in the browser tab and in link previews.
    • Local files. Images, stylesheets or scripts referenced by a path will only show once you upload those files too. Use the HTML path checker for a full list.

    Publishing what you made

    Click Download index.html to save the code as a file with the name most hosts expect for a home page. Then follow our guide to hosting an HTML file, or read about turning an AI-made page into a live site. If your page uses large images or videos, run them through the file size checker first.