Aztec Code: Structure, Uses and Scanner SDK

Aztec Code is a square 2D barcode built around a bullseye at its center, so it needs no blank margin and fits on small tickets and phone screens. barKoder reads compact and full-range Aztec codes on boarding passes, rail tickets and event tickets in your iOS, Android and web apps.

Aztec Code

Aztec Code at a glance

Aztec Code key facts
Type 2D matrix symbology with a square bullseye finder at the center. Square symbols from 15 x 15 to 151 x 151 modules, with no quiet zone required.
Character set and data All 256 byte values: ASCII (0-127) and ISO/IEC 8859-1 (128-255) by default, other character sets through ECI. FNC1 for GS1 and similar data.
Capacity Up to 3,832 digits, 3,067 letters or 1,914 bytes in the largest symbol, at the recommended error correction level
Error correction User-selectable, from 5% to 95% of the data region. Recommended: 23% of the symbol capacity plus 3 codewords.
Standard ISO/IEC 24778 (current edition 2024, replacing the 2008 edition)
Typical uses Mobile and printed airline boarding passes (IATA), rail tickets, event tickets, patient identification

What an Aztec Code is and how it is built

An Aztec Code is a square grid of dark and light modules, where each module stands for one bit. The name comes from the central finder pattern, which looks like a stepped pyramid seen from above. Because the reader finds the code from its center, the data can run right to the edge of the symbol.

  • 1. Bullseye finder: concentric square rings around a dark center module. Compact symbols have a 2-ring bullseye, full-range symbols a 3-ring one.
  • 2. Mode message: the ring of modules just outside the bullseye. It describes the symbol's layout, so the decoder knows how to read the data.
  • 3. Orientation patterns: marks at the four corners of the core. They let the decoder read the code at any rotation, and in mirror image.
  • 4. Data layers: rings of data and error correction codewords wrapped around the core, 2 modules thick. Compact symbols have 1 to 4 layers, full-range symbols up to 32. Full-range symbols also carry a reference grid.
  • 5. No quiet zone: the symbol needs no blank margin, so it can be printed edge to edge on a ticket or shown full-screen on a phone.
Compact Aztec Code with its bullseye finder, mode message, orientation patterns, data layers and symbol edge marked 1 to 5 1 2 3 4 5
A compact Aztec Code with two data layers. Numbers match the list.

Aztec Code variants

Encoders choose the format by data length, and decoders tell the formats apart automatically.

Aztec Code formats and options
Variant What it is Scanning notes
Compact Aztec 2-ring bullseye, 1 to 4 data layers. From 15 x 15 modules, for shorter messages. Enable the Aztec Compact decoder
Full-range Aztec 3-ring bullseye, up to 32 data layers and 151 x 151 modules, with a reference grid for large symbols Enable the Aztec decoder
Structured Append Optional. Spreads one message over up to 26 Aztec symbols that can be scanned in any order. Each symbol carries its part of the message
Reader initialization symbols Optional symbols used in barcode menus to configure a reader. Their content is never passed to an application. Used by scanner vendors, not in apps
Aztec Runes 256 small machine-readable marks compatible with Aztec Code, for special applications Not read by barKoder today

Where Aztec codes are used

Aztec Code fits where the code must be small, dense and quick to read from paper or a screen.

Airline boarding passes

IATA Resolution 792

The IATA boarding pass standard allows Aztec, Data Matrix or QR Code on mobile boarding passes, and since version 7 on printed passes at the airline's request. Aztec suits airline apps, where screen space is limited. The boarding pass parser turns the decoded data into passenger, flight and baggage fields.

Barcode scanning for hospitality →

Rail tickets and events

UIC 918.3, VDV, event tickets

Rail tickets use Aztec codes: the UIC 918.3 ticket standard of the International Union of Railways specifies an Aztec symbol, and Deutsche Bahn online tickets use the same symbology under the German VDV standard. Venues use Aztec next to QR Code on event tickets.

Barcode scanning for entertainment →

Healthcare

Patient identification

Hospitals use Aztec codes for patient identification and medical records, where a compact code has to carry detailed information.

Barcode scanning for healthcare →

Scanning Aztec Code with barKoder

The barKoder Barcode Scanner SDK reads Aztec Code on iOS, Android, the web, Windows and Linux, and in Flutter, React Native, .NET MAUI, Capacitor, Cordova and NativeScript apps. These features matter most for ticket and boarding pass scanning.

Separate compact and full-range decoders

barKoder has two Aztec decoders, Aztec and Aztec Compact. Enable both for general ticket scanning, or only the one your codes use to keep scanning focused.

Web SDK API reference →

Continuous scanning at the gate

Keeps the camera running and captures one code after another, without a tap between scans. Use it for boarding, entry gates and event check-in queues.

