Supported Formats

Barcode Format Reference Guide

Comprehensive documentation for all 19 barcode formats supported by our API, plus 3 coming soon. Learn about each format's capabilities, use cases, and technical specifications.

Free Pro Enterprise Coming Soon

QR Code

2D Barcode

The most popular 2D barcode for mobile scanning

Specifications

Capacity Up to 7,089 numeric or 4,296 alphanumeric characters
Error Correction L (7%), M (15%), Q (25%), H (30%)
Module Size 21×21 to 177×177
Generate QR Code

QR Code (Quick Response Code) is a two-dimensional matrix barcode invented in 1994 by Denso Wave, a Japanese automotive company. Originally designed for tracking parts in vehicle manufacturing, it has become the most widely used 2D barcode format worldwide.

QR codes can store various types of data including URLs, text, contact information, WiFi credentials, and more. They can hold up to 7,089 numeric characters or 4,296 alphanumeric characters, making them incredibly versatile for many applications.

One of the key features of QR codes is their error correction capability. Even if part of the code is damaged or obscured, it can still be read. This makes them ideal for printed materials that may get worn or partially covered.

Common use cases include mobile payments, product packaging, event tickets, restaurant menus, marketing campaigns, and authentication systems.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/qrcode?data=EXAMPLE123"

Code 128

1D Barcode

High-density alphanumeric barcode for logistics

Specifications

Characters All 128 ASCII characters
Density High (11 modules per character)
Check Digit Modulo 103 (mandatory)
Generate Code 128

Code 128 is a high-density linear barcode symbology defined in ISO/IEC 15417:2007. It is used extensively in logistics and transportation industries for ordering, distribution, and supply chain management.

The symbology can encode all 128 ASCII characters, making it highly versatile. It uses three different character sets (A, B, and C) to optimize the barcode length depending on the data being encoded. Character set C is particularly efficient for encoding numeric data.

Code 128 includes a mandatory check digit for data integrity verification. The barcode automatically calculates this check digit, ensuring that scanning errors are detected. This makes it one of the most reliable 1D barcode formats available.

It is commonly used in shipping labels, inventory management, product identification, and anywhere alphanumeric data needs to be encoded in a compact format.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/code128?data=EXAMPLE123"

Code 39

1D Barcode

Self-checking barcode used in automotive and defense

Specifications

Characters A-Z, 0-9, -.$/+% and space
Density Low to medium
Check Digit Optional (Modulo 43)
Generate Code 39

Code 39, also known as Alpha39 or Code 3 of 9, is one of the oldest barcode symbologies still in widespread use. Developed in 1974, it was the first barcode to encode alphabetic characters along with numbers.

The symbology is self-checking, meaning a single printing defect will not cause a wrong character to be read. Each character is represented by 9 elements (5 bars and 4 spaces), where 3 of the 9 elements are wide, giving the code its name.

Code 39 can encode uppercase letters A-Z, digits 0-9, and special characters including space, minus, plus, period, dollar sign, slash, and percent. While it has lower data density than Code 128, its simplicity and reliability make it popular for many applications.

It is the standard barcode used by the United States Department of Defense (LOGMARS) and is widely used in automotive, healthcare, and manufacturing industries.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/code39?data=EXAMPLE123"

Codabar

1D Barcode

Legacy format for libraries and blood banks

Specifications

Characters 0-9, -$:/.+ and A-D (start/stop)
Density Low
Check Digit Optional
Generate Codabar

Codabar, also known as NW-7 or USD-4, was developed in 1972 by Pitney Bowes. It was one of the first barcode symbologies to be widely adopted and remains in use today in specific industries.

The symbology uses a simple encoding scheme with 4 different bar widths. It can encode digits 0-9 and six special characters (- $ : / . +). Four start/stop characters (A, B, C, D) are used to mark the beginning and end of the barcode.

While Codabar has been largely superseded by more modern barcodes in many applications, it remains the standard in certain fields due to legacy system requirements and the cost of transitioning to new formats.

