qr · png · svg · live · local

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.

QR Code Generator
Content
23 chars
url
Size
256px
canvas
Error correction
M
15%
Status
rendering…
canvas
EC:
input · content + options
Content (URL or text)
Size (px)
Error correction
Foreground
Background
output · qr preview

Scan with any QR reader · 256×256px · EC M

Quick Start

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.

  1. 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 mode
    input · contenturl
    https://trydevtools.com
    23 B · 1 linebyte mode · ready
  2. 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 patternluminance
    style · palette256 px
    #000000 on #ffffff  ·  margin 2
    palette setscanner-safe
  3. 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 L for clean digital display, M as a default, Q for printed marketing collateral, and H when 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
  4. 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-first
    export · formatspng · svg
    ✓ Downloaded: qrcode.png
    ✓ Downloaded: qrcode.svg
    ✓ 100% client-side
    ready to ship0 outbound
Pro tips

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&rsquo;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.

Use Cases

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-compliant

Wi-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-matched

vCard 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.

lossless

App 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-identical

Event 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-grade

Product 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-ready
FAQ

Frequently asked questions

URLs, plain text, email addresses, phone numbers, Wi-Fi credentials, vCards, SMS messages, and geo coordinates.
Yes. Download as PNG (raster) or SVG (vector, scales to any size without quality loss).
L is fine for screen-only use. M is the default. Use Q or H if the QR will be printed and may get scratched, faded, or have a logo overlay.
Scanners need contrast. Stick to a dark foreground on a light background, and avoid inversions.
No. The QR code is rendered on a canvas in your browser — it runs locally and your content never leaves the device.
Suggest a tool

Something missing?

Tell us what you need. We ship the top requests every two weeks.

Sent straight to the maintainers · no account needed
47 in queue·8 shipped this month
Request queued. Thanks!