How to use the aztec code generator
- Enter the text or data you want to encode in the Data to encode field.
- Select Compact for shorter data or Full Range for larger payloads.
- Adjust the Error correction percentage to control resilience against damage.
- Click Generate to render the Aztec code as an SVG image.
- Download or copy the SVG output for use in tickets, documents, or displays.
How the Aztec code is structured
An Aztec code is built around a central finder pattern shaped like a bullseye. In compact mode, the core consists of a single center pixel surrounded by alternating rings forming a 9x9 grid, with orientation marks at the corners. Full-range symbols use a larger 13x13 core with additional alignment markers.
Data layers wrap around this core in concentric squares. Each layer adds capacity for encoded bits. The number of layers required depends on the length of the input data and the chosen error correction level. Higher error correction means more Reed-Solomon codewords are appended, which increases the total bit count and may require additional layers.
Encoding process overview
The encoding pipeline follows several steps. First, the input is converted into a bit stream using the Aztec sub-modes: Upper (5 bits per letter), Lower (5 bits), Mixed (5 bits per control or symbol character), Digit (4 bits per digit, comma or full stop) and Punctuation (reached with a one-character shift). Characters that none of these cover, such as accented letters, are sent as UTF-8 bytes with the binary shift. This generator switches sub-modes greedily as it reads the text, which is valid but can be a few bits longer than the optimum the standard allows.
The bit stream is cut into codewords, with extra bits added so that no codeword is all zeros or all ones. The generator then adds Reed-Solomon check codewords for your chosen percentage plus a few extra, and writes the codewords around the finder pattern in the layers, spiraling outward from the core. The codeword size, and so the Reed-Solomon field, depends on the number of layers: 6 bits (GF(64)) for 1 to 2 layers, 8 bits (GF(256)) for 3 to 8, 10 bits (GF(1024)) for 9 to 22 and 12 bits (GF(4096)) for 23 to 32. A short mode message beside the core stores the layer count and the number of data codewords.
Compact vs Full Range symbols
Aztec codes come in two structural variants. Compact symbols support 1 to 4 data layers and use a smaller 9x9 finder pattern. They are ideal for short strings such as ticket numbers or URLs where space is limited. Full-range symbols support 1 to 32 layers and use a 13x13 core with extra alignment patterns that help scanners read large symbols accurately.
| Feature | Compact | Full Range |
|---|---|---|
| Core size | 9 x 9 modules | 13 x 13 modules |
| Max layers | 4 | 32 |
| Capacity in this tool at 23% error correction | about 118 digits or 28 to 96 characters, depending on content | about 3,000 characters |
| Codeword size | 6 bits (1 to 2 layers), 8 bits (3 to 4 layers) | 6 to 12 bits, depending on layers |
| Best for | Short text, small labels | Long text, high reliability |
Error correction levels
Error correction in Aztec codes uses Reed-Solomon coding. The percentage you select determines how many of the total codewords are reserved for error detection and correction rather than actual data. A common default is 23%, which provides a good balance between symbol size and resilience.
If you expect the printed symbol to be exposed to wear, dirt, or partial obstruction, increase the error correction to 40% or higher. Keep in mind that raising the error correction reduces the amount of user data that fits in a given symbol size, potentially requiring more layers. Unlike some other 2D symbologies, Aztec does not restrict you to fixed error correction tiers; you can specify any percentage from 5% to 90%.
Common applications
Aztec codes are widely used in transportation and ticketing because they do not require a surrounding quiet zone, unlike many other 2D barcodes. This makes them ideal for printing on small surfaces such as mobile phone screens, boarding passes, and train tickets. Airlines and railway operators use them on tickets and boarding passes.
They also appear in government documents, healthcare records, and logistics. Because the symbol can encode binary data efficiently, it handles everything from simple alphanumeric references to compressed payloads. If you need linear barcodes instead, tools like the Code 128 barcode generator or Code 39 barcode generator handle standard product and inventory labeling.
Worked examples
| Example | Input | Result |
|---|---|---|
| Simple text | Data to encode: Hello, Aztec!; Mode: compact; Error correction (%): 23; Background: white | Encoded data: Hello, Aztec!; Mode: Compact; Layers: 2; Symbol size: 19 x 19 modules; Data codewords: 16; EC codewords: 24 |
| URL | Data to encode: https://xerobit.dev; Mode: full; Error correction (%): 30; Background: white | Encoded data: https://xerobit.dev; Mode: Full Range; Layers: 2; Symbol size: 23 x 23 modules; Data codewords: 21; EC codewords: 27 |
| Ticket reference | Data to encode: TKT-88291-X; Mode: compact; Error correction (%): 50; Background: transparent | Encoded data: TKT-88291-X; Mode: Compact; Layers: 2; Symbol size: 19 x 19 modules; Data codewords: 12; EC codewords: 28 |
FAQ
What is an Aztec code?
An Aztec code is a type of 2D matrix barcode characterized by a square bullseye finder pattern at its center. It can encode text, numbers, and binary data without requiring a blank margin around the symbol.
Does this aztec code generator upload my data?
No. All encoding and SVG rendering happens locally in your browser. Your text is never sent to any server.
What is the difference between compact and full range?
Compact Aztec codes have a smaller center pattern and support up to 4 data layers, making them suitable for short strings. Full-range codes support up to 32 layers for much larger data payloads.
How much error correction should I use?
A value of 23% is standard for most applications. Increase it to 40% or more if the symbol will be printed on surfaces prone to damage, smudging, or partial covering.
Can I scan the generated SVG with a phone?
Yes. The SVG follows the Aztec Code layout and Reed-Solomon rules, so standard scanners and phone apps can decode it. Display it at a reasonable size on screen or print it with enough contrast, and test a sample before production use.
Why choose Aztec over other 2D barcodes?
Aztec codes do not need a quiet zone, so they can take up less physical space than other 2D codes. They are used on many airline and rail tickets, and their finder pattern lets scanners locate the symbol in any orientation.