Continuous Scanning →

Batch MultiScan

Decodes several barcodes in a single camera view, whatever their type or size, for example a stack of printed tickets.

Batch MultiScan →

Aztec decoding in the browser

The Web SDK decodes Aztec from the camera in the browser, or from image files the user selects, for web check-in and validation tools.

WASM Barcode Scanner SDK →

Aztec code reader API

Enable only the decoders you need. This NativeScript example from the barKoder docs enables Aztec and Aztec Compact together with other common types.

NativeScript

TypeScript
                    private setBarcodeTypeEnabled() : void {
                    this.barkoderView.setBarcodeTypeEnabled(
                    [
                    BarkoderConstants.DecoderType.Aztec,
                    BarkoderConstants.DecoderType.AztecCompact
                    ]
                    )
                    }
                  

For a ticket scanner, keep the two Aztec lines and drop the types you don't need. In the Web SDK the same decoders are Barkoder.constants.Decoders.Aztec and Barkoder.constants.Decoders.AztecCompact.

Get scanning in three steps

  1. Get a free trial license and install the SDK for your platform.
  2. Enable the Aztec and Aztec Compact decoders.
  3. Read the decoded ticket or boarding pass data in your result callback.
See the NativeScript example

General examples, including how to enable symbologies, for other platforms: Web SDK, Android, iOS, Flutter, React Native, Capacitor, Cordova and .NET MAUI.

Scan an Aztec code on your phone or in your browser

Install the free barKoder demo app, or open the web demo, and scan your own tickets and boarding passes, on paper or on a phone screen, before you integrate the SDK.

iPhone and iPad

barKoder demo app for iOS

Scan with your camera, or point it at the QR code to open the App Store.

Download on the App Store
QR code linking to the barKoder demo app on the App Store

Android phones and tablets

barKoder demo app for Android

Scan with your camera, or point it at the QR code to open Google Play.

Get it on Google Play
QR code linking to the barKoder demo app on Google Play

Any modern browser

barKoder web demo

Runs the Web SDK in your browser, on desktop or mobile, with nothing to install.

Open the web demo
QR code linking to the barKoder web demo

Test with known samples. Print or display the testing sheet and scan each 1D and 2D barcode with the demo app. The data sheet summarizes the SDK for your team.

Aztec code questions

What is an Aztec Code?

Aztec Code is a 2D matrix barcode defined in ISO/IEC 24778. It is a square of dark and light modules with a bullseye finder pattern in the middle, and its data is wrapped around that center in layers. Symbols range from 15 x 15 to 151 x 151 modules and hold up to 3,832 digits, 3,067 letters or 1,914 bytes. It is best known from airline boarding passes and rail tickets.

What is the difference between Aztec Code and QR Code?

Both are square 2D matrix codes. QR Code is located by three square finder patterns in its corners and needs a blank quiet zone around it. Aztec Code is located by one bullseye in the center and needs no quiet zone, so it uses less space on a ticket or screen. QR Code holds somewhat more data, up to about 4,296 alphanumeric characters against Aztec's 3,067 letters, and is the usual choice for consumer-facing codes. barKoder reads both.

Why doesn't an Aztec Code need a quiet zone?

Most barcodes need a blank margin so the reader can tell where the code ends. An Aztec reader finds the code from the bullseye in its center instead of from its edges, and reads the data layers outward from there. ISO/IEC 24778 therefore requires no quiet zone outside the symbol, which lets designers print the code edge to edge.

Why do boarding passes and train tickets use Aztec codes?

Tickets need a compact code that carries the booking record and reads from paper or a phone screen. The IATA boarding pass standard allows Aztec, Data Matrix or QR Code on mobile boarding passes, while printed passes default to PDF417. The UIC 918.3 rail ticket standard and Deutsche Bahn's online tickets use Aztec. Its error correction can be set as high as the application needs.

What is the best mobile SDK for scanning Aztec codes?

The one that reads your real tickets, from paper and from screens, on your target devices. Check that the SDK reads both compact and full-range symbols, works on your platforms and keeps up with a queue of passengers or visitors. barKoder has decoders for both Aztec formats, continuous scanning and Batch MultiScan, and runs on iOS, Android, the web and frameworks such as Flutter, React Native and .NET MAUI. The free trial runs for 30 days on up to 25 devices.

Can I decode an Aztec code online?

Yes. To check a single code, scan it with your camera or upload a photo or screenshot to the free online barcode scanner. To decode Aztec codes inside your own web app, use the WASM Barcode Scanner SDK, which reads from the camera or from image files.

Add Aztec Code scanning to your app

Test the SDK on your own tickets and boarding passes with a free 30-day trial, or talk to an SDK expert about your project.