Aztec Code generator

Aztec Code is the two-dimensional symbology that needs no quiet zone. Every other matrix code demands a margin of blank space around it before a reader will look; Aztec finds itself by the bullseye at its centre and reads outward, so it can sit flush against a border, a fold or the edge of a ticket. That single property is why it won the transport industry — rail tickets, boarding passes, event admissions — where the printable area is a strip of thermal paper and every millimetre spent on white space is a millimetre not spent on the code.

Appearance
Size
Colours

168 × 168 px in the PNG

Size units

Specification

Character set
any data
Length
from 1 to 3067 characters
Check digit
not used by this symbology

Where it is used

  • Rail and transit tickets, where the symbol is printed on a narrow thermal strip and read by a gate reader at speed
  • Airline boarding passes carrying the IATA BCBP record, both on paper and on a phone screen
  • Event and admission tickets, where the code must survive folding, handling and a printer of unknown quality
  • Small-part and document marking where a quiet zone cannot be guaranteed, such as codes printed hard against a die-cut edge

How it compares

Against QR the differences are three, and they cut both ways. Aztec needs no quiet zone, which saves four modules on every side — on a small symbol that is a large fraction of the total area. For short payloads Aztec is usually more compact, because it has no fixed-size finder patterns eating three corners. But QR is what a phone camera app expects: a general-purpose consumer scanner will read a QR without being told, while Aztec is read reliably by the equipment that was bought to read it. That decides most choices. Put a URL on a poster and use QR. Put a ticket record on a strip of thermal paper read by a gate you control, and Aztec fits where QR would not. Against Data Matrix, Aztec has the quiet zone advantage and better handling of larger payloads; Data Matrix has broader support in industrial marking and direct part marking.

Common mistakes

  • Reserving a quiet zone anyway. It is not wrong, only wasteful, and on a ticket the waste is the point: the whole reason to choose Aztec is that the four blank modules other symbologies demand can be spent on the code instead. Reserving them and then shrinking the symbol to fit gives away the advantage and keeps none of it.
  • Raising error correction because more sounds safer. The default of 23% is a considered figure, and correction is not free — every extra percent enlarges the symbol, and a larger symbol printed in the same space has smaller modules, which is itself a source of read failures. Above roughly 50% the growth outpaces the benefit for most printing.
  • Encoding a ticket record as free text. Transport codes carry structured data — the BCBP layout for boarding passes, a carrier's own record for rail — and readers parse it by position. A payload that carries the right information in a shape the gate does not expect scans perfectly and is then rejected, which is a harder fault to trace than a code that will not scan.
  • Printing on a screen at low contrast. Aztec on a phone screen is common and mostly fine, but auto-brightness and dark themes both work against it. A gate reader wants black on white at full brightness; a dimmed screen with an inverted colour scheme is the most common reason a valid mobile ticket does not open the barrier.
  • Choosing it for a consumer-facing code. If the person scanning it will use their own phone camera, they expect QR. Aztec is read by dedicated equipment far more reliably than by general camera apps, and a code the public cannot scan is worse than a slightly larger one they can.

Frequently asked questions

Does Aztec really need no quiet zone?
Correct — none is required by the specification. The finder is the bullseye at the centre, not a pattern at the corners, so the decoder locates the symbol from the inside out and does not depend on blank space around it. This is the property that put Aztec on tickets, where the margin simply does not exist.
How much error correction should I use?
The 23% default suits most printing. Raise it if the symbol will be folded, abraded or printed by an unreliable thermal head; leave it alone otherwise. Remember that correction costs area — the symbol grows, and if the space is fixed the modules shrink, which can lose you more than the extra correction gains.
Aztec or QR for a ticket?
Aztec, if you control the readers. It fits where QR will not, because of the quiet zone, and it is what gate equipment in rail and aviation is built around. QR is the answer when the scanner is a member of the public holding a phone, because that is what phone camera apps look for by default.
How much data does it hold?
Up to 3,067 alphanumeric characters or 3,832 digits at the largest size and lowest correction, though real transport payloads are far smaller — a boarding pass record is a couple of hundred characters. The practical limit is not the specification but the printed area: a symbol large enough to hold a lot of data has small modules unless the label grows with it.
Why does my Aztec look different from the one on my train ticket?
Almost certainly a different size and correction level, and possibly the compact variant. Aztec ranges from a 15×15 compact symbol to 151×151, and the layer count grows with the payload; two codes carrying different amounts of data at different correction settings look quite unalike even though both are Aztec.