Generate Tools API
Endpoints for generating QR codes, favicons, screenshots, and PDF captures from URLs. Some endpoints accept JSON instead of multipart/form-data -- check the content type for each endpoint.
QR Code Generate
/api/qr-generateGenerate a QR code image from text or URL. Send a JSON body (Content-Type: application/json). Customize colors, size, and error correction level.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Required | Content to encode in the QR code (text, URL, WiFi config, etc.) |
size | number | Optional | Size of the QR code in pixels. Default: 300 |
errorCorrection | string | Optional | Error correction level: "L" (7%), "M" (15%), "Q" (25%), "H" (30%). Default: "M" |
fgColor | string | Optional | Foreground color as hex (e.g. "#000000"). Default: "#000000" |
bgColor | string | Optional | Background color as hex (e.g. "#ffffff"). Default: "#ffffff" |
PNG imagecurl -X POST https://freefiletools.io/api/qr-generate \
-H "x-api-key: fft_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"text": "https://freefiletools.io",
"size": 400,
"errorCorrection": "H",
"fgColor": "#f97316",
"bgColor": "#ffffff"
}' \
-o qrcode.pngFavicon Generate
/api/favicon-generateGenerate a complete favicon package from a source image. Returns a ZIP file containing multiple favicon sizes (16x16, 32x32, 48x48, etc.) and an ICO file.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Source image file (PNG, JPG, or SVG recommended) |
ZIP file containing favicon filescurl -X POST https://freefiletools.io/api/favicon-generate \
-H "x-api-key: fft_your_api_key" \
-F "file=@logo.png" \
-o favicons.zipHTML to Image
/api/html-to-imageCapture a screenshot of a web page. Send a JSON body (Content-Type: application/json). Customize the viewport size and output format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Required | URL to capture (must include https://) |
format | string | Optional | Output format: "png" or "jpg". Default: "png" |
width | number | Optional | Viewport width in pixels. Default: 1280 |
height | number | Optional | Viewport height in pixels. Default: 800 |
PNG or JPG imagecurl -X POST https://freefiletools.io/api/html-to-image \
-H "x-api-key: fft_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"format": "png",
"width": 1440,
"height": 900
}' \
-o screenshot.pngURL to PDF
/api/url-to-pdfConvert a web page to a PDF document. Send a JSON body (Content-Type: application/json). The page is fully rendered before conversion.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Required | URL to convert (must include https://) |
PDF filecurl -X POST https://freefiletools.io/api/url-to-pdf \
-H "x-api-key: fft_your_api_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' \
-o page.pdf