services / barcode
utilityoperational · 10 ms
Barcode Generator
Generate a barcode as PNG (base64): code128 (default), ean13, ean8, upca, upce, code39, itf14, gs1_128, isbn, datamatrix, pdf417, aztec or qr. Validates check digits for EAN/UPC. Use for labels, shipping, inventory, tickets or invoices. Params: text (required), type, scale (1-8, default 3), include_text boolean (human-readable text under the bars).
Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.
Call it
Input
| Field | Type | Description |
|---|---|---|
| text * | string | Data to encode |
| type | code128 | ean13 | ean8 | upca | upce | code39 | itf14 | gs1_128 | isbn | datamatrix | pdf417 | aztec | qr = "code128" | |
| scale | integer = 3 | |
| include_text | boolean = true |
Output
| Field | Type | Description |
|---|---|---|
| image_base64 | string | Base64-encoded PNG |
| format | png | |
| type | string | |
| text | string | |
| width | integer | |
| height | integer | |
| size_bytes | integer |
Example response (data)
{
"image_base64": "iVBORw0KGgoAAAANSUhEUgAAAM...",
"format": "png",
"type": "ean13",
"text": "4006381333931",
"width": 342,
"height": 132,
"size_bytes": 1840
}