QR Code Generator

Turn a URL, text, Wi-Fi login or contact card into a QR code. Choose the error-correction level and the saved image size, and see the version, module count and capacity use of the current code. Everything is drawn in your browser.

How a QR code stores information

A QR code is a two-dimensional barcode, introduced in 1994 by Denso Wave, that records data as a square grid of dark and light cells called modules. Three large squares in the corners (the finder patterns) tell a scanner where the code is, how big it is and which way is up, which is why you can scan one from almost any angle. The rest of the grid holds your data plus Reed-Solomon error-correction codewords, so a scratched, smudged or partly covered code can still be reconstructed. Text is packed in one of several modes: digits only, a 45-character alphanumeric set (digits, capital letters, space and $ % * + - . / :), or raw bytes. Anything else, including lowercase URLs and every non-Latin script, goes into byte mode as UTF-8. In that mode an accented letter takes two bytes, and a Chinese, Japanese or Korean character takes three.

The size of a QR code is not free-form. It comes in 40 versions: version 1 is 21×21 modules, and every step up adds four modules per side (modules per side = 17 + 4 × version), ending at 177×177 for version 40. More content or a higher error-correction level pushes the code to a higher version, which means more and smaller cells. The counters under the preview above show the version, module count and byte count of whatever you type, so you can watch a short URL stay sparse and a long one turn dense.

Where this QR code is made (and where your text goes)

The code is drawn inside your browser by a JavaScript QR library that ships with this page. The browser builds the module matrix, paints it onto a canvas element, and the PNG you download is read straight back from that canvas. Nothing you type here, whether a URL, a Wi-Fi password or a phone number, is sent to a QR-rendering web service or to our servers in order to generate the image. That also means the result is a static QR code: the content is baked into the pattern itself. It has no expiry date, no tracking redirect in the middle, and it keeps working even if this site disappears. The flip side is that you cannot edit it after printing and you get no scan statistics. If you need to change the destination later or count scans, you need a dynamic QR service that puts a redirect of its own in between.

Error correction: L, M, Q or H?

The four levels restore roughly 7%, 15%, 25% and 30% of damaged codewords. A higher level survives more damage, but it spends more of the symbol on redundancy, so the same content needs a higher version with smaller cells. The table shows the largest amount of one-byte-per-character content (plain English text or a URL) that fits in a version 40 symbol at each level. The numbers are computed when this page is built, using the same library that draws your code.

LevelApprox. recoveryMax characters (1 byte each)Max characters (3 bytes each, e.g. CJK)
L (low)about 7%2,953984
M (medium)about 15%2,331777
Q (quartile)about 25%1,663554
H (high)about 30%1,273424

A string made only of digits is packed more tightly: the standard allows up to 7,089 digits at level L, and 4,296 alphanumeric characters. In everyday use nobody gets near those limits, and you should not try. For everyday choices:

A common misconception is that H is always the safest pick. At a fixed print size, H makes each cell smaller than M does for the same link, so on a small business card a long URL at level H can scan worse than at level M. If you do not expect damage, shorten the link and stay with M.

How big should a printed QR code be?

Scanning depends less on the overall size than on the size of one module and on the blank border around the code. The standard asks for a quiet zone of four modules on every side, so the printed width is (modules + 8) × module size, and this tool adds the same four-module border to the PNG it saves. A familiar rule of thumb says the code should be about one tenth of the scanning distance across. For ordinary paper printing, a module of about 0.5 mm is close to the practical minimum and 0.8 mm or more is comfortable; treat these as rough guidance, since printer, paper and lighting all matter. The table works out the version and the full width, quiet zone included, for URLs of different lengths.

URL lengthM: version / modulesM at 0.5 mmM at 0.8 mmH: version / modulesH at 0.8 mm
25 charsv2 / 25×2516.5 mm26.4 mmv4 / 33×3332.8 mm
50 charsv4 / 33×3320.5 mm32.8 mmv6 / 41×4139.2 mm
100 charsv6 / 41×4124.5 mm39.2 mmv10 / 57×5752.0 mm
200 charsv10 / 57×5732.5 mm52.0 mmv15 / 77×7768.0 mm

