barcoder.pro 1.0

Base URL: https://barcoder.pro

A free barcode and QR code API. Send one GET request, get an image back. Put the URL straight into an <img> tag, an email template, a label printer script, or curl.

Endpoints

GET/g/Any barcode or QR code, fully customisable

Generates a barcode in the symbology and image format you choose. Also accepts POST with the same parameters as form fields — useful when the data is too long for a URL.

Parameters

NameDescription
s requiredSymbology (barcode type). See the list below.
d requiredThe data to encode. URL-encode it.
fImage format: png (default), gif, jpeg or svg.
w, hImage width and height in pixels. By default the image is sized to fit the barcode.
sfScale factor. Default 1 for linear barcodes, 4 for QR and Data Matrix. Use sx / sy to scale one axis only.
pPadding in pixels. Default 10 for linear barcodes, 0 for QR and Data Matrix. Per side: pt, pr, pb, pl (or pv / ph).
bcBackground colour as hex without the #, e.g. FFF or FFFFFF. Default white. 4 or 8 digits add alpha (0FFF = transparent).
cmBar / module colour. Default 000.
csSpace colour. Default transparent (shows the background).
Text and matrix options
NameDescription
tcLabel text colour (linear barcodes). Default 000.
tsLabel text size. PNG/GIF/JPEG: built-in font 1–5 (default 1). SVG: font size (default 10).
thDistance of the label from the bars. Default 10.
tfLabel font family, SVG only. Default monospace.
msModule shape for QR / Data Matrix: s square (default), r round, x X-shaped.
mdModule density for QR / Data Matrix, 0–1. Default 1.
wn, wwNarrow and wide bar widths for Code 39, Codabar and ITF. Defaults 1 and 3.

Symbologies (s)

ValueType
qrQR code. Error correction: qr-l (default), qr-m, qr-q, qr-h.
dmtxData Matrix, square. dmtx-r rectangular. GS1: gs1-dmtx, gs1-dmtx-r.
code-128Code 128, automatic subset. Force one with code-128a, code-128b, code-128c.
ean-128GS1-128 (Code 128 with FNC1).
ean-13EAN-13. Use * for the check digit to have it calculated, e.g. 501234567890*.
ean-8EAN-8.
upc-a, upc-eUPC-A and UPC-E. * works for the check digit here too.
code-39Code 39. code-39-ascii for full ASCII.
code-93Code 93. code-93-ascii for full ASCII.
codabarCodabar.
itf, itf-14Interleaved 2 of 5.

Hyphens and case are ignored, so code-128, Code128 and CODE_128 are the same.

Examples

# QR code as SVG
https://barcoder.pro/g/?s=qr&d=https%3A%2F%2Fexample.com&f=svg

# Code 128 shipping label, double size
https://barcoder.pro/g/?s=code-128&d=PKG-00042&sf=2

# EAN-13 with the check digit calculated for you
https://barcoder.pro/g/?s=ean-13&d=501234567890*

# In HTML
<img src="https://barcoder.pro/g/?s=qr&d=Hello" alt="QR code">

# With curl
curl -o code.png "https://barcoder.pro/g/?s=code-128&d=PKG-00042"

Responses

CodeDescription
200The image, as image/png, image/gif, image/jpeg or image/svg+xml.
200 (empty)s or d is missing, or f is not a known format. An unknown s returns a blank image.

Try it

Generated barcode
GET/g2/Code 128 in one parameter, print resolution

The no-options endpoint. Pass your data, get a large Code 128 PNG — black bars on a transparent background — that stays sharp when scaled down onto a label or packing slip. No text is printed under the bars.

Parameters

NameDescription
d requiredThe data to encode. Any text Code 128 supports (ASCII). URL-encode it.

Examples

https://barcoder.pro/g2/?d=PKG-00042

# The image is large — set the display size yourself
<img src="https://barcoder.pro/g2/?d=PKG-00042" width="300" alt="PKG-00042">

curl -o label.png "https://barcoder.pro/g2/?d=PKG-00042"

Responses

CodeDescription
200image/png, 300 pixels tall, 50 pixels per bar module. Sent with Cache-Control: no-store, so it is never cached.

Try it

Generated barcode

Which one should I use?

Use /g2/ if all you need is a Code 128 barcode and you never want to think about options. Use /g/ for everything else: QR codes, retail codes (EAN / UPC), SVG output, colours, sizing, and human-readable text under the bars.