Generate barcode
generate_barcodeEncode a value into any of 35 barcode and QR symbologies and return the rendered image. Supports QR Code, Data Matrix, PDF417, Aztec, EAN-13, UPC-A, Code 128/39/93, ITF-14 and more. Returns SVG markup by default (or a data: URI when asked), plus a link to the online generator pre-filled with the same value. Use "type" with the canonical name from list_barcode_types; common spellings like "qr" or "code-128" are accepted. Linear formats such as EAN-13 enforce strict charset and length rules and will fail on invalid input.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Barcode symbology, e.g. "Qrcode", "Ean13", "Code128", "Datamatrix", "Pdf417", "gs1-128". | |
| value | Yes | The data to encode — a URL, product number, tracking code, phone number, Wi-Fi string, etc. | |
| format | No | Output encoding. "svg" returns XML markup; "data-uri" returns a ready-to-embed data: URL. | svg |
| height | No | Symbol height in pixels (linear formats mainly). | |
| caption | No | Optional human-readable text drawn under the symbol. Defaults to the value itself. | |
| showText | No | Draw the human-readable caption under the symbol. | |
| errorCorrection | No | QR error-correction level. Higher levels survive more damage but produce a denser symbol. Ignored by linear formats. | M |