HTML to PNG
Paste HTML, get a lossless PNG - with transparency intact and at the pixel density you need.
A lossless PNG at the density you pick, with the alpha channel preserved when you ask for it.
No result yet
Complete the settings and run the tool. Images, PDFs, text, and video all preview in this panel.
curl --fail-with-body "https://api.pagecapture.dev/v1/take" \
-H "X-Access-Key: $PAGECAPTURE_KEY" \
-H "Content-Type: application/json" \
--data '{"html":"<div id=\"badge\" style=\"width:560px;padding:56px;border:3px solid #111;border-radius:32px;font:700 40px/1.2 system-ui,sans-serif;color:#111\">Build passing<p style=\"margin:16px 0 0;font-size:20px;font-weight:500;opacity:.55\">pagecapture - main</p></div>","viewport_width":"640","device_scale_factor":"1","format":"png","full_page":true,"viewport_height":100}' \
-o capture.pngQuestions
- Why is my PNG so large?
- PNG is lossless, so photographic content and smooth gradients cost far more than flat colour - and each step of pixel density multiplies that. If the content is a photograph, the JPEG tool produces a much smaller file at the same perceived quality.
- Does 2x make the image bigger on screen?
- It makes the file bigger, not the layout: the same CSS pixels are rendered with more device pixels. That is what keeps text sharp on a retina display instead of soft.
- Why is my transparent PNG still white?
- Something in the markup is painting a background - often a rule on body or on the outermost element. Transparency needs both the box ticked and nothing opaque behind your content.
- Is the image watermarked?
- No. The file you get here is byte-for-byte what the API returns for the same parameters.
Need this in your own code?
This tool is one call to the PageCapture API. The free plan gives you 100 captures a month with every feature unlocked, and no card.
Guides that cover this in depth
- choose PNG or JPEG for a generated imagePNG or JPEG when your application generates the image
Text picks up a halo of grey speckle at the edges of glyphs, or a 1200x630 card leaves the renderer as a multi-megabyte PNG that a CDN then serves on every page view.
- why a transparent background renders whiteWhy a transparent background arrives white, and how to keep the alpha
A logo, badge or card exported for use over an unknown background arrives with a white rectangle around it, and the CSS inspector insists the background is `transparent`.
Doing this in your app
Skip hosting a page. Send the markup and get the rendered result, with your own fonts and CSS.