Turn HTML into a PNG or JPG

Paste any HTML markup or upload an .html file and download it instantly as a PNG or JPEG. Pick an export width (800, 1200, or 1600 px) and the full-page height is captured automatically. No account needed. The entire conversion runs in your browser.

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.

Only need to look at the page? Open the HTML viewer.

Features

What HTML code to image can do

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.

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.

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 convert HTML to PNG or JPG

No software to install.

  1. 01

    Paste or upload HTML code

    Paste any HTML fragment or a full document, or upload an .html file. Full documents are supported, and the body content is extracted automatically. Works with inline styles and <style> tags.

  2. 02

    Preview your rendered page

    See your HTML rendered live in a large preview canvas. The markup is sanitized to strip scripts and unsafe code before display, keeping the preview fast and safe.

  3. 03

    Download PNG or JPEG

    Pick an export width (800, 1200, or 1600 px) and the full content height is captured automatically. Click Download PNG, Download JPEG, or copy straight to your clipboard.

Why convert HTML to image?

Share HTML designs anywhere, without a browser

HTML is the most expressive format for layouts, but not every platform renders it. Convert your HTML code to an image and use it anywhere.

Email previews & screenshots

Capture your HTML email template as a PNG for documentation, client approval, or sharing in Slack and Notion without needing an email client to render it.

UI component snapshots

Export individual HTML components or card designs as images for design handoffs, presentations, and portfolio screenshots in one click.

Social media & marketing

Twitter/X, LinkedIn, and most apps only accept PNG or JPEG. Convert your HTML banner, announcement card, or infographic to an image and post it everywhere.

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 code to image converter.