HTML to Image
Turn HTML and CSS into a sharp PNG, JPG or WebP image.
Paste your HTML (or open an .html file), choose the page size and sharpness, and convert it to a PNG, JPG or WebP image in one click. Make social cards, banners, quote graphics, certificates and receipts at 1×, 2× or 3× resolution, with an optional transparent background. Everything runs in your browser, so your HTML is never uploaded. Free, with no sign-up and no watermark.
No Hidden Fees Ever
1×, 2× or 3× Sharpness
Your HTML Stays in Your Browser
Paste, Convert, Download
Width of the page your HTML is laid out in. Leave the height empty to fit the content.
2× makes the image twice as many pixels wide and tall, so text stays crisp on retina screens. Very large results are reduced automatically.
PNG is lossless and keeps transparency. JPG and WEBP make smaller files.
Applies to JPG and WEBP only.
Used where your HTML doesn’t set its own background. JPG can’t be transparent, so it always uses this colour.
Private by design: your HTML is rendered in your browser and never uploaded. Scripts in it are not run. Protected by Cloudflare Turnstile.
Why Convert HTML to an Image?
To convert HTML to an image, paste your HTML and CSS into the box, set the page width, choose a sharpness (2× for crisp text) and a format (PNG, JPG or WebP), then click Convert to image and download the result. Teasoft's HTML to Image converter renders your code in your browser, so nothing is uploaded. Scripts in the HTML are not run.
HTML and CSS are a quick way to design something: a social card with a headline, a banner with a gradient, a certificate, an invoice or a styled code snippet. But a web page isn't always what you need. Social platforms, emails, slide decks and chat apps want an image. Converting the HTML gives you a fixed, shareable picture of exactly what you designed, with fonts, colours and layout intact.
You write or paste the HTML, say how wide the page should be, and the tool renders it at the sharpness you pick. Leave the height empty and the image is as tall as the content.
Common reasons to convert HTML to an image:
- You want a social media card, Open Graph image or blog header made from HTML and CSS.
- You need a banner, quote graphic or announcement as a PNG or JPG.
- You want to turn a styled snippet, table or code block into a picture.
- You need a certificate, badge, ticket or receipt as an image.
- You want a transparent PNG of an HTML component for a design or presentation.
- You are testing how a layout looks at a fixed width and want a quick snapshot.
What each setting does:
| Setting | What it does | When to use it |
|---|---|---|
| Page size | Sets the width (and optionally height) in px that your HTML is laid out in. Leave the height empty to fit the content. | Always. Match the size your design needs, such as 1200 px wide for a social card. |
| Sharpness | 1×, 2× or 3×. 2× makes the image twice as many pixels wide and tall. | 2× for crisp text and retina screens. 1× for small previews. 3× for large or print-like output. |
| Save as | PNG, JPG or WebP. | PNG for text, graphics and transparency. JPG or WebP for smaller files. |
| Quality | Controls JPG and WebP output. Default is 92%. | Keep 85–92% for photos and gradients that must look smooth. |
| Background | The colour behind your HTML where it doesn’t set its own. Transparent works with PNG and WebP. | When your HTML has no background, or you want a transparent PNG. JPG always uses a colour. |
Good to know
- Scripts are not run. The tool renders your HTML and CSS only. JavaScript, including anything that builds the page or draws a chart after loading, won't execute, so only what is in the HTML itself appears.
- Keep everything inside the HTML. Put your CSS in a style tag or inline, and embed images and fonts where you can. Files that live on other servers may not load in the image, so check the result.
- It isn't a website screenshot tool. You provide the HTML yourself, not a web address. To capture a live page, use your browser's own screenshot feature.
- Results can differ slightly from your browser. Fonts, spacing and some effects may not render exactly as they do on a live page. Check the picture before you use it.
What You Can Do With This Converter
- Paste, open or try an example. Paste HTML, open an .html file, or start from the built-in example.
- Set the page size. Choose the width in px, and leave the height empty to fit the content.
- Choose the sharpness. 1×, 2× or 3×. 2× keeps text crisp on retina screens.
- Save as PNG, JPG or WebP. PNG is lossless and keeps transparency. JPG and WebP make smaller files.
- Transparent backgrounds. Choose Transparent for a PNG or WebP where your HTML doesn't set its own background.
- Control quality. For JPG and WebP output, the slider starts at 92%.
- Private by design. Your HTML is rendered in your browser and never uploaded to a server.
- No sign-up, no watermark, no fees.
- Works on any device. Windows, Mac, Linux, Android and iPhone, in any modern browser.
Which Image Tool Should I Use?
Use HTML to Image when your starting point is HTML and CSS. If you already have an image, use one of the other tools to convert, resize or compress it. If your artwork is an SVG, use SVG to PNG.
How to Convert HTML to an Image (3 Steps)
Add your HTML
Paste your HTML and CSS into the box, click Open file to load an .html file, or click Example to start from a sample.
Choose size, sharpness and format
Open Settings. Enter the page width in px (leave the height empty to fit the content), pick a sharpness (2× for crisp text), and choose PNG, JPG or WebP. Set a background colour, or Transparent for PNG or WebP.
Convert and download
Click Convert to image, check the result, then download it. If something looks off, adjust the HTML or the page size and convert again.
Tip: design at the final width. If a social card should be 1200 px wide, set the page width to 1200 and build your layout for that, then use 2× for a sharper result.
Which Settings Should I Use?
| Goal | Page width | Sharpness | Save as |
|---|---|---|---|
| Social card or Open Graph image | 1200 px (height about 630 px) | 2× | PNG or JPG |
| Blog header or banner | 1200–1600 px | 2× | PNG, JPG or WebP |
| Square social post | 1080 px (height 1080 px) | 1× or 2× | PNG or JPG |
| Quote or announcement graphic | 1080 px | 2× | PNG |
| Transparent component (badge, label, sticker) | Width of the component | 2× | PNG or WebP with a transparent background |
| Certificate, ticket or receipt | Match the design | 2×–3× | PNG |
| Quick preview or thumbnail | 600–800 px | 1× | JPG or WebP |
These are starting points. Platforms change their recommended sizes, so check the one you are posting to if exact dimensions matter.
Sharpness: which should I pick?
| Choose | When |
|---|---|
| 1× | A small preview or thumbnail where file size matters most. |
| 2× (sharp) | Most uses. Text stays crisp on retina screens. |
| 3× | A very detailed or large design. Files get bigger, and very large results are reduced automatically. |
PNG, JPG or WebP?
| Choose | When |
|---|---|
| PNG | Text, flat colours, graphics, and anything that needs a transparent background. |
| JPG | The design has photos or gradients and you want the smallest widely supported file. No transparency. |
| WebP | A smaller file than PNG or JPG for web use, with transparency if you need it. |
A tiny starter example
Everything here is inline, so there is nothing external to load. Paste it, set the page width to 1200, and convert.
<div style="width:1200px;height:630px;box-sizing:border-box;padding:80px;
background:linear-gradient(135deg,#1e3a8a,#6d28d9);color:#fff;
font-family:Arial,Helvetica,sans-serif;display:flex;flex-direction:column;
justify-content:center;">
<div style="font-size:28px;letter-spacing:2px;opacity:.8;">TEASOFT</div>
<h1 style="font-size:72px;line-height:1.1;margin:24px 0 0;">
Turn HTML into a <br> sharp image
</h1>
<p style="font-size:30px;margin:24px 0 0;opacity:.9;">
PNG, JPG or WebP, right in your browser.
</p>
</div> Tips for converting HTML to images
- Put your CSS in a style tag or inline, and avoid depending on external files.
- Use fonts that are available everywhere (Arial, Georgia, system fonts), or embed fonts if you need a specific one, and check the result.
- Set a background in your HTML for JPG, or choose a colour in Background, since JPG can't be transparent.
- Start at 2×, then drop to 1× if the file is bigger than you need.
- Don't rely on JavaScript to build your layout. Write the final HTML.
- Keep your HTML saved. Editing the code and converting again is quicker than editing a picture.
Frequently Asked Questions
How do I convert HTML to an image?
Open Teasoft's HTML to Image converter, paste your HTML and CSS (or open an .html file), set the page width, choose the sharpness and format, click Convert to image and download the result.
How do I convert HTML to PNG?
Paste your HTML, choose PNG under Save as, pick 2× sharpness for crisp text, and click Convert to image. PNG is lossless and keeps transparency.
Can I make a transparent PNG from HTML?
Yes. Set Background to Transparent and save as PNG or WebP. Transparency shows wherever your HTML doesn't set its own background colour. JPG can't be transparent.
Does it run JavaScript?
No. Scripts in your HTML are not run. Only the HTML and CSS are rendered, so write out the final markup rather than building it with JavaScript.
Can I convert a website URL to an image?
No. This tool converts HTML you provide, not a web address. To capture a live page, use your browser's screenshot feature, or copy the page's HTML into the tool.
Will images, fonts and CSS from other websites load?
They may not. For the best results, put your CSS in the HTML (inline or in a style tag), and embed images and fonts where you can. Always check the converted image.
What page size should I use?
Match the design: for example 1200 px wide for a social card (about 630 px tall) or 1080 px for a square post. Leave the height empty and the image will be as tall as your content.
What does the Sharpness setting do?
It sets how many pixels the image has. 1× is normal size. 2× makes the image twice as wide and tall, so text stays crisp on retina screens. 3× is larger still. Very large results are reduced automatically.
Why is my image blurry?
It is probably at 1×. Switch to 2× for crisp text. If it is still soft, check that your HTML isn't scaling a small image up.
Which format should I choose: PNG, JPG or WebP?
PNG for text, flat graphics and transparency. JPG for designs with photos or gradients where a small file matters and transparency isn't needed. WebP for a smaller file than PNG or JPG on the web, with transparency if you need it.
Why does my image look different from my browser?
The image is rendered from your HTML in a simplified way, so fonts, spacing and some effects may not match exactly. Use simple, widely supported CSS and fonts, and check the result.
Can I make a social media or Open Graph image with this?
Yes. Set the width to 1200 px with a height of about 630 px, design your card in HTML and CSS, and convert at 2× as PNG or JPG. Check the platform's current size guidance if exact dimensions matter.
Can I turn an HTML email or invoice into an image?
Yes, if the HTML and CSS are self-contained. Paste it in, set the width to match the layout, and convert. Check that every part of it appears in the image.
What happens to the background?
Wherever your HTML sets its own background, that is what appears. Elsewhere, the Background setting is used. Transparent works only for PNG and WebP, because JPG always needs a colour.
Is my HTML uploaded to a server?
No. Your HTML is rendered in your browser and never uploaded.
Can I use it on my phone?
Yes. The tool works in the browser on Android, iPhone, tablets and computers. You do not need to install an app, though pasting HTML is easier on a keyboard.
Is HTML to Image free?
Yes. It is free, with no sign-up, no watermark and no hidden fees.
About Teasoft's HTML to Image Converter
Teasoft's HTML to Image Converter is a free browser-based tool that turns HTML and CSS into a PNG, JPG or WebP image. Paste your code or open an .html file, choose the page size, sharpness and format, and download the result. Transparent backgrounds are supported for PNG and WebP.
It is made for developers, marketers, designers, bloggers and small business owners who want social cards, banners, quote graphics, certificates and snippets as images without opening a design tool.
Conversion runs locally in your browser. Your HTML is not sent to a server, and scripts in it are not run, so it stays on your device from the moment you paste it until you download the image.