Primary applications include blood banks, photo labs, FedEx airbills, and library systems. The American Blood Commission adopted Codabar as the standard for blood identification in 1977.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/codabar?data=EXAMPLE123"

EAN-13

1D Barcode

International product identification standard

Specifications

Digits 13 (including check digit)
Structure Country + Manufacturer + Product + Check
Check Digit Modulo 10 (mandatory)
Generate EAN-13

EAN-13 (European Article Number) is the international standard for product identification barcodes used in retail worldwide. Developed in 1976 as an extension of the American UPC-A format, it is now administered by GS1.

The barcode consists of 13 digits: a country code (2-3 digits), manufacturer code (4-5 digits), product code (4-5 digits), and a check digit. This structure allows for over one trillion unique product identifiers.

EAN-13 is the most widely used barcode format in global retail. Every product sold in supermarkets and retail stores outside North America uses this format. It is compatible with UPC-A, as UPC codes can be expressed as EAN-13 with a leading zero.

Applications include retail point-of-sale, inventory management, supply chain tracking, and price lookup systems. Publishers use a variant called ISBN-13 for book identification.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/ean13?data=EXAMPLE123"

EAN-8

1D Barcode

Compact version for small products

Specifications

Digits 8 (including check digit)
Structure Country + Product + Check
Check Digit Modulo 10 (mandatory)
Generate EAN-8

EAN-8 is a shortened version of the EAN-13 barcode, designed for use on small products where a full EAN-13 barcode would be too large. It was introduced alongside EAN-13 as part of the European Article Numbering system.

The barcode contains only 8 digits: a 2-3 digit country code, a 4-5 digit product code, and a single check digit. Due to the limited number space, EAN-8 codes are assigned by national GS1 organizations and are typically restricted to very small products.

Despite its compact size, EAN-8 maintains the same level of reliability as EAN-13. The check digit calculation is identical, ensuring data integrity at the point of sale.

Common applications include small confectionery items, cosmetics, cigarettes, and other products where space is at a premium. Manufacturers must apply for EAN-8 allocation and demonstrate that EAN-13 is not practical for their product.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/ean8?data=EXAMPLE123"

UPC-A

1D Barcode

North American retail standard

Specifications

Digits 12 (including check digit)
Structure System + Manufacturer + Product + Check
Check Digit Modulo 10 (mandatory)
Generate UPC-A

UPC-A (Universal Product Code) is the standard barcode format used for retail products in the United States and Canada. Introduced in 1974, it was the first barcode format to be widely adopted in retail.

The barcode consists of 12 digits: a single digit number system, a 5-digit manufacturer code, a 5-digit product code, and a check digit. The number system digit indicates the type of product (0 for regular items, 2 for weighted items, etc.).

UPC-A revolutionized retail by enabling automated checkout and inventory management. The first product scanned with a UPC barcode was a pack of Wrigley's gum at a Marsh supermarket in Ohio on June 26, 1974.

While primarily used in North America, UPC-A is compatible with the global EAN-13 system. Any UPC-A code can be converted to EAN-13 by adding a leading zero, enabling international trade.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/upca?data=EXAMPLE123"

UPC-E

1D Barcode

Zero-suppressed UPC for small packages

Specifications

Digits 8 (6 + implicit check)
Compression Zero suppression algorithm
Check Digit Modulo 10 (encoded in parity)
Generate UPC-E

UPC-E is a compressed version of UPC-A, designed for small packages where space is limited. It uses "zero suppression" to encode a 12-digit UPC-A code in just 6 visible digits plus a check digit.

The compression works by removing zeros from specific positions in the UPC-A code. Only UPC-A codes with zeros in certain positions can be converted to UPC-E format. The scanner automatically expands UPC-E back to UPC-A for processing.

Despite its compact size, UPC-E maintains full compatibility with UPC-A systems. The same product information is encoded, just in a smaller space. This makes it ideal for small items that need to be tracked through the same supply chain as larger products.

