← All blog posts

QR Code Generator explained with worked examples

WhiteUI · A plain-English guide to the QR Code Generator

The QR Code Generator turns text into a square pattern of black and white modules that a phone camera can read. You give it the text, it picks the smallest QR version that fits that text at your chosen error-correction level, and it draws the grid on a canvas you can download as a PNG. Three examples, each with different text, show how the same three settings handle a home page, a contact page and a short message.

At a glance

Error correction M recovers about 15%15% recoverable85% dataM is the default; L is 7%, Q is 25% and H is 30%
Error correction level M, the tool’s default, recovers about 15 percent of damaged modules; the rest of the code holds the data.

Example 1: a home page link

Type “https://whiteui.com”, keep the size at 256 px and keep error correction on M. The tool reports version 2, a 25 × 25 module grid, and 19 characters. At 256 px each module is 10 px wide, so the canvas is 250 px across. This is the tool’s own worked example, and it is the simplest check that the tool is working: scan the code and it should open exactly that link, with nothing added and nothing missing.

Example 2: a longer link

Now type “https://whiteui.com/contact”, which is 27 characters long, eight more than the first example. Keep the size at 512 px and error correction on M. The code is drawn at 500 px across for the version 2 grid, because each module is 20 px wide at that size. A longer link needs a denser grid or a bigger version than a short one, which is why the version line under the code is worth reading: it tells you how much of the code’s capacity your text is using. Scan it before you download it, and check that it opens the contact page, not the home page.

Example 3: a short message

Type a plain message instead of a link, for example “Hello, this is Satish. My portfolio is at https://whiteui.com”, which is 61 characters long. Keep the size at 256 px and error correction on M. The tool draws the code the same way, in your browser, and the download is still a PNG called qr-code.png. A phone that scans it shows the message as text, because a QR code holds text, and a link is simply text that starts with “https://”. The tool does not care whether the text is a link or a sentence; it encodes whatever you type, up to 500 characters.

What the version line means

Under every code the tool prints a line like “Version 2 • 25 × 25 modules • error correction M (~15% recoverable) • 19 characters.” The version is the size of the grid: version 1 is 21 × 21 modules, version 2 is 25 × 25, and the largest, version 40, is 177 × 177. The tool picks the smallest version that fits your text, so a short link gets a small, easy-to-scan grid and a long message gets a denser one. The module count comes from the rule modules = 4 × version + 17, so 4 × 2 + 17 = 25.

Why size and content are separate

Changing the image size from 256 px to 1,024 px does not change the link inside the code. It only draws the same grid with bigger squares: at version 2, 1,024 px gives a 1,000 px canvas with each module 40 px wide. Changing the text, or the error-correction level, does change the grid, because both change what must fit inside it. If a code stops scanning after you edit the text, read the version line first; a jump to a much bigger version is the usual cause.

The common mistake

People paste a link with a space at the end, copied from a document, and the code then holds that space too. The code still scans, but it opens a link with a trailing space, which most browsers reject. Delete any space at the start or end of the text before you download the code.

Frequently asked questions

What does the QR Code Generator do with my text?

It picks the smallest QR version that fits your text at your chosen error-correction level, draws the module grid, and lets you download it as a PNG.

What is version 2 in the QR Code Generator?

Version 2 is a 25 by 25 module grid. The tool reports it for the default link https://whiteui.com at error correction M.

Can the QR Code Generator hold a message, not just a link?

Yes. A QR code holds text, and a link is simply text that starts with https://, so a short message of up to 500 characters works the same way.

Does a bigger image size change the link inside the code?

No. Changing the size from 256 px to 1,024 px only draws the same grid with bigger squares. The link inside stays the same.

More guides on the QR Code Generator

Try it yourself

Try the QR Code Generator — free, in your browser.

Open the QR Code Generator