DevToolsmith

QR Code Generator

Make QR codes for links, plain text, Wi-Fi logins, contact cards, emails, SMS and phone numbers. Pick the error correction level and colors, then download a sharp SVG or a PNG. Codes are generated in your browser, contain your content directly and never expire.

Runs 100% in your browser — nothing is uploaded

15%, the usual default

Version 2 (25×25 modules) · 24 bytes

How much fits in a QR code

Error correctionMax bytes (version 40)Use when
L 2,953 Clean screens and prints where nothing covers the code
M 2,331 The usual default
Q 1,663 Printed on things that get scuffed, like packaging
H 1,273 When a logo is placed over the middle

Text is stored as UTF-8, so a Chinese character takes 3 bytes and an emoji 4. Shorter content gives a smaller, less dense code that’s easier to scan, so keep URLs short.

Generating QR codes in code

Shell (qrencode)
qrencode -o code.png -s 10 'https://example.com'
qrencode -t SVG -o code.svg 'WIFI:T:WPA;S:Office;P:secret;;'
qrencode -t ANSIUTF8 'https://example.com'   # print in the terminal
Python (qrcode)
# pip install "qrcode[pil]"
import qrcode

img = qrcode.make("https://example.com", error_correction=qrcode.constants.ERROR_CORRECT_M)
img.save("code.png")
JavaScript (qrcode)
import QRCode from 'qrcode';

const svg = await QRCode.toString('https://example.com', { type: 'svg', errorCorrectionLevel: 'M' });
await QRCode.toFile('code.png', 'https://example.com', { width: 1024 });

Encoding a URL with query parameters? Check it with the URL parser first. Making icons for the site the code points to? Try the favicon generator.

Frequently asked questions

Do these QR codes expire?

No. The content is stored in the code itself, so it works forever and doesn’t depend on this site. Many “free QR code” services instead encode a short link to their own server so they can count scans; those “dynamic” codes stop working when the subscription ends or the service shuts down. If you need scan statistics, encode a URL with UTM parameters and read them in your analytics.

How do Wi-Fi QR codes work?

They contain a text like WIFI:T:WPA;S:Office;P:secret;;. The camera apps on iPhone (iOS 11 and later) and Android recognise this format and offer to join the network. Special characters in the network name or password (\ ; , : ") are escaped with a backslash automatically.

Which error correction level should I choose?

Higher levels let the code be read even when part of it is dirty, damaged or covered, at the cost of more modules (a denser code). M is a good default. Use H if you plan to put a logo in the middle, and L to keep a long URL from producing a very dense code.

SVG or PNG?

SVG for print and design tools: it’s a vector, so it stays sharp at any size and is tiny. PNG for places that only take images, such as slides, documents and social posts; pick a size of at least 1024px for print.

Why won’t my code scan?

Common causes: too little contrast, light modules on a dark background (some readers can’t handle inverted codes), no white margin around the code (the spec asks for 4 modules of quiet zone), or a code printed too small for its density. A rule of thumb is that the code should be at least a tenth as wide as the scanning distance.