Common applications include small health and beauty products, candy bars, single-serve beverages, and any product where a standard UPC-A barcode would dominate the package design.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/upce?data=EXAMPLE123"

ITF-14

1D Barcode

Shipping container barcode standard

Specifications

Digits 14 (GTIN-14 format)
Structure Indicator + GTIN-13 + Check
Bearer Bars Recommended for corrugated printing
Generate ITF-14

ITF-14 (Interleaved Two of Five) is a GS1 standard barcode used primarily for marking shipping containers and cartons. The "14" refers to the 14 digits it encodes, which represent a Global Trade Item Number (GTIN-14).

The barcode uses the Interleaved 2 of 5 symbology, where digits are encoded in pairs—one in the bars and one in the spaces between them. This interleaving technique creates a compact and efficient barcode.

ITF-14 is designed to be printed directly on corrugated cardboard, which is why it often includes bearer bars (thick bars framing the code). These bearer bars ensure consistent print quality and protect against edge damage.

The primary application is logistics and supply chain management. ITF-14 identifies the packaging level of a product—whether it's a case, pallet, or other shipping unit containing multiple retail items, each with their own EAN/UPC codes.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/itf14?data=EXAMPLE123"

Data Matrix

2D Barcode

High-density code for industrial marking

Specifications

Capacity Up to 2,335 alphanumeric characters
Error Correction Reed-Solomon (up to 30%)
Size 10×10 to 144×144 modules
Generate Data Matrix

Data Matrix is a two-dimensional barcode consisting of black and white cells arranged in a square or rectangular pattern. Developed in 1989, it is widely used for marking small items and in industrial settings.

The code can store up to 2,335 alphanumeric characters or 3,116 numeric digits. It uses Reed-Solomon error correction, allowing up to 30% of the code to be damaged while still being readable.

Data Matrix is particularly popular for direct part marking (DPM)—permanently marking components with laser etching, dot peen, or chemical etching. The electronics, automotive, and aerospace industries use it extensively for component traceability.

The United States Electronic Industries Alliance (EIA) recommends Data Matrix for marking small electronic components. It is also used for postal marking, document management, and pharmaceutical packaging (often with GS1 identifiers).

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/datamatrix?data=EXAMPLE123"

PDF417

2D Barcode

Stacked barcode for ID cards and transport

Specifications

Capacity Up to 1,850 alphanumeric characters
Error Correction Reed-Solomon (levels 0-8)
Structure Stacked linear (3-90 rows)
Generate PDF417

PDF417 is a stacked linear barcode format invented by Ynjiun Wang at Symbol Technologies in 1991. The name comes from "Portable Data File" and the fact that each pattern in the code consists of 4 bars and spaces, with each pattern being 17 units long.

Unlike true 2D barcodes, PDF417 is actually a stacked set of linear barcodes. This design allows it to be read by simpler linear scanners, while still providing high data capacity—up to 1,850 alphanumeric characters or 2,710 numeric digits.

PDF417 includes robust error correction using Reed-Solomon codes. The error correction level can be adjusted from 0 to 8, with higher levels providing more redundancy at the cost of barcode size.