Worked example 1. A 25-character URL at level M becomes a version 2 code, 25×25 modules. At 0.8 mm per module, (25 + 8) × 0.8 = 26.4 mm, a square you can fit in the corner of a business card.

Worked example 2. A 200-character URL at level M needs version 10, 57×57 modules, so at 0.8 mm you need (57 + 8) × 0.8 = 52.0 mm per side. Shortening the link to 50 characters brings it down to version 4 and 32.8 mm.

Worked example 3. A 100-character URL at level M is version 6 (41×41), 39.2 mm at 0.8 mm per module. The same link at level H jumps to version 10 (57×57), 52.0 mm. That is the cost of extra robustness, and the reason to pick H only when you need it.

When you save for print, choose 1024 px or larger. Enlarging a small PNG in a layout program smears the cell edges, whereas a big file scaled down stays crisp.

What to put in each QR type

URL or plain text

Shorter is better, because every extra character can push the code to a higher version. Strip tracking parameters you do not need. Include https://: without a scheme, some scanners show the text as plain text rather than offering to open a link (the tool warns you when it detects this). For anything printed, point the code at a short address you control that redirects to the final page, so a later change of destination does not require reprinting. And before you print, scan the proof with at least one iPhone and one Android phone.

Wi-Fi

The payload follows the widely used format WIFI:S:network-name;T:security;P:password;;. Security is WPA (the usual value, also used for WPA2 and WPA3 networks), WEP, or nopass for an open network, and a hidden network adds H:true;. If the name or the password contains a backslash, semicolon, comma, colon or double quote, each of those characters must be preceded by a backslash. A network called Cafe;Guest is written Cafe\;Guest. This tool does that escaping for you. For scale: WIFI:S:HomeWiFi;T:WPA;P:correct-horse-9;; is 41 characters, which is version 3 (29×29) at levels L and M, version 4 at Q and version 5 at H. Keep in mind that the password sits in the pattern in plain text, so anyone who sees the code can read it. Put it on a guest network and think twice before posting it publicly. Current phone cameras generally recognise Wi-Fi codes and offer to join, but very old devices may not.

Contact card (vCard)

The contact option writes a vCard 3.0 block (BEGIN:VCARD to END:VCARD) with name, organisation, phone, email and website; scanning it offers to add the person to the address book. Each additional field adds characters and therefore density, so include only what people really need, or encode a single link to a page that holds the details. Phones differ a little in how they present a scanned vCard, so test it on the devices your audience uses.

When a QR code will not scan

After you have the code

Frequently Asked Questions

Does a QR code made here expire?

No. This tool encodes exactly what you enter into the image, so there is no server-side record that can lapse. Of course, if the link inside the code stops working or the Wi-Fi password changes, the code is no longer useful.

Is my Wi-Fi password sent anywhere?

The code is generated in your browser and the PNG is created from the on-page canvas, so the password is not submitted to a QR service. The password does sit in plain text inside the finished pattern, though, so anyone who can scan the printed code can read it.

Can I put a logo in the middle?

You can, because error correction rebuilds hidden modules, but the covered area has to stay inside the recovery limit (about 30% even at level H) and must never hide the three corner squares. In practice keep a logo to roughly a tenth of the area, use level Q or H, and test on several phones.

Why does non-Latin text make the code so dense?

The library stores such text as UTF-8 bytes, and Chinese, Japanese and Korean characters take three bytes each, so a short sentence needs far more modules than the same number of English letters. A short ASCII link to a page holding the text scans much more reliably.

How much can one QR code hold?

The ceiling is version 40: about 2,953 one-byte characters at level L, falling to about 1,273 at level H (see the table). Codes close to that limit are very dense and hard to scan, so for real-world use aim for a URL of around 100 characters or fewer.

Can I choose the colours?

This tool always draws black modules on white, because that combination is the most widely readable. Coloured codes work only if the modules stay clearly darker than the background.

Related tools