Skip to main content

Barcode API

Welcome to the Barcode API. This service supports generating several widely used barcode types, such as UPC-A, EAN-13, Code-128, and datamatrix.

Users can create barcodes by making HTTP requests with specific parameters to customize the output.

Base URL

https://quickchart.io/barcode

To generate a barcode, append parameters to the base URL as query strings. Here is a basic example:

https://quickchart.io/barcode?type=datamatrix&text=foo

Supported Parameters

ParameterRequiredDescriptionOptions
typeYesSpecifies the type of barcode to generate (see list below).
textYesThe data or text you want to encode in the barcode.
widthNoDesired width of the barcode in pixels.
heightNoDesired height of the barcode in pixels.
scaleNoA scaling factor for the barcode, affecting both width and height.
includeTextNoIf set, includes human-readable text (if supported by the barcode type).true, false
rotateNoControls the rotation of the barcode.N (Normal), R (Right), L (Left), I (Inverted)

Note on width and height

The width and height parameters are approximate for some barcode types due to specifications and drawing methods. The service aims to match the specified size as closely as possible, but the resulting barcode may be marginally larger or smaller.

Usage Examples

Basic Datamatrix Barcode

To generate a basic datamatrix barcode with the text "Hello, World!":

https://quickchart.io/barcode?type=datamatrix&text=Hello, World!

Custom Size Barcode

To create a barcode with a specific width and height:

https://quickchart.io/barcode?type=datamatrix&text=Custom Size&width=200&height=200

Barcode with Text and Rotation

To generate a barcode that includes human-readable text and is rotated 90 degrees clockwise:

https://quickchart.io/barcode?type=upca&text=12345678900&includeText=true&rotate=R

QR codes

We have a dedicated QR code API.

Supported Barcode Types

Barcode TypeDescription
auspostAusPost 4 State Customer Code
azteccodeAztec Code
azteccodecompactCompact Aztec Code
aztecruneAztec Runes
bc412BC412
channelcodeChannel Code
codablockfCodablock F
code11Code 11
code128Code 128
code16kCode 16K
code2of5Code 25
code32Italian Pharmacode
code39Code 39
code39extCode 39 Extended
code49Code 49
code93Code 93
code93extCode 93 Extended
codeoneCode One
coop2of5COOP 2 of 5
daftCustom 4 state symbology
databarexpandedGS1 DataBar Expanded
databarexpandedcompositeGS1 DataBar Expanded Composite
databarexpandedstackedGS1 DataBar Expanded Stacked
databarexpandedstackedcompositeGS1 DataBar Expanded Stacked Composite
databarlimitedGS1 DataBar Limited
databarlimitedcompositeGS1 DataBar Limited Composite
databaromniGS1 DataBar Omnidirectional
databaromnicompositeGS1 DataBar Omnidirectional Composite
databarstackedGS1 DataBar Stacked
databarstackedcompositeGS1 DataBar Stacked Composite
databarstackedomniGS1 DataBar Stacked Omnidirectional
databarstackedomnicompositeGS1 DataBar Stacked Omnidirectional Composite
databartruncatedGS1 DataBar Truncated
databartruncatedcompositeGS1 DataBar Truncated Composite
datalogic2of5Datalogic 2 of 5
datamatrixData Matrix
datamatrixrectangularData Matrix Rectangular
datamatrixrectangularextensionData Matrix Rectangular Extension
dotcodeDotCode
ean13EAN-13
ean13compositeEAN-13 Composite
ean14GS1-14
ean2EAN-2 (2 digit addon)
ean5EAN-5 (5 digit addon)
ean8EAN-8
ean8compositeEAN-8 Composite
flattermarkenFlattermarken
gs1-128GS1-128
gs1-128compositeGS1-128 Composite
gs1-ccGS1 Composite 2D Component
gs1datamatrixGS1 Data Matrix
gs1datamatrixrectangularGS1 Data Matrix Rectangular
gs1dldatamatrixGS1 Digital Link Data Matrix
gs1dlqrcodeGS1 Digital Link QR Code
gs1dotcodeGS1 DotCode
gs1northamericancouponGS1 North American Coupon
gs1qrcodeGS1 QR Code
hanxinHan Xin Code
hibcazteccodeHIBC Aztec Code
hibccodablockfHIBC Codablock F
hibccode128HIBC Code 128
hibccode39HIBC Code 39
hibcdatamatrixHIBC Data Matrix
hibcdatamatrixrectangularHIBC Data Matrix Rectangular
hibcmicropdf417HIBC MicroPDF417
hibcpdf417HIBC PDF417
hibcqrcodeHIBC QR Code
iata2of5IATA 2 of 5
identcodeDeutsche Post Identcode
industrial2of5Industrial 2 of 5
interleaved2of5Interleaved 2 of 5 (ITF)
isbnISBN
ismnISMN
issnISSN
itf14ITF-14
japanpostJapan Post 4 State Customer Code
kixRoyal Dutch TPG Post KIX
leitcodeDeutsche Post Leitcode
mailmarkRoyal Mail Mailmark
mandsMarks & Spencer
matrix2of5Matrix 2 of 5
maxicodeMaxiCode
micropdf417MicroPDF417
microqrcodeMicro QR Code
msiMSI Modified Plessey
onecodeUSPS Intelligent Mail
pdf417PDF417
pdf417compactCompact PDF417
pharmacodePharmaceutical Binary Code
pharmacode2Two-track Pharmacode
planetUSPS PLANET
plesseyPlessey UK
posicodePosiCode
postnetUSPS POSTNET
pznPharmazentralnummer (PZN)
qrcodeQR Code
rationalizedCodabarCodabar
rawCustom 1D symbology
rectangularmicroqrcodeRectangular Micro QR Code
royalmailRoyal Mail 4 State Customer Code
sscc18SSCC-18
swissqrcodeSwiss QR Code
symbolMiscellaneous symbols
telepenTelepen
telepennumericTelepen Numeric
ultracodeUltracode
upcaUPC-A
upcacompositeUPC-A Composite
upceUPC-E
upcecompositeUPC-E Composite