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.
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.
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
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.
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.
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.
No software to install.
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.
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.
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?
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.
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.
Export individual HTML components or card designs as images for design handoffs, presentations, and portfolio screenshots in one click.
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.
Paste code, pick a theme, and download a PNG with syntax highlighting.
Open Code to imageTurn any SVG markup into a PNG or JPEG at up to 2000 px.
SVG code to image converterFAQ
Everything you need to know about the HTML code to image converter.
Paste your HTML markup into the editor on this page, or click Upload .html file to load a file from your computer. The tool renders a live preview instantly. When you're happy with it, click Download PNG or Download JPEG to save the image. No account needed.
You can download your HTML as a PNG (lossless, supports transparency) or JPEG (smaller file, white background). You can also copy the image directly to your clipboard as a PNG to paste straight into Figma, Notion, Slack, or any other app.
Yes. Click Upload .html file to pick an .html file from your computer. The tool reads the file, renders a preview, and lets you download it as PNG or JPEG. Full HTML documents are supported: the body content is automatically extracted for rendering.
No. Everything happens entirely in your browser. Your HTML code is never uploaded to any server. It is rendered and converted to an image locally on your device. This makes the tool fast, private, and safe to use with proprietary or sensitive markup.
Yes. Inline styles (style="...") and <style> tags work. Classes from a framework like Tailwind only apply if their CSS is included in your HTML.
To protect you from malicious code, all HTML input is sanitized before rendering. This strips scripts, iframes, event handlers, and certain embed elements. Stylesheet and web font links in the head are kept, but a remote image only loads if its site allows it. For the most accurate results, use inline styles and self-contained HTML.
You can export the image at three free widths: 800 px, 1200 px, 1600 px. Pro adds 2400 and 3200 px, and WebP. The height is automatically determined by your HTML content, and the full page height is captured so nothing is cut off. The default export width is 800 px.
PNG is lossless and supports transparency, so it suits HTML with transparent backgrounds or sharp text. JPEG uses lossy compression with a white background, resulting in a smaller file size. Use PNG for designs with transparency or pixel-perfect quality; use JPEG when a compact file matters more.