QR Code Generator

Type what the code should contain and it appears immediately. The string that gets encoded is shown underneath, so you can check the code says what you meant before you print it on anything.

Options

Higher levels survive more damage but leave less room for data, so a long payload can fit at M and not at H.

px

The download is this many pixels square; the preview is scaled down to fit.

The empty border around the code. Standards require 4 modules.

Download PNG

Preview

Fill in the fields above and the code appears here.

Advertisement

How to use it

  1. Choose what goes in the code

    A link or plain text, a Wi-Fi network, an email, an SMS, a phone number, or a contact card. The fields change to match — for Wi-Fi you get a network name, a password and a security type; for a contact card you get name, organisation and phone.

  2. Read the encoded string

    Under the preview is the exact string stored in the code. It is worth a glance every time: it is where you notice that your Wi-Fi password contains a semicolon, or that the URL is missing its https://.

  3. Set the error correction level

    This decides how much of the code can be damaged or covered and still scan. Higher is tougher but holds less data. If you plan to put a logo in the middle, go up a level to compensate.

  4. Download PNG or SVG

    PNG at whatever pixel size you choose, or SVG for anything that will be printed or scaled — an SVG has no fixed resolution, so a business card and a poster can use the same file.

A QR code is a string, and nothing more

A QR code does not contain a link. It contains a sequence of characters, and the app that scans it decides what to do with those characters. When the sequence starts with https:// most phones offer to open it; when it starts with WIFI: the phone offers to join the network; when it starts with BEGIN:VCARD it offers to save a contact. Everything this tool does is help you build that string correctly.

That is also why a code can never "expire" by itself. A static code — the kind generated here — will scan for as long as the printed image is legible, because the destination is written into the pattern. The codes sold by subscription services are a different thing: they encode a short redirect URL that the vendor controls, which is how they can count scans or change the destination later, and also how they stop working if you stop paying. Both have their uses, but they are not the same product and the difference is rarely stated clearly.

The encoding itself has four modes. Numeric handles digits only and packs them densely, which is why a code holding just a phone number is visibly coarser than one holding a URL. Alphanumeric adds uppercase letters and a few symbols. Byte mode carries any text — that is the mode used for lower-case URLs, and for Chinese, Japanese and Korean. There is also a dedicated kanji mode that is more compact for Japanese, but support for it in scanners is uneven, and the byte mode fallback costs very little. Chinese characters take three bytes each in UTF-8, so a Chinese payload is roughly three times the length of the same number of Latin characters — that is what makes a long Chinese sentence hit the capacity limit sooner than you expect.

Choosing an error correction level for where the code will live

QR codes carry redundant data so that a damaged or partly obscured code still decodes. The four levels recover roughly 7%, 15%, 25% and 30% of the code area, and they are usually labelled L, M, Q and H.

The trade is straightforward: more redundancy means more modules for the same payload, so the code gets denser. Denser is worse for scanning at small sizes and worse for cheap printers. That is why the sensible default is M — it tolerates a scuff or a thumbprint without making the pattern noticeably busier. The level to raise it is when you know something will cover part of the code: a logo in the centre is the common case, and a printed logo covering a tenth of the area is comfortably within Q or H.

The level to lower it is when the payload is long and the code is coming out too dense to print. A long tracking URL at H can produce a pattern that smears into a grey square on a 300 dpi label printer. Shortening the URL — not lowering the level — is usually the better fix, because it improves the density and the readability of the destination at the same time.

One real-world complication: many cheap scanners, including some phone cameras, do not handle rotated or mirrored codes as gracefully as the standard allows, and they are much less tolerant of low contrast than the error correction percentage suggests. A code at H that is printed dark grey on light grey will still fail. Contrast matters more than the level.

Wi-Fi codes are convenient, and they hand over the password

A Wi-Fi QR code is the single most useful thing most people make with a generator, and it is worth being explicit about what it does. The password is stored in the code in plain text. There is no encryption, no expiry and no way to revoke it — anyone who photographs the code has the password, and can decode it in seconds with an app that does nothing more than read text.

That is fine for a café wall or a guest network. It is not fine for a code posted somewhere semi-public that leads into the network your point-of-sale terminal sits on. The standard advice holds: put guests on a separate network with client isolation on, and treat the QR code as exactly as public as the password written on a chalkboard.

Two details about the Wi-Fi payload cause most of the failures. First, the format uses semicolons and colons as separators, so those characters inside a network name or password have to be escaped with a backslash — a password like `co;fee2024` will be truncated at the semicolon by a scanner if it is not escaped. This tool escapes them for you, and shows you the escaped string so you can see what happened. Second, both iOS (11 and later) and Android (10 and later) join networks from the camera app without any extra software, but older Android versions and many third-party scanner apps will simply display the text instead of offering to connect. A code taped to a wall for guests should assume a range of devices.

Hidden networks are supported through an extra flag, but they are worth avoiding for this purpose: the phone has to probe for the network by name, which is slower and, on some devices, unreliable.

