DevTools Logo

QR Codes Cheat Sheet

QR code structure, versions, error correction levels, encoding modes, and generation/scanning guidance.

Reference
qr-code
barcode
encoding

A QR code encodes data in a two-dimensional matrix that scanners decode with error correction. Choosing the right version, error-correction level, and encoding mode affects size, capacity, and reliability.

Structure

Table
ElementPurpose
Finder patternsThree corner squares for orientation.
Timing patternsRows/columns for module alignment.
Alignment patternsAid decoding on larger codes.
Format infoError-correction level + mask.
Data + ECCThe payload and redundancy.

Error correction levels

Table
LevelRecoveryUse case
L~7%Clean, controlled environments.
M~15%General purpose (default).
Q~25%Industrial, printed labels.
H~30%Logos, damage-prone surfaces.

Versions and capacity

Table
VersionModulesMax numeric capacity (L)
121×2141 digits
1057×57652 digits
40177×1777089 digits

Higher versions store more but require more resolution to scan reliably.

Encoding modes

Table
ModeEfficiency
NumericBest (0-9).
AlphanumericGood (0-9, A-Z, some symbols).
ByteBinary/UTF-8 text.
KanjiJapanese characters.

Generation tips

Table
TipWhy
Use quiet zoneKeep a 4-module white margin.
Keep URLs shortSmaller code, faster scan.
Test at target sizeSmall codes need higher contrast.
Avoid low contrastDark on light, not light on dark.

References

Related tools