BarcodeReady Logo

Barcode API for Developers

Generate barcode images from your own application with a single HTTP GET request. No API key, no registration, no watermarks — just a URL that returns a PNG or SVG.

Endpoint

GET https://barcodeready.com/api/barcode?type=ean13&data=5901234123457

The response is the image itself, so the URL works directly in an <img> tag, a spreadsheet, a WMS document template, or any HTTP client. CORS is enabled and responses are cached for 24 hours.

Live example

EAN-13 barcode generated by the BarcodeReady API
<!-- This image is generated by the API on the fly -->
<img src="https://barcodeready.com/api/barcode?type=ean13&data=5901234123457">

Query parameters

Parameter Required Description
type yes Barcode type — see the list of supported types below.
data yes Content to encode (max 500 characters). Remember to URL-encode special characters.
format no Output format: png (default) or svg.
scale no Module scale from 1 to 8. Default: 3. Higher values produce larger, sharper PNGs.
height no Bar height in millimeters for 1D codes (5-60). Default: 12. Ignored for QR, DataMatrix and PDF417.
includetext no Print the human-readable text under the code: true (default) or false.

Supported barcode types

code128 — CODE128 gs1-128 — GS1-128 ean13 — EAN-13 ean8 — EAN-8 upca — UPC-A itf14 — ITF-14 code39 — CODE39 qrcode — QR Code datamatrix — DataMatrix pdf417 — PDF417

</> Code examples

cURL

curl -o barcode.png "https://barcodeready.com/api/barcode?type=code128&data=INV-2026-001"

JavaScript

const res = await fetch('https://barcodeready.com/api/barcode?type=qrcode&data=hello&format=svg');
const svg = await res.text();

Python

import requests

r = requests.get("https://barcodeready.com/api/barcode",
    params={"type": "ean13", "data": "5901234123457", "format": "png"})
with open("barcode.png", "wb") as f:
    f.write(r.content)

PHP

file_put_contents('barcode.png',
    file_get_contents('https://barcodeready.com/api/barcode?type=itf14&data=15901234123457'));

! Error handling

Invalid requests return HTTP 400 with a JSON body describing the problem, including standards validation from the generation engine (wrong check digit, wrong length, invalid characters).

{ "error": "bwipp.ean13badLength: EAN-13 must be 12 or 13 digits", "docs": "https://barcodeready.com/developers" }

Fair use

The API is free for reasonable production use and is rate-limited per IP address. If you embed it in a public product or documentation, a link back to barcodeready.com is appreciated. For high-volume use, get in touch via the contact page.