Why a code that scans on your screen fails once printed

The most common disappointment with QR codes is not a broken code; it is a code that works perfectly on a monitor and refuses to scan on paper. Almost every time it comes down to size and the quiet zone.

The quiet zone is the empty margin around the pattern, and the standard asks for four modules — four of the little squares — on every side. It looks like wasted space, and designers trim it constantly. Trimming it is the single fastest way to make a code unreliable, because the scanner needs that white border to find the code and work out its orientation. If your layout cannot afford the margin, shrink the code but keep the border.

Print size is the other half. The rule of thumb is that the code should be at least a tenth of the distance from which it will be scanned: a code read from 30 cm needs to be about 3 cm across, one read from 3 metres needs to be about 30 cm across. That is for a clean, well-lit code. Behind glass, in a dark corridor, or with a slightly damaged surface, double it.

A few printing details that quietly matter. Print dark on light, never the reverse — most scanners handle inverted codes poorly even though the standard permits them. Avoid glossy stock under spotlights, because the reflection lands on the code exactly where the camera is looking. Matte laminate resists rain and fingerprints better than nothing, and a laminated code outdoors lasts long enough to be worth the extra step.

Finally, test the printed piece before the full run. Print one copy at the actual size, on the actual material, and scan it with a cheap phone in poor light. That two-minute check catches nearly every problem before it is multiplied by five thousand.

Contact cards, email, SMS and phone codes

The vCard mode produces a contact card that a phone can save directly into its address book. It is genuinely useful on a conference badge or a business card, and it has one classic trap: the vCard standard stores the name as `family;given` while the display name is `given family`. Get the order wrong and every contact saved from the code will appear in address books sorted under the person’s first name. The format also requires CRLF line endings, which some older scanners enforce strictly — a code built with ordinary newlines may save only the first line.

Email codes open a new message in the phone’s mail app, pre-filled with the address and, optionally, a subject and body. The subject and body have to be percent-encoded inside the payload, which is why a mailto string looks so unreadable; this tool builds it for you. Support is close to universal on phones, and close to zero in desktop scanner software, which is usually acceptable — nobody points a laptop at a poster.

SMS codes are the least consistent of the set. There are two competing formats, and different scanners support different ones. The format used here, SMSTO:, is the one recognised by the widest range of apps, including most third-party scanners and both major phone platforms. It is a reasonable choice for a “text us to book” sign, provided you accept that a minority of scanners will just show the text.

Phone codes are the simplest and the most reliable: a tel: payload opens the dialler with the number filled in. For anything that has to work on every device with no ambiguity — a support line on a poster, a helpline on a leaflet — a plain printed phone number next to the code is still the safer combination, because a phone number is readable by a human when the code is not.

Last updated:

Frequently asked questions

Do the codes expire?

No. Codes generated here are static: the destination is encoded directly into the pattern, so they work for as long as the image is readable. Codes sold by subscription services are different — they encode a redirect the vendor controls, which allows scan counting and changing the destination, but also means the code stops working if the subscription lapses.

Is anything uploaded?

No. The encoding runs in the page using a JavaScript library, so the text, the URL and any Wi-Fi password stay in your browser. That matters here because Wi-Fi passwords and contact details are exactly the kind of thing you would rather not send to a server you do not control.

Can I put my logo in the middle?

Yes, with care. Raise the error correction level to Q or H first — that is what the redundancy is for. Keep the logo under about a fifth of the width, and never cover the three large squares in the corners, which are how a scanner finds the code at all. Then scan the result with several phones before printing.

What size should I print it?

A rough rule is a tenth of the scanning distance: 3 cm for a code read from 30 cm, 30 cm for one read from 3 metres. Double that in poor light, behind glass or on a surface that will get dirty. Never trim the quiet zone to make it fit — shrink the code instead.

It looks fine but will not scan. Why?

Check contrast first (dark on light, never inverted), then the quiet zone, then the print size. Beyond that, the usual culprits are a glossy surface reflecting a light, a logo covering too much of the pattern, or a payload so long that the modules have smeared together on a low-resolution printer. Shortening the payload fixes the last one.

Can I tell how many times it was scanned?

Not with a static code like this one — the pattern contains no measuring mechanism and nothing is contacted when it is scanned. Counting scans requires the redirect-based codes sold by commercial services, which route every scan through their server. That has a privacy cost worth weighing: the vendor sees every scan.

Does the link inside need to be https?

It does not need to be for the code to work, but it should be for the person scanning it. Modern browsers warn loudly on plain http, and some only offer to open the link rather than opening it automatically. If you are printing codes for anything long-lived, use https and check that the destination still exists a year later.

Why did my Chinese text make the code much denser?

Because the payload is measured in bytes, not characters. Chinese, Japanese and Korean characters take three bytes each in UTF-8, so a 40-character Chinese sentence is roughly as long as a 120-character Latin one and needs a denser code. If the pattern gets too busy to print, shorten the text rather than lowering the error correction.