QR Code数据容量:按版本和模式的最大字符数

Embed This Widget

Theme


      
    

Widget powered by . Free, no account required.

Complete capacity tables for all 40 versions across all EC levels and encoding modes. How to calculate the required version for your data.

QR Code Data Capacity: Maximum Characters by Version and Mode

Understanding QR code capacity helps you choose the right version and error correction level for your data. Capacity varies significantly based on three factors: version, encoding mode, and EC level.

Capacity by Encoding Mode

QR codes support four primary encoding modes, each with different efficiency:

Mode Characters Per Group Bits Per Group Effective Bits/Char
Numeric 3 digits 10 bits 3.33
Alphanumeric 2 chars 11 bits 5.5
Byte 1 byte 8 bits 8.0
Kanji 1 char 13 bits 13.0

Maximum Capacity (Version 40)

EC Level Numeric Alphanumeric Byte Kanji
L (7%) 7,089 4,296 2,953 1,817
M (15%) 5,596 3,391 2,331 1,435
Q (25%) 3,993 2,420 1,663 1,024
H (30%) 3,057 1,852 1,273 784

Common Use Case Sizes

In practice, most QR codes use a small fraction of maximum capacity:

  • Short URL (e.g., https://example.com): ~25 bytes — Version 2, EC-M
  • WiFi credentials: ~50-80 bytes — Version 3-4, EC-M
  • vCard (basic): ~150-250 bytes — Version 7-10, EC-M
  • vCard (full): ~400-600 bytes — Version 13-18, EC-M
  • Calendar event: ~200-400 bytes — Version 8-14, EC-M

Calculating Required Version

To determine the minimum version for your data:

  1. Count your data characters and identify the encoding mode
  2. Add overhead: mode indicator (4 bits), character count indicator (varies), and terminator
  3. Add error correction codewords for your chosen EC level
  4. Find the smallest version with sufficient total codeword capacity

Most libraries handle this automatically, but manual calculation is useful for capacity planning.

Tips for Reducing Data Size

Key Takeaways

  • Version 40 at EC-L holds up to 7,089 numeric or 2,953 byte characters
  • Higher error correction significantly reduces available capacity
  • Most practical QR codes use Versions 2-15
  • Uppercase URLs save approximately 30% compared to lowercase
  • Libraries auto-select the minimum version for your data