Generate QR codes instantly
Encode URLs, text, Wi-Fi, vCards into a QR code. Customise size, colours, and error correction. Download as PNG or SVG. Runs entirely in your browser.
Scan with any QR reader · 256×256px · EC M
How to generate a QR code: a complete step-by-step guide
The QR Code (Quick Response Code) was invented at Denso Wave in 1994 and standardized as ISO/IEC 18004. It packs up to ~3 KB of data into a 2-D matrix of modules with Reed-Solomon error correction, so a code keeps scanning even when partially damaged. This tool renders QR symbols on a <canvas> via the qrcode library — fully client-side, no remote rendering service involved.
- 01
Type or paste the content to encode
QR symbols can carry plain text, URLs, email addresses, phone numbers, SMS payloads, geo coordinates, calendar events, vCards, and Wi-Fi credentials. Each uses a small structured-prefix convention scanners recognize — e.g.
WIFI:T:WPA;S:NetworkName;P:secret;;joins phones to a Wi-Fi network with one scan.Capacity depends on encoding mode (numeric, alphanumeric, byte, kanji) and version (1-40, 21×21 to 177×177 modules). Long URLs benefit from being shortened first — pair with the URL Encoder for any special characters before embedding.
ISO/IEC 18004URLWIFI:vCardbyte modeinput · contenturlhttps://trydevtools.com
23 B · 1 linebyte mode · ready - 02
Customize size and colours
Canvas size controls pixel dimensions (64-1024 px). Foreground and background colours change the module palette — but scanners rely on luminance contrast, so keep a clear dark-on-light relationship. Inverted colour schemes (light-on-dark) work on most modern scanners but fail on older or industrial readers.
Add a 2-module quiet zone (margin) on every side — already built into this renderer — so phone cameras can locate the finder patterns.
contrastquiet zonemodulesfinder patternluminancestyle · palette256 px#000000 on #ffffff · margin 2
palette setscanner-safe - 03
Pick an error correction level
QR uses Reed-Solomon error correction with four levels —
L(~7%),M(~15%),Q(~25%),H(~30%) of codewords recoverable. Higher levels mean more redundancy, larger symbols, but better tolerance of damage, smudges, glare, or a logo overlay in the centre.Use
Lfor clean digital display,Mas a default,Qfor printed marketing collateral, andHwhen you plan to overlay a logo or expect physical wear (stickers, packaging, outdoor signage).Reed-SolomonL 7%M 15%Q 25%H 30%error correctionM (15%)L · M · Q · H (7% → 30%)
balancedISO/IEC 18004 § 7.5 - 04
Download as PNG or SVG
Export PNG (raster) for quick sharing in chat, slides, or web images. Export SVG (vector) for print collateral, scalable display, or anywhere you need a crisp code at any size without rasterization artifacts.
To round-trip a code back to text, use the QR Code Reader. To encode a binary payload, base64-encode it first with the Base64 Encoder, then place the ASCII result inside the QR.
PNGSVGvectorrasterprivacy-firstexport · formatspng · svg✓ Downloaded: qrcode.png ✓ Downloaded: qrcode.svg ✓ 100% client-side
ready to ship0 outbound
Encoding without surprises
Always UTF-8 first
Use TextEncoder / TextDecoder for bytes ↔ string conversion. btoa alone breaks on non-ASCII.
URL-safe vs standard Base64
Standard uses +, /, =; URL-safe swaps to -, _, no padding. Don’t mix them.
Hashes aren’t passwords
SHA-256 is fast; that’s good for fingerprints, bad for passwords. Use bcrypt / argon2 for credentials.
Watch padding rules
Some decoders are strict about = padding, others auto-pad. If round-trips fail at exactly 1 or 2 bytes, check padding.
Use Web Crypto for keys
Generate cryptographic keys via crypto.subtle, never Math.random. The latter is predictable.
JWT decode ≠ verify
Decoding a JWT just splits and base64-decodes. Verification needs the issuer’s public key / shared secret.
When to use QR codes
Marketing, events, Wi-Fi sharing, printable links.
Print-to-web links
Posters, business cards, signage — link physical to digital. Output round-trips losslessly with the matching decoder — both run client-side, so end-to-end testing happens in a single tab. Encoding flows through TextEncoder for predictable UTF-8 semantics.
RFC-compliantWi-Fi sharing
Guests scan to join your network without typing a password. Web Crypto's subtle.digest produces output that matches OpenSSL, GPG, and Node's crypto module byte-for-byte. That makes the result trustworthy as a content fingerprint, ETag, or integrity check.
OpenSSL-matchedvCard contacts
Encode a contact card so people can save it instantly. Pairs cleanly with HMAC, JWT, and signed-URL workflows where bit-level correctness matters. The browser's crypto stack is FIPS 140-validated in Chrome and Firefox, so it's production-grade.
losslessApp deep links
Bridge mobile users from web pages into native apps. Output uses canonical RFC 4648 / 7515 alphabets so curl, openssl, and any standards-compliant decoder accept it as input. URL-safe variants drop padding for tokens that travel in query strings.
byte-identicalEvent check-in
Quick attendee codes for door scanners. Heavy hashing runs through useMemo so large inputs don't block typing. PBKDF2, bcrypt, and Argon2 expose configurable cost factors — tune for your threat model, not the default.
spec-gradeProduct packaging
Track-and-trace, manuals, warranty registration. Same input plus same options always yields identical bytes. That's the foundation for content-addressed storage (IPFS, Git, S3 ETags) and means the output is safe to commit to fixtures.
production-readyFrequently asked questions
Something missing?
Tell us what you need. We ship the top requests every two weeks.