Utilities

QR code generator

QR codes for links, text, Wi-Fi, email and phone numbers, as PNG or SVG. Made in your browser: what you type is never sent anywhere, and the codes don’t expire.

By using these tools you accept the Terms and the Privacy page.

The code appears here as you type.

How the QR code generator works

The QR code generator turns a link, plain text, a Wi-Fi login, an email or a phone number into a QR code you can download as PNG or SVG. It is for anyone putting a code on a menu, poster, slide or card. Before you download, it flags problems that stop phones from reading the code.

What goes into the code

Each type becomes the text format scanners expect. Encoded text, under the code, shows it exactly.

  • Link: https:// is added when there is no scheme, and a link with spaces is refused. Another scheme, a host name without a dot and plain http each get a warning.
  • Email: a mailto: link (RFC 6068) with the subject and message percent-encoded. An address that doesn’t look like one is flagged.
  • Phone: a tel: link (RFC 3966). Spaces, dashes, dots and brackets are dropped, and more than 15 digits is refused.
  • Wi-Fi: \ ; , : " are escaped with a backslash. Warnings for a network name over 32 bytes, a WPA password that isn’t 8 to 63 characters (or 64 hex digits) and any WEP network. While the password field shows dots, so does Encoded text; Copy still copies it in full.

How the code is built

Your content is split into numeric, alphanumeric (capital letters, digits, space and $%*+-./:) and byte segments, whichever takes the fewest bits, and the page picks the smallest QR version that holds them. Everything else is UTF-8 in byte mode, with no ECI header, since some scanners can’t read one. A QR library bundled with the page adds the error correction and picks the mask.

Higher error correction means less room: at most 2,953 bytes at L, 2,331 at M, 1,663 at Q and 1,273 at H, or 7,089 to 3,057 digits (ISO/IEC 18004). If your content is too long, the page names the strongest lower level that fits it, or, when none does, suggests shortening it or linking to the content.

Reading the results panel

Next to the preview, the page lists the code’s size in modules and its QR version, the modes used, how much of the level’s capacity the content takes, and the PNG’s final size. It also flags what can stop a scan:

  • Contrast below 4.5:1 between the two colors, measured as in WCAG 2. Below 3:1 is marked as a failure.
  • A dark color lighter than the light one, which makes an inverted code.
  • A quiet zone under 4 modules.
  • Fewer than 3 pixels per module in the PNG.

Sizes, files and next steps

  • The PNG size setting takes 128 to 4,096 pixels and the quiet zone 0 to 16 modules. Values outside those ranges move to the nearest limit.
  • Files are named after the content type, such as qr-wifi.svg. The SVG’s width and height match the PNG.
  • Before you print a code for a link, follow the link with Redirect trace to see every hop it takes.
  • For a guest Wi-Fi code, make a new password with the Password generator, at 63 characters or fewer.

Updated · Maintained by Liviu Tanase

Questions

Is my Wi-Fi password or other content sent anywhere?

No. The code is made in your browser by JavaScript, using the MIT-licensed qrcode-generator library bundled with this page. Nothing you type is sent anywhere or put in the address bar, and the PNG and SVG files are created on your device.

Do these QR codes expire or count scans?

No. The content is stored in the code itself, with no redirect through another server, so the code works for as long as the link or details in it are valid, and nobody counts the scans. To change where a printed code points later, you need a new code, or a link on your own site that you can redirect.

Which error-correction level should I choose?

M (15%) suits most uses. Higher levels let a scanner read a scratched, dirty or partly covered code, but make the code denser: more modules, so each one is smaller at the same printed size. Use L for long content shown on screens, and Q or H for codes printed outdoors or on surfaces that wear.

How does the Wi-Fi code work?

It holds a WIFI: text with the security type, network name and password, the format read by the iPhone camera (iOS 11 and later) and Android 10 and later. Special characters (\ ; , : ") are escaped with a backslash, as the format requires. Anyone who scans or photographs the code learns the password, so treat a printed code like the password itself.

PNG or SVG?

SVG is vector: it stays sharp at any size, which suits print and design tools. PNG is a bitmap at the size you choose. Each module is a whole number of pixels so the edges stay crisp, which can make the PNG a few pixels smaller than asked. For print, make the code at least 2 cm (0.8 in) wide, and about a tenth of the distance it will be scanned from.

Why won’t my code scan?

The usual causes: too little contrast, inverted colours (light modules on a dark background), a quiet zone narrower than 4 modules, a code printed too small for its density, or a glossy surface that reflects light. The page warns about the first three. Test the code with two or three phones, including an older one, before you print it.

What is the quiet zone?

The empty margin around the code. Scanners use it to find where the code starts. The QR standard asks for 4 modules on every side; keep that margin in the light colour, with no text or graphics in it.

How much can a QR code hold?

At level L, up to 2,953 bytes of text, 4,296 characters if it is only capital letters, digits, spaces and $%*+-./:, or 7,089 digits. Higher levels hold less: 1,273 bytes at H. The page encodes long runs of digits more compactly, so they make the code smaller. When the content is too long, it names a lower level that fits; past that, put the content on a web page and encode its link.

Can I check a link before I print its code?

Yes, and it’s worth it, since a printed code can’t be changed. Redirect trace shows every hop the link takes and where it ends up, and the Google Safe Browsing check shows whether Google flags the site.