Aztec code generator
The two-dimensional code on train tickets and boarding passes. Its finder is a bullseye in the middle rather than squares in the corners, so it needs no quiet zone at all and survives being printed flush to the edge of a ticket.
Found from the center outward
Every other two-dimensional symbology here is located by its corners, which is why they all demand blank space around them. Aztec puts a bullseye of concentric squares at the center of the symbol and grows outward in layers from there. A reader finds the middle first and works out the extent afterward.
The practical consequence is the reason transport chose it. An Aztec code can touch the edge of the paper, sit against a border, or be surrounded by print, and still be found. On a ticket where every millimeter is already committed to text, that is worth more than a few percent of density.
Four fields, one per size band
Aztec's error correction changes arithmetic as the symbol grows. Small symbols work in a 6-bit field, then 8 bits up to eight layers, 10 up to twenty-two, and 12 beyond that. Four different Galois fields, each with its own polynomial, inside one symbology.
There is also bit stuffing: no code word may be all ones or all zeros, so the encoder inserts a complementary bit when one would occur. Both of these are handled here, and both are the sort of detail a symbology gets wrong quietly. Sizes measured from this encoder: 15x15 for ten characters, 31x31 for a hundred, 87x87 for a thousand, 147x147 for three thousand.
The mistake worth knowing about
Aztec's five character alphabets have the punctuation shift at index zero and space at index one, so the letter A sits at index two. Building those tables with A at zero produces a symbol that encodes cleanly, decodes cleanly, and returns the wrong text: this encoder turned the word AZTEC into a five character string beginning with a space.
The other trap is latching between alphabets. Going from lowercase back to uppercase is not one code, it is a route through the mixed alphabet, and treating every transition as a single code produces a symbol whose text drifts after the first case change. Both were caught by decoding with an independent reader rather than our own.
Aztec, QR or Data Matrix
- Aztec when the code must be printed to the edge, or the layout leaves no margin. No other two-dimensional symbology here manages without a quiet zone.
- Aztec for tickets and travel documents, because that is what the readers at gates and on trains are configured for.
- QR when the audience is people with phones. Phone cameras find QR fastest and every scanning app supports it.
- Data Matrix when the code is small, etched, or on a part rather than paper.
Questions
Does an Aztec code need no white border at all?
Correct, and it is the main reason to choose one. The bullseye at the center is what a reader locates, so nothing outside the symbol has to be blank. Every other two-dimensional format here needs a quiet zone to be found at all.
How much data fits?
Three thousand characters comes out at 147x147 modules in this encoder, and the symbology goes further. Sizes grow in layers rather than jumping between a few fixed shapes, so an Aztec code tends to be a closer fit to your data than a Data Matrix of the same content.
Why do airline boarding passes use Aztec?
Edge printing and reader availability. A boarding pass is a dense layout with no spare margin, and gate scanners are already configured for Aztec. Some carriers use PDF417 for the same reasons.
Will a phone scan it?
Many scanning apps will, and the built-in camera app is less likely to than it is with QR. If your users will be pointing their own phones at it without a particular app, a QR code is the safer choice.
More barcode generators
PDF417 generator · Pharmaceutical barcode generator · Test barcode numbers · Free barcode generator · EAN-13 barcode generator · UPC barcode generator · Barcode generator · QR code generator