Free Barcode API

Put a URL in an image tag, a spreadsheet or a label template and get a barcode back as a PNG. No API key, no account, no request to sign.

Free, no API key111 barcode typesPNG from a URLBusiness use OK

This URL

https://useqrkit.com/barcode?bcid=code128&text=ABC-12345&includetext

returns this image, drawn live by the API:

Code 128 barcode for ABC-12345

Quick start

One URL, One Barcode

Every request is a GET to https://useqrkit.com/barcode with the barcode type in bcid and the value in text. URL-encode the value so spaces, & and # survive.

HTML

<img src="https://useqrkit.com/barcode?bcid=code128&text=ABC-12345&includetext"
     alt="Code 128 barcode for ABC-12345">

Google Sheets or Excel (value in A1)

=IMAGE("https://useqrkit.com/barcode?bcid=code128&includetext&text="&ENCODEURL(A1))

JavaScript

const src = "https://useqrkit.com/barcode?" +
  new URLSearchParams({ bcid: "ean13", text: "590123412345", includetext: "" });

Download with curl

curl -o label.png "https://useqrkit.com/barcode?bcid=gs1-128&text=(01)09521234543213(10)ABC123&includetext&scale=3"

In Google Sheets, the first time a spreadsheet loads an outside image it asks you to Allow access. Click it once and the barcodes appear. Need QR codes from a formula instead? See the Google Chart API QR code replacement.

Barcode types

Common bcid Values

Each image below is drawn live from its URL. The API supports 111 types in all; these are the ones most people need.

Code 128 barcode for ABC-12345

Code 128

Shipping, inventory and asset labels

bcid=code128

GS1-128 barcode for (01)09521234543213(10)ABC123

GS1-128

Cases and pallets with GS1 data

bcid=gs1-128

EAN-13 barcode for 590123412345

EAN-13

Retail products outside the US

bcid=ean13

UPC-A barcode for 03600029145

UPC-A

Retail products in the US and Canada

bcid=upca

ISBN barcode for 978-1-56581-231-4

ISBN

Books

bcid=isbn

Code 39 barcode for CODE39

Code 39

Older industrial and ID systems

bcid=code39

ITF-14 barcode for 15400141288763

ITF-14

Outer cartons

bcid=itf14

Data Matrix barcode for QRKIT-12345

Data Matrix

Small parts and electronics

bcid=datamatrix

GS1 DataMatrix barcode for (01)09521234543213(17)261231(10)ABC123

GS1 DataMatrix

Healthcare and products with expiry dates

bcid=gs1datamatrix

PDF417 barcode for QRKIT-12345

PDF417

Boarding passes, IDs, shipping

bcid=pdf417

Aztec barcode for QRKIT-12345

Aztec

Tickets and transport

bcid=azteccode

QR Code barcode for https://useqrkit.com

QR Code

Links people scan with a phone

bcid=qrcode

Reference

Parameters

The names are the ones the bwip-js library uses, so a URL written for the bwip-js online API works here unchanged.

ParameterWhat it does
bcidRequired. The barcode type, such as code128, ean13, upca, qrcode or datamatrix. See the table below.
textRequired. The value to encode, URL-encoded.
includetextPrints the value under the bars. Add it with no value, or set includetext=false.
scalePixels per module, 1 to 10. Left out, it is 2. scaleX and scaleY set each direction.
heightBar height in millimetres for linear barcodes, such as height=15.
rotateN (normal), R (90° clockwise), L (90° counterclockwise) or I (180°).
barcolor, backgroundcolor, textcolorHex colors such as 1A1A1A. The background is white unless you change it.
paddingThe quiet zone on every side. Left out, linear barcodes get 10 modules left and right and 2D codes get 4 all round. As in bwip-js, it counts modules for linear codes and half-modules for 2D codes.
alttext, parsefnc, eclevel, version, columns, rowsPassed to the encoder for types that use them, as in the bwip-js documentation.
  • A mistake, such as a wrong check digit or letters in an EAN, gets a 400 response with a one-line plain-text reason.
  • Images can be up to 4,000,000 pixels. Lower the scale if a long Code 128 goes over.
  • The same URL always draws the same image, so responses are cached for a year.
  • Parameters not listed here are ignored rather than refused.
  • An ISBN needs its hyphens, like 978-1-56581-231-4. For the bare 13-digit number, use bcid=ean13.

Switching over

Moving From TEC-IT or the bwip-js Online API

Two barcode image URLs show up in most old tutorials and templates. TEC-IT's free generator is offered for non-commercial sites in return for a back-link, and the bwip-js online API is a single community-run server whose own documentation suggests hosting your own. If you rely on either, this API reads the same parameters, so the change is the start of the URL.

ReplaceWith
https://barcode.tec-it.com/barcode.ashx?https://useqrkit.com/barcode?
https://bwipjs-api.metafloor.com/?https://useqrkit.com/barcode?

TEC-IT parameters we read

data
The value to encode
code
The barcode type: Code128 (the default), EAN13, EAN8, UPCA, Code39, Code25IL, QRCode, MobileQRCode, DataMatrix, PDF417 and others
dpi
Size: 96 dpi, TEC-IT's default, is scale 2
rotation
0, 90, 180 or 270
color, bgcolor
Bar and background colors
hidehrt
Hide the text under linear barcodes, which shows by default
eclevel
QR code error correction

The answer is always a PNG, whatever imagetype asks for; image tags and spreadsheets accept it either way. TEC-IT's escape sequences (translate-esc) are not translated, so send GS1 data in the bwip-js form, such as bcid=gs1-128&text=(01)09521234543213.

Barcode API: FAQ

Making a handful of barcodes by hand? The barcode generator draws them in your browser and exports PNG, SVG or PDF, and the check digit calculator checks up to 500 numbers at once.

Writing a tutorial or template that uses this API? A link to this page is appreciated, but never required.