Aztec Code Generator
Encode boarding passes, transit tickets and structured payloads as a 2D Aztec barcode. Tunable error correction and layer count, PNG and SVG output — fully client-side. A compact mode produces smaller symbols of 15 × 15 to 27 × 27 modules, and a reader-programming switch sets the flag used for scanner configuration codes.
59 / 3000 characters. Aztec encodes ASCII, digits and Latin-1 binary.
Spec default is 23%. Higher = more tolerance to print damage at the cost of a bigger symbol.
2-ring bullseye, 1–4 layers — smaller symbol for short payloads (~110 chars max).
Sets the reader-init flag for scanner-config Aztec codes. Leave off for data.
M1DOE/JOHN EABC123 LHRJFKBA 0179 226Y012A0001 100Files are generated on your device — nothing is uploaded.
About the Aztec code generator
Aztec is a 2D matrix barcode that packs a few characters or up to ~3000 of them into a square symbol with a central bullseye finder pattern. It scans without a quiet zone (which is why it works so well on phone screens with thin status bars), tolerates partial damage, and is the symbology behind IATA mobile boarding passes, Eurostar / SNCF / Deutsche Bahn tickets, and many transit cards.
This generator renders Aztec entirely in your browser with the open-source bwip-js library. Pick an error-correction percentage (the spec default is 23%), choose compact vs full-range, force a layer count for a fixed label size, then download as SVG for print or PNG for screen.
When to Use It
- Generating IATA BCBP mobile boarding-pass payloads for proofing.
- Issuing transit / rail tickets that need to scan from glossy phone screens.
- Marking small parts where Aztec's no-quiet-zone requirement saves real estate.
- Producing reader-config codes that re-programme handheld scanners.
- Embedding short structured data (gate, seat, member ID) on a printed pass.
- Replacing a damaged Aztec on an existing ticket / pass with a re-issue.
How It Works
- Paste your data ASCII text, digits or Latin-1 binary up to ~3000 characters.
- Set the EC percentage Stay at the 23% spec default for general use. Raise for harsher surfaces / lower-DPI printers.
- Pick compact or full-range Compact for short payloads (~110 chars). Full-range for everything else.
- Optionally force layers Auto picks the smallest symbol that fits; force a count to hit a label size.
- Download SVG or PNG SVG scales without artefacts to any size; PNG is fine for screens.
What to Avoid
- Don't drop EC below 23% for boarding passes or laminated tickets — wear destroys low-EC symbols quickly.
- Don't force compact mode for a payload over ~110 characters — the encoder will reject it.
- Don't enable Reader Programming for normal data payloads — most scanners refuse to decode it as data.
- Don't print on phone screens with the brightness turned low; Aztec relies on contrast that auto-brightness sometimes kills.
- Don't expect every legacy scanner to read full-range Aztec at 32 layers — verify with the actual reader you're targeting.
Tips & Tricks
- Aztec doesn't need a quiet zone — but a thin white margin still helps screen scans through phone bezels.
- For airline / rail use, follow the IATA BCBP or UIC-918 field layout exactly; downstream readers reject anything off-spec.
- Export SVG and rasterise to PNG only for the final asset — vector means you can resize without quality loss.
- Round-trip-test by scanning the rendered Aztec with the actual scanner that will read it in production.
- If your scanner supports both, prefer Compact Aztec for ticket-size labels — it scans faster from short distances.
Private by Default
Aztec codes are rendered locally with bwip-js. The text you encode never touches our servers.
Aztec Code vs QR Code
An Aztec code is located from a bullseye at its center, while a QR code relies on three finder squares in its corners, so Aztec needs no quiet zone.
| Feature | Aztec Code | QR Code |
|---|---|---|
| Quiet zone | None required | 4 modules on every side |
| Symbol sizes | 15 × 15 to 151 × 151 modules | 21 × 21 to 177 × 177 modules |
Pick Aztec for tight spaces and phone screens, and QR for codes that shoppers scan with a camera app. The barcode formats guide compares Aztec with the other symbologies.
What Is an Aztec Code Used For?
Aztec codes appear mainly on travel tickets, and the symbology can also carry scanner configuration commands.
Aztec Barcodes on Boarding Passes and Rail Tickets
IATA's Bar Coded Boarding Pass standard allows Aztec on mobile boarding passes, and UIC 918-3 rail tickets use it too. The sample above follows the BCBP layout: M for the format code, then 1 for the number of flight legs. Before issuing a pass from this Aztec code generator online, scan it with the barcode reader to confirm it decodes to the exact string you entered.
Frequently Asked Questions
What Is an Aztec Code?
Aztec is a 2D matrix barcode introduced in 1995 with a distinctive square 'bullseye' finder pattern in the centre. It encodes from a few bytes up to ~3067 ASCII characters, doesn't require a quiet zone (unlike QR), and is the symbology used for IATA mobile boarding passes and many European rail tickets.
Compact vs Full-Range — What's the Difference?
Compact Aztec uses a 2-ring bullseye and 1–4 layers (15×15 to 27×27 modules); good for small payloads up to ~110 characters. Full-range uses a 3-ring bullseye and 1–32 layers (19×19 to 151×151 modules) for longer data. Most modern scanners read both.
What Error Correction Percentage Should I Use?
The Aztec spec recommends 23% (the default). Bump to 36–50% for laminated cards, dirty surfaces or low-DPI thermal prints. Lower than 23% saves space but reduces tolerance to print defects and scanner noise.
What Does 'Layers' Control?
Each layer adds a square ring of modules around the central bullseye. More layers = bigger symbol and more data capacity. Auto lets bwip-js pick the smallest layer count that fits your data at the chosen EC level. Force a specific layer count to hit a fixed label size.
When Should I Use Reader-Programming Aztec?
Aztec supports a 'reader init' flag that tells barcode scanners to programme themselves from the symbol — used in IT deployment to push scanner configs. Don't enable it for normal data payloads.
Is My Data Uploaded Anywhere?
No. The barcode is rendered locally with the open-source bwip-js library. The text you encode and the files you download never leave your browser.
How Do You Read an Aztec Code?
Point a 2D imager or a phone app that supports Aztec at the symbol; it reads at any rotation because the decoder locates the central bullseye and its orientation marks first. Airport gates and ticket barriers use fixed imagers built for this. For a quick check at your desk, a phone or laptop camera is enough.
Can an Aztec Code Be Decoded Online?
Yes. The ReadBarcode barcode reader decodes Aztec in your browser from the camera or from an uploaded photo or screenshot. The image is not uploaded, so a ticket payload stays on your device. It is a quick way to check a code you created on this page before you print it.