QR Code Generator
It happens more often than you would think: a few thousand flyers come back from the printer, and only then does anyone notice that phones struggle to read the QR code. The cause is rarely the code itself. It is usually a print size that is too small, a margin that is too thin, or content that is too long. This generator turns whatever text or URL you type into a QR code and lets you download it as a square PNG of 256, 512, or 1024 pixels. The error correction level is fixed at M (about 15% recovery), the smallest version that fits your content is chosen automatically, and the encoding happens in your browser, so your input never reaches a server. There is no dedicated form for Wi-Fi or contact cards, but typing the right string format produces exactly the same codes, and the formats and print guidelines are laid out below.
Everything is processed in your browser — nothing is sent to a server.
Examples
A menu URL for restaurant tables
A 24-character URL such as https://example.com/menu produces a version 2 code of 25×25 modules. Even at 256 px, with the margin included, each module is about 7.8 pixels, which is plenty sharp on screen. If diners scan from about 30 cm away, a printed size of at least 3 cm per side works well; printing 3 cm at 300 dpi takes about 354 pixels, so download the 512 px version and scale it down for a cleaner result. Add tracking parameters like utm_source to the same address and it grows to 113 characters, which pushes the code up to version 7 at 45×45 modules. The smaller you print, as on a table tent, the more it pays to keep the URL short.
A Wi-Fi login code for café guests
Type WIFI:T:WPA;S:CafeGuest;P:coffee1234;; into the input and a phone that scans it reads the network name and password and offers to join. T is the security type (WPA, WEP, or nopass for an open network), S is the network name, and P is the password, and the two semicolons at the end are required. If the name or password contains a semicolon, comma, colon, backslash, or double quote, put a backslash (\) in front of it so it is read correctly. This example is 37 characters and becomes a version 3 code of 29×29 modules. Because the password is stored in plain view, a venue that rotates its password needs to print a new code each time it changes.
Contact details on the back of a business card
A vCard 3.0 string (the format that starts with BEGIN:VCARD and ends with END:VCARD) holding a Korean name, company, mobile number, and email runs to about 113 characters, and because each Korean character takes 3 bytes in UTF-8, it becomes a version 8 code of 49×49 modules. Printed at 2 cm per side on a card, each module including the margin is only about 0.35 mm, which is a tight fit for a phone camera's focus. Squeeze the same details into the shorter MECARD:N:Hong Gildong;TEL:01012345678;EMAIL:gildong@example.com;; style and the code drops to a version 4, 33×33-module symbol with modules of about 0.49 mm. If you have a lot to share, encoding just the URL of a contact page is the most reliable option.
Size and maximum capacity by version (error correction level M)
| Version | Modules | Numeric | Alphanumeric (uppercase) | Byte (English, URLs) | Korean (UTF-8) |
|---|---|---|---|---|---|
| 1 | 21×21 | 34 | 20 | 14 | 4 |
| 2 | 25×25 | 63 | 38 | 26 | 8 |
| 3 | 29×29 | 101 | 61 | 42 | 14 |
| 4 | 33×33 | 149 | 90 | 62 | 20 |
| 5 | 37×37 | 202 | 122 | 84 | 28 |
| 7 | 45×45 | 293 | 178 | 122 | 40 |
| 10 | 57×57 | 513 | 311 | 213 | 71 |
| 15 | 77×77 | 991 | 600 | 412 | 137 |
| 20 | 97×97 | 1,600 | 970 | 666 | 222 |
| 25 | 117×117 | 2,395 | 1,451 | 997 | 332 |
| 40 | 177×177 | 5,596 | 3,391 | 2,331 | 777 |
Calculated directly with the qrcode library this generator uses. Alphanumeric mode can only hold uppercase letters, digits, spaces, and the symbols $ % * + - . / :, so a URL containing lowercase letters is stored in byte mode. In practice a single string can switch modes from one segment to the next, so slightly more may fit than the table shows.
FAQ
Is what I type sent to a server or recorded anywhere?
No. The qrcode library bundled with the page draws the code inside your browser, and the download is saved straight from data held in browser memory. Since nothing you type is sent in a request, this site neither stores your content nor counts scans. Keep in mind, though, that anyone who scans the code can read everything in it. Unless the information is meant to be shared, the way a guest Wi-Fi password is, leave personal details and account passwords out.
How do I make Wi-Fi, phone, SMS, or map codes?
There are no dedicated forms, but scanner apps recognize certain string formats by convention. For Wi-Fi, use WIFI:T:WPA;S:NetworkName;P:password;;. To start a call, use tel:01012345678; to start an email, mailto:name@example.com; to start a text message, SMSTO:01012345678:your message; and for a map location, geo:37.5665,126.9780 with latitude and longitude. Contact cards use the MECARD or vCard format. What happens after the scan is up to the device and app, so behavior can vary a little by format. Test with both an iPhone and an Android phone before you print.
Can I put a logo in the middle?
This generator has no logo feature. You can overlay one in an image editor, but with the error correction level fixed at M there is only about 15% recovery margin. A logo that covers more of the data area than that can make the code unreadable, and covering any of the three large corner squares (the finder patterns) stops it from being detected at all. If you need a logo, use a tool that supports level H (about 30% recovery), keep the logo small relative to the code, and test on several phones. When changing colors, keep a dark code on a light background; some apps cannot read inverted QR codes.
How much content can a code hold?
At level M's maximum, version 40, a code holds 5,596 digits, 3,391 uppercase alphanumeric characters, 2,331 characters of ordinary text or URLs with lowercase letters, or 777 Korean characters. Anything longer triggers the message 'Could not generate a QR code'. But fitting is not the same as scanning well. Version 40 is 177 modules across, so at 256 px each module is just 1.4 pixels, and a print at any normal size will not scan. As a practical target, stay at version 10 (57×57) or below, keep URLs under about 100 characters, and for long content publish it on a web page and encode the address instead.
My printed code won't scan. What should I check first?
Start with size. A common rule of thumb is to make each side about one tenth of the scanning distance, so a business card or flyer read from 30 cm needs about 3 cm, and a poster viewed from 2 m needs around 20 cm. Next is the margin. The standard calls for an empty border four modules wide around the code, and this generator's PNG already includes one, so check that it was not cropped off or covered by text or patterns during layout. Third are contrast and surface: pale gray codes, photo backgrounds, reflections from glossy lamination, and curved surfaces such as bottles and cups all lower the read rate. Last is content length. If everything else checks out, shortening the content to drop to a lower version is usually the most effective fix.
Does the code expire? Can I change the link after printing?
It never expires. This generator makes static QR codes, with the content written into the image itself, so they keep working without any server behind them. For the same reason, the content cannot be changed once printed. If the destination might change later, encode a web address you control and update the page or redirect it points to. Also note that the download is always named qrcode.png, so when you make several, rename each file for its purpose right away to avoid mixing them up.
What a QR code is made of and how it is read
The QR code is a two-dimensional code that Japan's Denso Wave developed in 1994 for tracking automotive parts. A camera locates it and works out its angle from the finder patterns, the three large squares in the corners; corrects for distortion using the smaller alignment patterns that appear from version 2 up; and measures module spacing from the dotted timing patterns running between the finder patterns. Data and error correction information fill the remaining cells.
A code's size is set by its version. Version 1 is 21×21 modules, each version adds four modules per side, and version 40 reaches 177×177. This generator picks the smallest version that can hold your content, so the shorter the content, the coarser and easier to read the code.
Data is stored in one of four modes, numeric, alphanumeric, byte, and kanji, with numeric the most compact. Kanji mode is designed for the Japanese Shift JIS character set, so Korean text goes into byte mode as UTF-8 at 3 bytes per character. That is why the same number of Korean characters produces a code nearly three times larger than English text.
Error correction levels L, M, Q, and H
Every QR code carries Reed–Solomon error correction data, which lets it recover its content when part of it is dirty or torn. The levels are named for how much they can recover: L (about 7%), M (about 15%), Q (about 25%), and H (about 30%). Higher levels add more correction data, so the same content needs a larger version. A 24-character URL is version 2 at M but version 3 at H, and a 161-character English vCard grows from version 9 at M to version 13 at H.
Denso Wave describes M as the most frequently chosen level, suggests Q or H for factory environments where codes get dirty, and L for clean environments with large amounts of data. This generator is fixed at M with no option to change it, which is enough for indoor signage, on-screen display, and ordinary print.
Print size, margins, and converting pixels to centimeters
The empty space around a QR code is called the quiet zone, and Denso Wave specifies four modules on every side. This generator's PNG follows that rule with a four-module white margin on every side, so there is no need to add a border of your own. Just avoid cropping that margin or letting text and patterns overlap it when you edit the image, and remember that the print size includes it: a version 2 code printed 3 cm across has a pattern only about 2.3 cm wide.
When printing the PNG, work out the size from the resolution. At 300 dpi, 256 px prints at about 2.17 cm, 512 px at about 4.33 cm, and 1024 px at about 8.67 cm. Printing larger than that stretches the pixels and can blur the edges, so choose an image bigger than your target size and scale it down. If you must enlarge it in an editor, use a nearest-neighbor or no-interpolation option so the module edges stay crisp.
It is also worth checking the physical size of one module: divide the printed side length by the version's module count plus the eight margin modules (four on each side). A version 2 code printed at 3 cm gives 3 cm ÷ 33 ≈ 0.91 mm, which is generous, but a version 8 code at 2 cm shrinks to about 0.35 mm and becomes hard to read on older phones or in dim light. A higher version needs a correspondingly larger print.
Quishing: phishing by QR code
Quishing, a blend of QR and phishing, uses fake QR codes to send people to malicious sites. Known tactics include sticking counterfeit codes over legitimate ones on parking pay stations, EV chargers, and public notice boards, and slipping codes into letters or text messages disguised as fine notices or delivery alerts. The page behind the code typically mimics a real payment or login screen, or pushes you to install an app.
Instead of opening a scanned link immediately, check the domain in the address preview your camera shows. Avoid installing apps or entering card numbers and verification codes on pages opened from a QR code; if you need to pay, go through the official app or an address you type yourself. If you run a business that displays QR codes, print the destination address in text next to the code and check regularly that nobody has stuck a sticker over it.
Sources
Related Calculators
Character Counter
Count characters with and without spaces, bytes, words, and lines in real time. A free character counter for personal statements, essays, and reports with length limits.
Unit Converter
Convert 33 units of length, weight, temperature, area, data, and speed. Inches, miles, pounds, ounces, Fahrenheit, kelvin, acres, knots, and GB, with the exact defined factors and the mistakes people commonly make.