QR Code Generator

Web

Generate QR codes as PNG data URLs from text or URLs with custom colours and sizes. Embed links, contacts and Wi-Fi credentials in scannable images. PNG output.

Ready
Text or URL
19 chars
QR preview
(empty)
—

About QR Code Generator

Turning a URL or a piece of text into an image a phone can open with one scan is the everyday use. A website link on printed material, Wi-Fi credentials on a meeting room door, a lookup entry on an invoice or ticket, contact details at a trade show. Compared with typing a long URL, a QR code cuts the cost of input down to a single focus. The mechanism encodes data in a chosen mode into a square matrix and adds error correction plus finder patterns, so a scanner can recover the content even when the code is tilted, reflective or partly damaged. Error correction levels L to H tolerate roughly 7%, 15%, 25% and 30% loss, and higher levels mean more redundancy and therefore less usable capacity at the same physical size. Practical notes: shorter content is always more reliable. Module count grows with the amount of data, so at a fixed size each module shrinks and low-resolution cameras struggle. If a long URL is unavoidable, shorten it or strip tracking parameters first. Purpose decides the correction level: use H for outdoor, wear-prone or partially occluded codes and M or L on screen, where more capacity fits into the same size. Always test the result on two different devices, and for print leave enough quiet zone around the code or recognition degrades noticeably. Limits: QR codes have no expiry mechanism, so a code on paper permanently fails once the target page goes away, which is why printed material should point at a stable long-term address rather than a time-limited campaign page. A QR code is not encryption: the content is encoded in the clear, so anyone can scan or decode it, and passwords, national IDs or internal credentials must never be embedded. Some scanners open links or trigger actions automatically, so consider who else might scan a meeting room Wi-Fi code. Data and privacy: a Wi-Fi code contains the network name and password, and a contact code may contain a phone number and e-mail address. This tool generates the image in the browser, sends nothing to a server and never performs the redirect itself. For Wi-Fi credentials, disconnect the network and verify that no request leaves the page. Print and capacity work brings a few concrete lessons. A QR code is built from modules and the version rises with data volume, so more data means smaller modules. A good print rule of thumb is at least 0.4 mm per module, below which ordinary inkjet output smears the edges and cheap scanner optics struggle, so when space is tight shorten the content rather than squeeze the size. The quiet zone around the code has a convention too, usually four modules wide, and letting artwork or text intrude directly hurts recognition. Dark modules on a light background is the standard, while inverted codes fail on some scanners. For contrast, pure black on pure white is safest, and grey or coloured codes need real testing. On material, glossy coated stock reflects under lighting, so outdoor codes are better on matte stock with a laminate. After generating, scan with at least two phones on different platforms under real lighting three times each, which catches the overwhelming majority of reprints before they happen. The division of labour with 1D barcodes is worth knowing too: barcodes hold less but tolerate curved surfaces such as cylindrical packaging and cable labels, and scanning along one axis is more forgiving, whereas QR codes hold more, scan from any angle, and suit flat surfaces with richer content. Picking the wrong form produces avoidable scan failures.

How It Works Internally

A QR code encodes data in a chosen mode into a square matrix of modules and adds error correction plus three finder patterns. The correction level sets how much damage is recoverable: higher levels mean more redundancy and less capacity at the same physical size. The finder patterns let a scanner establish orientation and grid under tilt or partial damage, which is why the quiet zone must stay free of any artwork.

A common trade-off
InputContent https://oltool.net (19 chars), correction level M
OutputProduces a sparser matrix; moving to level H adds modules, shrinks each one, and raises the minimum print size

Measured on This Page

Legal versionsShort URL → 25 modules (v2); Chinese text → 33 (v4); 500 chars → 89±1 (v18) — all on the 21+4k sequence
Version auto-fitLonger content never yields a smaller version (25 → 89 modules); the library picks the smallest version that fits
Error correctionM → H changes pixels byte-for-byte — the EC level genuinely participates in encoding (H survives 30% damage at a capacity cost)
ChineseCJK and full-width punctuation encode directly (UTF-8 byte mode) without errors
Size and themeSize 200 → canvas exactly 200px; dark theme uses explicit #f3ece2/#211c18 instead of CSS variables (getComputedStyle during SSR/hydration resolves the wrong value, as the code comment documents)

A limitation of the method: no QR decoder was usable on this machine (zxing-cpp lacks the VC runtime), so what was verified is structural legality of the output (module count on 21+4k, version auto-fit, EC changing the encoding) rather than scan-back fidelity — the latter is guaranteed by the qrcode library (node-qrcode, a mature implementation). Usage notes: higher EC survives more damage (30% at H) but needs a higher version (denser modules) for the same content; for logo overlays stay central and use level H. Foreground/background colours are fixed scan-safe values per theme.

How this was measured: The canvas PNG was exported and PIL reverse-computed the module count using the invariant that the top edge of the top-left finder pattern spans exactly 7 modules, verifying counts fall on the legal QR version set (21+4k); version growth with content length, pixel-level EC-level effects, CJK input, size and theme were also checked. · Measured 2026-10-30

How to Use

  1. Open the QR Code Generator
  2. Enter text or a URL in the input field
  3. Select the QR code size and error correction level
  4. Preview the QR code in real-time
  5. Download the QR code image or screenshot it

Use Cases

  • Share links — Turn a long URL into a QR code so users can scan and open the page on a phone.
  • Wi-Fi access — Generate a Wi-Fi QR with SSID and password so guests connect by scanning.
  • Digital business card — Encode vCard data into a QR so a scan saves the contact instantly.
  • Print on posters — Export high-EC SVG vectors that stay crisp when enlarged for print.
  • Event/payment codes — Create scannable entries for on-site check-in or a payment page.
  • Package tracking — Encode a tracking URL with a dynamic parameter into a QR label for logistics stickers.
  • Asset tags — Generate QR codes for equipment labels that link to inventory pages with serial and model info.

FAQ

Which error-correction level?

L recovers about 7%, M 15%, Q 25%, H 30% of damage. Choose H when overlaying a logo or for wear-prone use; choose L or M for lots of content while keeping the code less dense.

Does more content make a denser code?

Yes. More data raises the version and packs more modules, demanding higher resolution and size to scan. For long links, shorten them first.

Can I use any colors?

You can recolor, but keep strong contrast (dark foreground, light background) and preserve the surrounding quiet zone, or scanners may fail to read it.

PNG or SVG export?

Use PNG for on-screen or fixed-size use; use SVG vectors for printing, scaling, or later color edits, since they resize without jagged edges.

Do QR codes expire?

The code itself is static encoding and never expires; what "breaks" is the link it points to. If content may change, point it at a stable short link whose target you can swap later.

It scans on screen but not after printing. Why?

Three causes dominate: the physical size is too small and individual modules fall below the reliable recognition limit, where a practical floor is about 0.4 mm per module; the quiet zone has been encroached on by artwork or text; and the material reflects, with glossy stock causing highlights under lighting. Give the code layout space rather than compressing the content, then check the quiet zone, then switch to matte laminated stock.

Can the content of a QR code be encrypted?

A QR code does not encrypt; the content is encoded in the clear and any scanner reads it. To protect it, point the code at an authenticated short link so access control happens on the server, rather than trying to encode a secret into the graphic. Encoding a password or internal credential directly means posting it publicly on a wall.

Does adding a logo in the middle break QR scanning?

Error correction tolerates up to ~30% central occlusion, so a small centred logo usually works. Never cover the edges, especially the three finder corners. Test on several devices and set the highest correction level before generating.