QR code · Numeric, alphanumeric, byte, kanji, ECI
QR encoding modes
Numeric, alphanumeric, byte, kanji and ECI decide how many bits each character costs.
Key facts
| Modes | Numeric, alphanumeric, byte, kanji, ECI |
|---|---|
| Numeric cost | About 3.3 bits per digit |
| Alphanumeric cost | 5.5 bits per character |
| Byte cost | 8 bits per byte |
| Kanji cost | 13 bits per character |
| Mixed content | Multiple segments allowed |
Segments can switch modes
A payload does not have to use a single mode. An encoder can emit a numeric segment for a phone number, switch to byte mode for a query string and back again, paying a short mode indicator each time. Good encoders try several segmentations and keep the smallest result, which is why two generators can produce different symbol sizes for the same text.
ECI declares the character set
Byte mode is just bytes; it does not say whether they are UTF-8, Latin-1 or something else. ECI (Extended Channel Interpretation) adds a designator such as ECI 26 for UTF-8. Many scanners assume UTF-8 anyway, but explicit ECI avoids ambiguity when a payload leaves the ASCII range.
Frequently asked questions
Should I force byte mode?
Only if your generator otherwise splits text badly. Let the encoder choose segments, but keep payloads short enough that the choice does not matter.
Why do accented characters make the code bigger?
They are encoded as multiple UTF-8 bytes in byte mode, so each character costs more than one 8-bit unit.
What is ECI 26?
The ECI assignment for UTF-8. It tells the decoder how to interpret the bytes that follow.