Xerobit

Aztec Code Generator: Create Aztec Barcodes as SVG

Enter your text to generate an Aztec code rendered as a scalable SVG image. Choose between compact and full-range modes and adjust error correction. The aztec code generator runs entirely in your browser without uploading any data.

Result

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23" width="92" height="92"><rect width="23" height="23" fill="#fff"/><rect x="3" y="2" width="1" height="1" fill="#000"/><rect x="5" y="2" width="1" height="1" fill="#000"/><rect x="7" y="2" width="2" height="1" fill="#000"/><rect x="11" y="2" width="3" height="1" fill="#000"/><rect x="15" y="2" width="1" height="1" fill="#000"/><rect x="18" y="2" width="3" height="1" fill="#000"/><rect x="4" y="3" width="1" height="1" fill="#000"/><rect x="9" y="3" width="4" height="1" fill="#000"/><rect x="17" y="3" width="2" height="1" fill="#000"/><rect x="20" y="3" width="1" height="1" fill="#000"/><rect x="2" y="4" width="4" height="1" fill="#000"/><rect x="7" y="4" width="3" height="1" fill="#000"/><rect x="12" y="4" width="1" height="1" fill="#000"/><rect x="14" y="4" width="4" height="1" fill="#000"/><rect x="20" y="4" width="1" height="1" fill="#000"/><rect x="2" y="5" width="3" height="1" fill="#000"/><rect x="10" y="5" width="1" height="1" fill="#000"/><rect x="13" y="5" width="2" height="1" fill="#000"/><rect x="17" y="5" width="2" height="1" fill="#000"/><rect x="4" y="6" width="4" height="1" fill="#000"/><rect x="9" y="6" width="1" height="1" fill="#000"/><rect x="12" y="6" width="3" height="1" fill="#000"/><rect x="16" y="6" width="4" height="1" fill="#000"/><rect x="4" y="7" width="13" height="1" fill="#000"/><rect x="18" y="7" width="1" height="1" fill="#000"/><rect x="20" y="7" width="1" height="1" fill="#000"/><rect x="2" y="8" width="2" height="1" fill="#000"/><rect x="6" y="8" width="2" height="1" fill="#000"/><rect x="15" y="8" width="5" height="1" fill="#000"/><rect x="4" y="9" width="2" height="1" fill="#000"/><rect x="7" y="9" width="1" height="1" fill="#000"/><rect x="9" y="9" width="5" height="1" fill="#000"/><rect x="15" y="9" width="1" height="1" fill="#000"/><rect x="17" y="9" width="2" height="1" fill="#000"/><rect x="2" y="10" width="2" height="1" fill="#000"/><rect x="5" y="10" width="3" height="1" fill="#000"/><rect x="9" y="10" width="1" height="1" fill="#000"/><rect x="13" y="10" width="1" height="1" fill="#000"/><rect x="15" y="10" width="1" height="1" fill="#000"/><rect x="17" y="10" width="3" height="1" fill="#000"/><rect x="3" y="11" width="2" height="1" fill="#000"/><rect x="7" y="11" width="1" height="1" fill="#000"/><rect x="9" y="11" width="1" height="1" fill="#000"/><rect x="11" y="11" width="1" height="1" fill="#000"/><rect x="13" y="11" width="1" height="1" fill="#000"/><rect x="15" y="11" width="2" height="1" fill="#000"/><rect x="18" y="11" width="1" height="1" fill="#000"/><rect x="3" y="12" width="3" height="1" fill="#000"/><rect x="7" y="12" width="1" height="1" fill="#000"/><rect x="9" y="12" width="1" height="1" fill="#000"/><rect x="13" y="12" width="1" height="1" fill="#000"/><rect x="15" y="12" width="1" height="1" fill="#000"/><rect x="17" y="12" width="2" height="1" fill="#000"/><rect x="2" y="13" width="1" height="1" fill="#000"/><rect x="6" y="13" width="2" height="1" fill="#000"/><rect x="9" y="13" width="5" height="1" fill="#000"/><rect x="15" y="13" width="2" height="1" fill="#000"/><rect x="18" y="13" width="1" height="1" fill="#000"/><rect x="20" y="13" width="1" height="1" fill="#000"/><rect x="2" y="14" width="3" height="1" fill="#000"/><rect x="6" y="14" width="2" height="1" fill="#000"/><rect x="15" y="14" width="3" height="1" fill="#000"/><rect x="7" y="15" width="10" height="1" fill="#000"/><rect x="20" y="15" width="1" height="1" fill="#000"/><rect x="5" y="16" width="1" height="1" fill="#000"/><rect x="8" y="16" width="2" height="1" fill="#000"/><rect x="11" y="16" width="1" height="1" fill="#000"/><rect x="17" y="16" width="3" height="1" fill="#000"/><rect x="11" y="17" width="1" height="1" fill="#000"/><rect x="15" y="17" width="2" height="1" fill="#000"/><rect x="18" y="17" width="1" height="1" fill="#000"/><rect x="20" y="17" width="1" height="1" fill="#000"/><rect x="5" y="18" width="5" height="1" fill="#000"/><rect x="11" y="18" width="1" height="1" fill="#000"/><rect x="13" y="18" width="2" height="1" fill="#000"/><rect x="16" y="18" width="3" height="1" fill="#000"/><rect x="20" y="18" width="1" height="1" fill="#000"/><rect x="2" y="19" width="1" height="1" fill="#000"/><rect x="7" y="19" width="5" height="1" fill="#000"/><rect x="15" y="19" width="1" height="1" fill="#000"/><rect x="17" y="19" width="1" height="1" fill="#000"/><rect x="20" y="19" width="1" height="1" fill="#000"/><rect x="3" y="20" width="1" height="1" fill="#000"/><rect x="5" y="20" width="1" height="1" fill="#000"/><rect x="8" y="20" width="2" height="1" fill="#000"/><rect x="11" y="20" width="1" height="1" fill="#000"/><rect x="14" y="20" width="3" height="1" fill="#000"/><rect x="18" y="20" width="3" height="1" fill="#000"/></svg>
  • Encoded data
    Hello, Aztec!
  • Mode
    Compact
  • Layers
    2
  • Symbol size
    19 x 19 modules
  • Data codewords
    16

    6-bit codewords

  • EC codewords
    24

    60% of the symbol

  1. Total codewords: 40
  2. Codeword size: 6 bits
  3. Data bits before stuffing: 94
  4. Quiet zone: 2 modules