Primary applications include government-issued IDs (US driver's licenses, military IDs), airline boarding passes, shipping labels, and inventory management. The International Air Transport Association (IATA) adopted PDF417 for boarding passes in 2005.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/pdf417?data=EXAMPLE123"

Aztec Code

2D Barcode

Space-efficient code for transport tickets

Specifications

Capacity Up to 3,832 numeric or 3,067 alphabetic
Error Correction Reed-Solomon (5-95%)
Quiet Zone Not required
Generate Aztec Code

Aztec Code is a two-dimensional barcode invented by Andrew Longacre Jr. and Robert Hussey at Welch Allyn in 1995. Named for its central finder pattern that resembles an Aztec pyramid from above, it was designed for easy printing and decoding.

Unlike QR codes, Aztec codes don't require a quiet zone (white border) around them. This makes them more space-efficient when printed in tight spaces. They can encode up to 3,832 numeric digits or 3,067 alphabetic characters.

The code uses Reed-Solomon error correction, with configurable redundancy from 5% to 95%. The central bullseye pattern makes it easy for scanners to locate and orient the code, even when printed at small sizes or at angles.

Aztec Code is the standard barcode for electronic ticketing in transportation. Deutsche Bahn (German Railways), Eurostar, and many other rail operators use it for mobile tickets. It is also used in healthcare for patient identification and specimen tracking.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/aztec?data=EXAMPLE123"
Pro

GS1-128

1D Barcode

Supply chain standard with Application Identifiers

Specifications

Base Symbology Code 128 with FNC1
Data Structure Application Identifiers (AI)
Common AIs GTIN (01), Batch (10), Expiry (17), Serial (21)
Generate GS1-128

GS1-128, formerly known as UCC/EAN-128, is a barcode standard based on Code 128 that uses Application Identifiers (AIs) to encode supply chain data. It is the global standard for logistics, healthcare, and retail distribution.

Application Identifiers are standardized prefixes that define the type and format of the data that follows. Common AIs include (01) for GTIN, (10) for batch/lot number, (17) for expiration date, (21) for serial number, and many more.

The barcode uses an FNC1 character after the start code to indicate GS1-128 format. Variable-length data fields are separated by FNC1 characters, while fixed-length fields use their defined length. This enables multiple data elements in a single barcode.

GS1-128 is mandatory for shipping labels in many industries. It enables full traceability from manufacturer to point of sale, supports pharmaceutical serialization, food safety tracking, and is required for compliance with regulations like the FDA Drug Supply Chain Security Act (DSCSA).

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/gs1-128?data=EXAMPLE123"
Pro

GS1 DataMatrix

2D Barcode

Pharmaceutical and healthcare traceability

Specifications

Base Symbology Data Matrix ECC 200 with FNC1
Data Structure Application Identifiers (AI)
Typical Size 14×14 to 26×26 modules
Generate GS1 DataMatrix

GS1 DataMatrix combines the Data Matrix symbology with GS1 Application Identifiers, creating a compact 2D barcode ideal for pharmaceutical and healthcare applications. It follows the same AI structure as GS1-128 but in a smaller footprint.

The barcode begins with an FNC1 character to indicate GS1 format, followed by Application Identifiers and their data. This allows encoding of GTIN, serial numbers, batch/lot numbers, and expiration dates in a very small space.

GS1 DataMatrix is the preferred format for direct part marking on small medical devices and pharmaceutical packaging. Its small size and high data capacity make it ideal for blister packs, vials, and individual doses.

Regulatory compliance drives adoption: the EU Falsified Medicines Directive (FMD), US FDA UDI requirements, and similar regulations worldwide require GS1 DataMatrix on pharmaceutical and medical device packaging for traceability and anti-counterfeiting.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/gs1-datamatrix?data=EXAMPLE123"
Enterprise

USPS Intelligent Mail

Postal Barcode

US postal service 65-bar routing code

Specifications

Bars 65 bars in 4 states
Tracking Code 20 digits (barcode ID + service + mailer + serial)
Routing Code 0, 5, 9, or 11 digits (ZIP code)
Generate USPS Intelligent Mail

The Intelligent Mail Barcode (IMB), also known as the 4-State Customer Barcode, is a 65-bar code used by the United States Postal Service (USPS) for mail routing and tracking. It replaced POSTNET and PLANET barcodes in 2013.

The barcode encodes 31 digits of data: a 20-digit tracking code (barcode ID, service type, mailer ID, and serial number) and an optional 0, 5, 9, or 11-digit routing code (ZIP code information). This enables both tracking and delivery point routing.

IMB uses four bar states: full bar, ascender (top half), descender (bottom half), and tracker (middle third). This 4-state encoding allows high data density while maintaining readability by high-speed mail sorting machines.

Using IMB qualifies mailers for postal discounts and provides full visibility into mail delivery. The USPS Informed Visibility service uses IMB data to provide real-time tracking of mail pieces through the postal network.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/imb?data=EXAMPLE123"
Enterprise

Royal Mail 4-State

Postal Barcode

UK postal service customer barcode

Specifications

Character Set A-Z, 0-9
Structure Postcode + DPS + Check digit
Bar States 4 (full, ascender, descender, tracker)
Generate Royal Mail 4-State

Royal Mail 4-State Customer Code (RM4SCC) is a barcode used by Royal Mail, the UK postal service, for automated mail sorting. It encodes the postcode and Delivery Point Suffix (DPS) to route mail to the correct address.

The barcode uses four bar states similar to other postal codes: full bar, ascender, descender, and tracker. It can encode uppercase letters A-Z and digits 0-9, allowing the full UK postcode format plus delivery point information.

RM4SCC is designed for Cleanmail and Mailsort services, which offer discounts for pre-sorted mail. Mailers who print the barcode on their mail pieces receive reduced postage rates in exchange for reducing Royal Mail's sorting workload.

The barcode includes start and stop characters plus a check digit for error detection. When properly printed in the delivery address area, it enables automated sorting at high speeds, reducing manual handling and improving delivery times.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/rms4cc?data=EXAMPLE123"
Enterprise

Dutch PostNL KIX

Postal Barcode

Netherlands postal service code

Specifications

Character Set A-Z, 0-9
Structure Postcode (4 digits + 2 letters) + House number
Bar States 4 (full, ascender, descender, tracker)
Generate Dutch PostNL KIX

KIX (Klant IndeX) is a barcode used by PostNL, the Dutch postal service, for automated mail sorting. It encodes the postcode and house number to enable automated delivery point sorting.

The barcode format is similar to Royal Mail 4-State, using four bar heights to encode data. It can encode uppercase letters and digits, matching the Dutch address format of postcode (4 digits + 2 letters) plus house number.

KIX codes are used for bulk mailings and enable mailers to receive postal discounts. By pre-sorting mail and printing the barcode, mailers reduce PostNL's processing costs and receive reduced postage rates.

The barcode is designed for high-speed automated sorting machines. When printed according to PostNL specifications, mail pieces can be sorted to the individual delivery point without manual intervention.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/kix?data=EXAMPLE123"
Enterprise

POSTNET

Postal Barcode

Legacy US ZIP code barcode

Specifications

Digits 5, 9, or 11 (ZIP, ZIP+4, or DPBC)
Bar Heights 2 (full and half)
Check Digit Sum of digits divisible by 10
Generate POSTNET

POSTNET (Postal Numeric Encoding Technique) was the barcode used by the United States Postal Service from 1983 to 2013 for encoding ZIP codes on mail. It has been replaced by the Intelligent Mail Barcode but is still recognized by USPS equipment.

The barcode uses two bar heights (full and half) to encode numeric data. Each digit is represented by a pattern of five bars, with exactly two tall bars per digit. Frame bars at the start and end ensure proper scanning.

POSTNET can encode 5-digit ZIP codes, 9-digit ZIP+4 codes, or 11-digit Delivery Point Barcodes (DPBC). The 11-digit version includes the ZIP+4 plus a 2-digit delivery point code for the specific address.

While no longer required for postal discounts (IMB is now used), POSTNET remains widely supported for legacy systems. Some mailers continue to use it for internal tracking or when interfacing with older sorting equipment.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/postnet?data=EXAMPLE123"
Enterprise

PLANET

Postal Barcode

Legacy USPS tracking barcode

Specifications

Digits 11 or 13
Structure Service code + Tracking number + Check
Bar Heights 2 (inverted from POSTNET)
Generate PLANET

PLANET (Postal Alpha Numeric Encoding Technique) was a barcode used by the United States Postal Service for mail tracking and confirmation services. Like POSTNET, it has been superseded by the Intelligent Mail Barcode.

The barcode encodes either 11 or 13 digits: a 2-digit service code followed by a 9 or 11-digit tracking number and a check digit. The service code identifies the type of service (Delivery Confirmation, Signature Confirmation, etc.).

PLANET uses the same two-height bar encoding as POSTNET but with the bar heights inverted—the patterns are essentially the "negative" of POSTNET. This allowed USPS equipment to distinguish between the two barcode types.

While PLANET is no longer used for new mailings, it remains important for legacy systems and historical mail tracking. Some USPS services may still process PLANET codes for backward compatibility.

Example API Request
curl -H "X-API-Key: your-key" \
  "https://api.bargen.pro/v1/barcode/planet?data=EXAMPLE123"
Coming Soon

Micro QR

2D Barcode

Compact QR code for limited space applications

Specifications

Capacity Up to 35 alphanumeric or 21 bytes
Versions M1 (11×11) to M4 (17×17)
Error Correction L, M, Q (version dependent)

Micro QR Code is a smaller version of the standard QR Code, designed for applications where space is extremely limited. Developed by Denso Wave in 2004, it maintains the core benefits of QR codes while using less space.

Unlike standard QR codes which have three finder patterns, Micro QR has only one, significantly reducing the required area. It comes in four versions (M1-M4) with capacities ranging from 5 numeric digits to 35 alphanumeric characters.

The format is ideal for small electronic components, tiny product labels, and applications where a full QR code would be too large. It uses the same Reed-Solomon error correction as standard QR codes.

Micro QR is commonly used in electronics manufacturing, small pharmaceutical labels, and any application requiring machine-readable data in extremely limited space.

API Coming Soon

This barcode format is currently in development. Subscribe to our newsletter to be notified when it becomes available.

Coming Soon

Han Xin Code

2D Barcode

Chinese standard for native character encoding

Specifications

Capacity Up to 7,829 Chinese characters
Size 23×23 to 189×189 modules
Error Correction L1 (8%), L2 (15%), L3 (23%), L4 (30%)

Han Xin Code is a two-dimensional matrix barcode developed in China as a national standard (GB/T 21049-2007). It was designed specifically to efficiently encode Chinese characters (Hanzi) and other East Asian scripts.

The code uses a unique encoding system that allows Chinese characters to be stored more efficiently than in other 2D barcodes. It can encode up to 7,829 characters in Chinese mode or 4,350 characters in binary mode.

Han Xin Code features a distinctive alignment pattern and supports four error correction levels. It is particularly useful for applications in China requiring large amounts of Chinese text to be encoded.

Primary applications include government documents, logistics in China, and any application requiring efficient encoding of Chinese language content in barcode format.

API Coming Soon

This barcode format is currently in development. Subscribe to our newsletter to be notified when it becomes available.

Coming Soon

MaxiCode

2D Barcode

UPS package tracking standard

Specifications

Capacity 93 alphanumeric or 138 numeric characters
Size Fixed 1 inch square (866 hexagons)
Error Correction Reed-Solomon (up to 8% damage)

MaxiCode is a 2D barcode consisting of a central bullseye finder pattern surrounded by a hexagonal grid of modules. Developed by UPS in 1992, it was designed specifically for high-speed package sorting.

The code has a fixed size of 1 inch square and can encode up to 93 alphanumeric characters. It uses Reed-Solomon error correction and can withstand up to 8% damage while remaining readable.

MaxiCode's unique hexagonal pattern allows it to be read from any orientation and at high speeds—critical for automated package sorting conveyor systems. UPS uses it as their primary package tracking barcode.

Beyond package tracking, MaxiCode is used in automated industrial systems and anywhere high-speed omni-directional scanning is required. It became an international standard (ISO/IEC 16023) in 2000.

API Coming Soon

This barcode format is currently in development. Subscribe to our newsletter to be notified when it becomes available.

Ready to Start Generating?

Create a free account and start generating barcodes in minutes. No credit card required.