2D Free plan

Aztec Code Generator API

Space-efficient code for transport tickets

Sample Aztec Code barcode

Generated live by the BarGen API from https://bargen.pro

Aztec Code is a two-dimensional matrix barcode standardized as ISO/IEC 24778, distinguished by a bullseye-style finder pattern at its center rather than the corner markers used by QR Code. Because it needs no surrounding quiet zone, Aztec packs efficiently onto small tickets and can be printed thermally with minimal margin, which is why the airline and rail industries adopted it for electronic boarding passes and e-tickets.

BarGen generates an Aztec Code from a REST call with the encoded string and error correction preference, returning an SVG for vector ticket templates or a PNG for thermal or laser printing pipelines.

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.

Common use cases

Airline e-boarding passes

IATA's Bar Coded Boarding Pass standard permits Aztec Code, and many carriers use it for mobile and printed boarding passes because it tolerates screen glare and low print quality.

Rail and transit ticketing

European rail operators encode ticket and reservation data in Aztec Code for gate scanners and conductor handhelds.

Event and venue admission

Concert and stadium ticketing systems use Aztec Code on printed or mobile tickets for fast turnstile scanning.

Generate Aztec Code via the REST API

curl "https://api.bargen.pro/v1/barcode/aztec?data=https%3A%2F%2Fbargen.pro&format=svg" \
  -H "X-API-Key: YOUR_API_KEY"

Returns the barcode as SVG. See the API documentation for all options.

Frequently asked questions

Why does Aztec Code not need a quiet zone?

Its central bullseye finder pattern lets scanners locate and orient the symbol without a surrounding blank margin, unlike QR Code, which makes Aztec more space-efficient on small labels.

How much data can Aztec Code hold?

Aztec Code scales up to about 3,000 characters or 3,800 numeric digits, with error correction from roughly 5% to 95% of the symbol depending on configuration.

Is Aztec Code readable from a phone screen?

Yes, its high contrast tolerance and lack of a quiet zone requirement make it reliable when scanned directly off a backlit mobile screen, a key reason airlines favor it for mobile boarding passes.

Specifications

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

Availability

Available from the Free plan.

See pricing

Start generating Aztec Code barcodes

Free tier with 1,000 API calls per month. No credit card required.