CalcHub

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)

VersionModulesNumericAlphanumeric (uppercase)Byte (English, URLs)Korean (UTF-8)
121×213420144
225×256338268
329×29101614214
433×33149906220
537×372021228428
745×4529317812240
1057×5751331121371
1577×77991600412137
2097×971,600970666222
25117×1172,3951,451997332
40177×1775,5963,3912,331777

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?
How do I make Wi-Fi, phone, SMS, or map codes?
Can I put a logo in the middle?
How much content can a code hold?
My printed code won't scan. What should I check first?
Does the code expire? Can I change the link after printing?

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