A QR code looks like a fixed square, but every code is actually a sized-up version of a tiny 21-by-21 grid. The longer your link or text, the more "modules" (the little black and white squares) the scanner needs, and the larger the printed square has to be. This QR code generator calculator picks the smallest QR version that fits your content, tells you the module matrix size, and converts it into the exact pixel dimensions you should export for web or print — so you never ship a code that is too small to scan.
Type a URL, pick an error correction level, set how big each module should be, and the result updates instantly. Whether you are making a table tent, a business card, or a poster, the output number is the edge length of the square image you should hand to your designer.
How to Use
- Paste the Content to Encode — usually a URL such as
https://www.smekys.com, but a phone number, Wi-Fi credentials, or plain text work too. Every character counts against the capacity. - Choose an Error Correction Level: enter 1 for L (~7% recovery), 2 for M (~15%), 3 for Q (~25%), or 4 for H (~30%). This is the share of the code that can be smudged, torn, or covered and still scan. Start at M for most print jobs.
- Set the Module Size in pixels. One module is the smallest square the code is made of. A 4 px module is crisp on screen; bump it to 8–12 px if the code will be printed or scanned from a distance.
- Adjust the Quiet Zone Margin. This is the blank white border around the code, measured in modules. The QR standard recommends at least 4 modules; dropping below that makes scanners struggle to find the corners.
- Read the result card. It gives you the required QR version, the inner matrix size, how many bytes that version can hold at your chosen error correction, and the final square image size in pixels.
The version number is the heart of the calculation. Version 1 is 21×21 modules. Every step up adds 4 modules per side — version 2 is 25×25, version 10 is 57×57, and the maximum version 40 is 177×177. You almost never need anything above version 5 for a normal link.
How QR Version and Capacity Work
A QR code stores data in 8-bit bytes, and how many bytes a version can hold depends entirely on the error correction (EC) level you pick. Higher error correction reserves more of the code for recovery data, which leaves less room for your message — so the same link needs a larger version at level H than at level L. Encoding a 22-character URL at level M lands on version 2 (32-byte capacity), but encoding that exact same URL at level H forces the code up a version because H reserves more redundancy.
The byte-mode capacity table (selected rows) looks like this:
- Version 1 (21×21): L = 26, M = 16, Q = 13, H = 9 bytes.
- Version 2 (25×25): L = 44, M = 32, Q = 22, H = 16 bytes.
- Version 3 (29×29): L = 70, M = 52, Q = 38, H = 26 bytes.
- Version 10 (57×57): L = 346, M = 271, Q = 182, H = 120 bytes.
- Version 25 (109×109): L = 1,273, M = 997, Q = 715, H = 538 bytes.
- Version 40 (177×177): L = 2,953, M = 2,331, Q = 1,663, H = 1,273 bytes.
The calculator walks this table from version 1 upward and stops at the first row where your byte length fits. The output image size is then simple arithmetic: take the matrix size, add two times the quiet zone on each side, and multiply by the module size in pixels.
Why Error Correction Matters
Error correction is what lets a QR code on a scratched table tent, a stained receipt, or a rounded-corner package still scan. The trade-off is capacity: encoding a 22-character URL at level M lands on version 2 (26-byte capacity), but encoding that exact same URL at level H forces the code up a version because H reserves more redundancy.
Rule of thumb: use M (15% recovery) for clean digital screens and business cards, Q (25%) for packaging and posters that may scuff, and H (30%) when the code sits on a curved surface, a sticker over a fold, or a logo that overlays the middle. Level L (7%) is almost never worth it — the code is only marginally smaller yet fails on the first smudge.
Examples
Example 1 — A short link on a business card. Encoding https://www.google.com (22 characters) at error correction M requires version 2, a 25×25 module matrix, and a 32-byte capacity. With a 4 px module and the standard 4-module quiet zone, the exported square is (25 + 8) × 4 = 132×132 px — perfectly legible at card size.
Example 2 — A long campaign URL at the strongest correction. A 120-character tracking link with several utm_ parameters, encoded at level H (30% recovery), steps up to version 10, a 57×57 matrix, with 120 bytes of capacity. At 4 px per module plus the quiet zone that renders to 260×260 px. If you printed this at the same physical size as Example 1, each module would be smaller and harder to scan — so scale it up or shorten the URL.
Example 3 — A tiny code. The word Hello (5 characters) at level M fits comfortably inside version 1 (16-byte capacity), a 21×21 matrix, rendering to 116×116 px at 4 px/module. Short content is your friend: fewer modules mean a more forgiving, faster-scanning code.
Example 4 — Stress-testing pixel size. Encoding just Hi (2 characters) at level L on a 1,000,000-px-per-module setting is mathematically harmless — version 1's 26-byte capacity still fits, and the engine simply multiplies out to a 29,000,000-px edge length. In practice you would never do this; it exists to confirm the calculator handles very large pixel magnitudes without overflow.
FAQ
What QR version should my code be?
Start by letting the tool choose the smallest version that fits. A typical short URL lands on version 1 or 2 (21×21 or 25×25 modules). Only long text, vCards, or Wi-Fi credentials push you to version 5 or higher. Smaller versions scan faster and tolerate lower print resolution.
What do error correction levels L, M, Q, and H mean?
They are the share of the code that can be damaged and still scan: L recovers about 7%, M about 15%, Q about 25%, and H about 30% of codewords. Higher levels make the code denser and reduce how much data fits, so choose the weakest level your physical context can survive.
How big should I export my QR code?
Multiply the total module count (matrix plus quiet zone on both sides) by the module size in pixels. This calculator prints that final edge length for you. For print, aim for each module to be at least 0.5–1 mm on paper; for screens, 4 px or more per module reads cleanly.
Why does a higher error correction level make my code bigger?
Because error correction adds redundant recovery data into the same square. To keep your link, the generator enlarges the grid (steps up the version). Going from M to H on a long URL can jump you two or three versions, which is why long links should be shortened before encoding.
What is the quiet zone and can I make it smaller?
The quiet zone is the blank white border that tells the scanner where the code begins. The specification recommends at least 4 modules. You can shrink it for compact designs, but below 2 modules many phone cameras will refuse to lock on. Keep the border.
What is the maximum length a QR code can hold?
At the maximum version 40 (177×177 modules) and the lowest correction level L, byte mode holds about 2,953 characters. At the toughest level H, the ceiling drops to about 1,273 characters. Beyond that you need a shorter link, not a bigger code.
Disclaimer
This QR code generator calculator is provided for informational purposes only. It computes the required version, matrix size, byte capacity, and final pixel dimensions; it does not render the actual QR bitmap itself — that step needs a frontend QR-encoding library. Version, capacity, and pixel-size estimates follow the ISO/IEC 18004 byte-mode capacity table and are typical for standard QR generation; actual rendered codes may vary slightly by encoder, character encoding, and scanner. Always print or export your code and test-scan it on the real device and at the real size before publishing.