HTML viewer and preview

Paste HTML or open an .html file and see the page rendered as you type. Save it as a PNG or JPG when you need an image.

HTML code

Paste an HTML fragment or a full document (the body is extracted automatically). Upload a file up to 500 KB. Your code stays in your browser and is never sent to a server.

Preview

Paste or upload HTML code above and your rendered page will appear here.

PNG preserves transparency. JPEG uses a white background. The full-page height is captured automatically, so nothing is clipped. Clipboard copy is PNG.

Want the image more than the preview? Use HTML code to image.

Features

What the HTML viewer can do

Render

  • Live preview

    The page redraws as you type.

  • Height fits the content

    The image is as tall as the page, cropped to what is on it.

  • Sharp text

    Drawn at twice the pixel density, so text stays crisp.

  • Remote images

    Images from other sites are pulled in when the site allows it.

Input

  • Paste or upload

    Paste HTML, or open an .html or .htm file up to 500 KB.

  • Full pages or snippets

    Paste a whole document and the body is used, or paste a single element.

  • Your styles

    <style> tags, stylesheet links and web font links in the head are kept, so the page looks like it does in a browser.

  • Formatting

    Pasted and uploaded HTML is tidied with Prettier. Clear starts over.

  • Scripts removed

    Scripts, iframes, embeds and event handlers are stripped before the HTML is drawn.

Export

  • Free widths

    800, 1200 or 1600 px wide.

  • PNG or JPG

    PNG keeps transparency. JPG is drawn on white.

  • Copy PNG

    Put the PNG on the clipboard to paste into a doc, ticket or chat.

  • Wider images Pro

    2400 or 3200 px wide.

  • WebP Pro

    A smaller file than PNG for the web.

How to view HTML online

  1. 01

    Paste or open HTML

    Paste a fragment or a full document, or open an .html file up to 500 KB.

  2. 02

    See it rendered

    The preview updates as you type. Scripts and other unsafe code are removed first, so the page can't run anything. Inline styles and <style> tags still apply.

  3. 03

    Save it if you need to

    Download the rendered page as a PNG or JPEG at 800, 1200, or 1600 px, or copy it to the clipboard.

Need to make your code look great too?

Paste code, pick a theme, and download a PNG with syntax highlighting.

Open Code to image

Also need to convert SVG code?

Turn any SVG markup into a PNG or JPEG at up to 2000 px.

SVG code to image converter

FAQ

Questions

Everything you need to know about the HTML viewer.