Encoding Mode
Encoding mode is the method used to convert data into QR code module patterns. Four types exist: numeric (0-9 only), alphanumeric (0-9, A-Z, some symbols), byte (arbitrary binary data), and kanji (Shift JIS kanji characters).
Numeric mode consumes the fewest bits per character, storing more data in the same QR code size. QR code generators typically auto-select the most efficient mode for the input data. Alphanumeric mode covers only 45 characters - 0-9, uppercase A-Z, space and $ % * + - . / : - so a typical URL containing lowercase letters is encoded in byte mode. Because alphanumeric mode spends 5.5 bits per character against byte mode's 8, converting the whole URL to uppercase so that every character stays inside those 45 makes the same URL fit into a smaller symbol. Uppercasing only the domain does not help: a lowercase scheme such as https:// keeps the data in byte mode.
Mode selection directly affects the data volume and the size of the symbol. Storing digits-only data in alphanumeric mode makes the payload take about 1.7 times the bits of numeric mode - 61 bits against 37 for an 11-digit phone number. Conversely, strings designed with uppercase letters and digits only, such as product codes or serial numbers, fit inside alphanumeric mode, but a single lowercase letter or underscore drops them back to byte mode. Kanji mode represents a Shift JIS double-byte character in 13 bits, so the same Japanese text takes less data than keeping it as UTF-8 in byte mode (3 bytes = 24 bits per character), though it cannot be used when the text contains characters absent from Shift JIS. When specifying a mode by hand, first confirm that every character to be stored falls inside that mode's character set.
Which mode was used to encode the data is signaled by a 4-bit mode indicator placed at the start of the data stream. Numeric mode is 0001, alphanumeric mode is 0010, byte mode is 0100, and kanji mode is 1000. The reader inspects these four bits to decide how to interpret the data that follows.