How to use the aztec code generator

  1. Enter the text or data you want to encode in the Data to encode field.
  2. Select Compact for shorter data or Full Range for larger payloads.
  3. Adjust the Error correction percentage to control resilience against damage.
  4. Click Generate to render the Aztec code as an SVG image.
  5. 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.

FeatureCompactFull Range
Core size9 x 9 modules13 x 13 modules
Max layers432
Capacity in this tool at 23% error correctionabout 118 digits or 28 to 96 characters, depending on contentabout 3,000 characters
Codeword size6 bits (1 to 2 layers), 8 bits (3 to 4 layers)6 to 12 bits, depending on layers
Best forShort text, small labelsLong 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

ExampleInputResult
Simple textData to encode: Hello, Aztec!; Mode: compact; Error correction (%): 23; Background: whiteEncoded data: Hello, Aztec!; Mode: Compact; Layers: 2; Symbol size: 19 x 19 modules; Data codewords: 16; EC codewords: 24
URLData to encode: https://xerobit.dev; Mode: full; Error correction (%): 30; Background: whiteEncoded data: https://xerobit.dev; Mode: Full Range; Layers: 2; Symbol size: 23 x 23 modules; Data codewords: 21; EC codewords: 27
Ticket referenceData to encode: TKT-88291-X; Mode: compact; Error correction (%): 50; Background: transparentEncoded 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.