Paste HTML code and get a PNG, JPEG or BMP image. Free, no signup. The C# code behind this converter is below.
Html Code:
Base Url:
Image Format:
Web Page Width:
px
Web Page Height:
px
(leave empty to auto detect)
Rendering Engine:
Free to use, no signup. The images carry a “Demo Version” watermark, which a SelectPdf library license removes.
Do this in your own app
C# / VB.NET
.NET library
Install from NuGet and convert HTML to an image in a few lines.
HtmlToImage converter = new HtmlToImage();
System.Drawing.Image image =
converter.ConvertHtmlString(htmlString, baseUrl);
image.Save("image.png", ImageFormat.Png);
See the .NET library
Free Community Edition
Free for commercial use and includes the HTML to image converter. PDFs are limited to 5 pages.
Get the Community Edition
ANY LANGUAGE
Need a PDF instead? HTML to PDF API
Convert HTML to PDF from any language. Get a free API key: 7-day trial, 200 conversions, no credit card.
curl https://selectpdf.com/api2/convert/ \
-d "key=YOUR_KEY" \
--data-urlencode "html=<h1>Hello World</h1>" \
-o document.pdf
Get a free API key
About this HTML to image converter
This converter renders the HTML you paste and saves it as a PNG, JPEG or BMP image, using the same engine as the SelectPdf library for .NET. The default Chromium engine renders HTML5, CSS3 and JavaScript; the converter also offers the older WebKit engines.
The image is as wide as the browser window your HTML is laid out in, 1,024 pixels by default, and as tall as the content unless you enter a height. If the HTML loads images, style sheets or scripts by relative paths, enter the address they come from as the base URL.
Questions
Paste the HTML into the box above, choose PNG, JPEG or BMP, and click Convert To Image. The image downloads as soon as the conversion is done.
Yes. The online converter is free to use and needs no signup. The images carry a “Demo Version” watermark, which a SelectPdf library license removes.
PNG, JPEG or BMP. Choose one in the Image Format list before you convert.
The width is the width of the browser window the HTML is laid out in, and the width of the image: 1,024 pixels by default. Leave the height empty and the image is as tall as the content; enter a height to cut the image to that many pixels.
Create an HtmlToImage object, call ConvertHtmlString with your HTML and base URL, and save the image it returns. The complete C# code of this page is below.
C# / ASP.NET code for this converter