Technology · Encoding
Encoding modes
A Quick Response Code symbol carries one or more named encoding modes that determine how source characters are mapped to data codewords.
The four primary modes
| Mode | Character set | Bits per character |
|---|---|---|
| Numeric | Digits 0–9 | ≈ 3.33 (10 bits per 3 digits) |
| Alphanumeric | 0–9, A–Z, and 9 symbols | ≈ 5.5 (11 bits per 2 chars) |
| Byte (8-bit) | ISO-8859-1, or UTF-8 with declaration | 8 |
| Kanji | Shift JIS double-byte | 13 |
Mode chaining
A single symbol may concatenate several modes. The data stream is a sequence of segments, each prefixed by a four-bit mode indicator and a character-count indicator. This permits, for example, a numeric segment followed by a byte segment within one symbol, minimizing total codeword consumption.
Extended Channel Interpretation
ISO/IEC 18004 defines an Extended Channel Interpretation (ECI) mechanism by which the byte mode may declare a non-default character encoding (for example UTF-8) for the bytes that follow. The ECI designator permits internationalization beyond ISO-8859-1.
Cited references
- ISO/IEC 18004:2015, §7.3 Data encoding.
- ISO/IEC 18004:2015, Annex B — Symbol versions and capacities.
