• Whaaaaat!?

    A free web api for converting any html to images!

  • Slim and easy

    Slim programmed and easy to use.

  • High volume

    Generous limits for your projects.

Html2Image is perfect for converting any html pages into a picture.

API Status

Loading...

Sign up

Sign up, it's free. Get today your personal API key

Create your free account

Get your personal API key instantly. No credit card required.

Create Account

Already have an account? Login here

API Documentation

Our API is easy, fast, and powerful!

Base URL

https://www.html2image.net/api/api.php?

Required Parameters

ParameterTypeDescriptionExample
keystringYour personal API keykey=abc123
sourcestringURL of the page OR HTML code via POSTsource=https://example.com
typestringOutput format: png, jpg, gif, svg, pdftype=png

Source Options

You can provide content in two ways:

Option 1: URL (GET)

GET /api/api.php?key=[YOUR_KEY]&source=https://example.com&type=png

Option 2: HTML via POST NEW!

Send HTML directly for dynamic content generation:

POST /api/api.php?key=[YOUR_KEY]&type=svg
Content-Type: application/x-www-form-urlencoded

source=<html><body><h1>Hello World</h1></body></html>

Basic Options

ParameterTypeDescriptionRange
widthintWidth in pixels1-4096
heightintHeight in pixels1-4096
qualityintQuality (JPG only)1-100
zoomfloatZoom factor0.1-5.0

Rendering Options NEW!

ParameterTypeDescriptionValues
delayintJavaScript wait time (ms)0-30000
fullpageboolCapture entire pagetrue/false
transparentboolTransparent background (PNG)true/false
grayscaleboolGrayscale imagetrue/false

Examples

Basic Screenshot

https://www.html2image.net/api/api.php?key=[YOUR_KEY]&source=https://example.com&type=png

Full Page with Custom Width

https://www.html2image.net/api/api.php?key=[YOUR_KEY]&source=https://example.com&type=png&fullpage=true&width=1200

High Quality JPG

https://www.html2image.net/api/api.php?key=[YOUR_KEY]&source=https://example.com&type=jpg&quality=95&width=1920

Response

{
  "Status": "OK",
  "Link": "https://www.html2image.net/api/tmp/.../image.png",
  "Expires": "2024-12-24T15:30:00+01:00"
}

HTTP Status Codes

200Success
400Invalid parameters
401Invalid API key
429Rate limit exceeded
500Server error