User Rating 0.0 ā˜…ā˜…ā˜…ā˜…ā˜…
Total Usage 0 times
Enter any valid URL to generate a QR code
#2D3142
#FFFFFF
Your QR code will appear here
Is this tool helpful?

Your feedback helps us improve.

ā˜… ā˜… ā˜… ā˜… ā˜…

About

QR codes encode data into a two-dimensional matrix of dark and light modules, readable by any camera-equipped device. A typical URL like https://example.com/path?q=value requires between Version 2 (25Ɨ25 modules) and Version 10+ depending on length and the chosen error correction level. The encoding pipeline is non-trivial: raw bytes pass through polynomial division over GF(28) to generate Reed-Solomon error correction codewords. An incorrect implementation silently produces unscannable output. This tool implements the full ISO/IEC 18004 specification in-browser, including all four error correction levels (L at 7%, M at 15%, Q at 25%, H at 30% recovery), eight data masking patterns with penalty scoring, and proper interleaving for multi-block versions.

Limitation: this generator handles URLs up to approximately 2953 bytes (Version 40, Level L). For printed materials where partial obstruction is likely (stickers, merchandise), use Level Q or H. For clean digital displays, Level L maximizes data density. Pro tip: keep URLs short. Every additional character increases version size and reduces scan reliability at small print sizes.

qr code generator url qr code qr code maker free qr code qr code png qr code creator link to qr code

Formulas

The QR code encoding process transforms a URL byte sequence into a structured binary matrix. The data capacity for a given version v and error correction level ec is determined by the total codewords minus error correction codewords.

DataCapacity = TotalCodewordsv āˆ’ ECCodewordsv,ec

Reed-Solomon error correction generates t error correction codewords from the data polynomial D(x) by computing the remainder when divided by the generator polynomial G(x). All arithmetic is performed in the Galois Field GF(28) with the irreducible polynomial p(x) = x8 + x4 + x3 + x2 + 1 (value 0x11D).

EC(x) = D(x) ā‹… xt mod G(x)

The generator polynomial for t error correction codewords is:

G(x) = tāˆ’1āˆi=0 (x āˆ’ αi)

After placement, a masking pattern k is selected to minimize the penalty score P. The mask with the lowest total penalty across four evaluation rules is applied:

Ptotal = P1 + P2 + P3 + P4

Where P1 penalizes runs of 5+ same-color modules (N1 = 3 + i), P2 penalizes 2Ɨ2 blocks (N2 = 3), P3 penalizes finder-like patterns (N3 = 40), and P4 penalizes dark/light ratio deviation from 50% (N4 = 10).

Reference Data

VersionModulesL (Max Bytes)M (Max Bytes)Q (Max Bytes)H (Max Bytes)EC Blocks (L)EC Blocks (H)Alignment CountTypical Use
121Ɨ211714117110Short IDs
225Ɨ2532262014111Short URLs
329Ɨ2953423224121Standard URLs
433Ɨ3378624634141URLs with params
537Ɨ37106846044141Medium text
641Ɨ411341067458241Long URLs
745Ɨ451541228664256Complex URLs
1057Ɨ57271213151115286Long text blocks
1577Ɨ7752041229222041210vCards
2097Ɨ9785866648236451615Large data
25117Ɨ117127699871853882221Documents
30137Ɨ13717321370982742102828Bulk data
35157Ɨ157230618121306986123436Max practical
40177Ɨ1772953233116631273204046Maximum capacity

Frequently Asked Questions

Use Level Q (25% recovery) or Level H (30% recovery) for any physical print medium. Packaging endures scratches, moisture, and partial obstruction from stickers or shrink wrap. Level Q recovers from damage to roughly one quarter of the codewords. Level H handles nearly a third. The trade-off: higher error correction increases the QR version (module count), requiring larger print dimensions for reliable scanning. For a 40-character URL at Level L, you need Version 3 (29Ɨ29 modules). The same URL at Level H requires Version 5 (37Ɨ37). Minimum recommended print size is 2 cm Ɨ 2 cm for Version 3 at 300 DPI.
QR scanners rely on contrast ratio between dark and light modules. The ISO 18004 specification requires a minimum contrast ratio. When your foreground color approaches the background luminance, scanners cannot distinguish module boundaries. Maintain a contrast ratio of at least 4:1 between foreground and background. Dark foreground on light background works best. Avoid red foreground on green background - approximately 8% of males have red-green color vision deficiency, and many camera sensors have lower sensitivity to these combinations under certain lighting conditions.
In Byte mode (used for URLs), the maximum capacity ranges from 17 bytes (Version 1, Level L) to 2953 bytes (Version 40, Level L). A typical URL of 50-100 characters fits comfortably in Versions 3-6. This generator auto-selects the smallest version that fits your data at the chosen error correction level. If your URL exceeds capacity, use a URL shortener first. Each additional character potentially increases the version, adding complexity and reducing scan speed at small physical sizes.
After data placement, the QR specification requires testing all 8 mask patterns and selecting the one with the lowest penalty score. Penalty rules detect problematic visual patterns: long runs of same-color modules (Rule 1, penalty N₁ = 3 + run length āˆ’ 5), 2Ɨ2 same-color blocks (Rule 2, Nā‚‚ = 3 per block), patterns resembling finder markers (Rule 3, Nā‚ƒ = 40), and overall dark/light ratio deviation from 50% (Rule 4, Nā‚„ = 10 per 5% deviation). Poor masking can make structurally valid codes unscannable. This generator evaluates all 8 masks and applies the optimal one automatically.
The center of a QR code contains data modules, not reserved space. Placing a logo obscures those modules, effectively introducing damage. This works only if your error correction level can recover the lost data. At Level H (30% recovery), you can obscure up to approximately 30% of data area. In practice, limit the logo to 10-15% of the total area for safe margin. This generator does not add logos because doing so without precise module-level calculation risks producing codes that scan on some devices but fail on others. For logo embedding, generate at Level H and manually overlay a small centered image.
Changing the error correction level alters the ratio of data codewords to error correction codewords. At Level L, approximately 7% of codewords are recoverable, so fewer are allocated to EC. At Level H, 30% are recoverable, consuming significantly more space. This often forces the encoder to select a higher version (larger matrix). Additionally, more EC codewords change the data stream layout, interleaving pattern, and consequently the optimal mask - all of which change the final visual pattern. Two QR codes encoding identical URLs at Level L and Level H may differ in version, mask, and module arrangement.