QR Code Generator

Generate a QR code for any URL or text. Instant, browser-based, no data sent anywhere.

Enter a URL or text above to generate a QR code

About This Tool

What this tool does

The QR Code Generator turns a string of text into a scannable QR code image, right inside your browser. You type a URL, a phone number, a Wi-Fi string, a paragraph of text, whatever you want, and a black-and-white square pattern appears below the input. You can download it as a PNG or copy it straight to your clipboard.

The whole thing runs locally. The page imports the open-source qrcode JavaScript library and does the encoding on your device. Nothing you type is sent to a server by this tool, which means it's safe to encode things like internal Wi-Fi passwords or staging URLs without leaking them to a third party.

Who actually needs this

Most people land here for one of a few practical reasons:

  • Printing a code on a flyer, business card, menu, or sign that links to a website.
  • Sharing a long URL with someone in the room without making them type it.
  • Generating a Wi-Fi join code for guests so they don't have to copy a password.
  • Slapping a code into a slide deck so a live audience can open a link without writing it down.
  • Encoding a vCard, an email address, or a phone number so someone can scan-to-call or scan-to-save.

If your use case is one of those, the defaults here will work fine. If you need analytics, A/B routing, or the ability to change where the code points after it's printed, you want a dynamic QR service instead. More on that below.

How to use it

There are exactly two controls and no submit button.

  • URL or text: the input field at the top. It's pre-filled with https://coherencedaddy.com/tools so you can see what a working code looks like. Replace it with whatever you want to encode.
  • Size slider: sets the pixel dimensions of the exported PNG. It ranges from 128 to 512 pixels in 32-pixel steps, defaulting to 256.

The code regenerates automatically about a third of a second after you stop typing (a 300ms debounce, so the browser isn't redrawing on every keystroke). When the image appears, you get two buttons:

  • Download PNG: saves the image as qrcode.png.
  • Copy: writes the PNG to your clipboard so you can paste it directly into Slack, an email, Figma, Keynote, or any app that accepts images. If your browser blocks image-clipboard writes, it falls back to copying the underlying data URL as text.

One quirk worth knowing: the preview on the page is capped at 280px so it fits the layout neatly. The downloaded and copied file always uses the full size you picked on the slider, regardless of what the preview shows.

How a QR code actually works

A QR code is a 2D matrix barcode defined by the ISO/IEC 18004 standard. The encoder takes your text and does roughly this:

  1. Picks the most compact encoding mode that fits your input. Pure digits use numeric mode (most efficient), uppercase alphanumeric plus a few symbols use alphanumeric mode, anything else (lowercase letters, URLs with paths, accented characters) falls back to 8-bit byte mode.
  2. Picks the smallest version (grid size) that will hold all the bits plus the error-correction overhead. Versions run from 1 (21×21 modules) up to 40 (177×177 modules).
  3. Adds Reed–Solomon error-correction codewords so the code is still readable if part of it is dirty, scratched, or partially blocked.
  4. Lays out the data alongside the three big finder patterns in the corners and the small alignment patterns elsewhere, then applies a mask so the resulting grid has good contrast for scanners.
  5. Renders the whole matrix as a PNG with a quiet zone (the white border around the code).

This tool calls QRCode.toDataURL from the qrcode library with three settings: width equal to the slider value, margin: 2 (a 2-module quiet zone around the code), and the colors #0A0A0A for the dark modules and #FFFFFF for the light ones. It uses the library's default error-correction level, M (Medium), which can recover from roughly 15% of the code being unreadable. There's no UI to change the level, the colors, or to add a logo.

A quick worked example

Say you want a code for https://example.com/menu printed on a restaurant table tent.

  1. Paste the URL into the input.
  2. Leave the slider at 256, or push it up to 512 if you want a sharper print.
  3. The 24-character URL fits comfortably; the encoder will probably pick a small version (around 2 or 3), which produces a roughly 25–29 module grid. The library upscales it to 256×256 (or 512×512) for export.
  4. Click Download PNG, drop the file into your layout software, and scale it to whatever physical size you need.
  5. Before sending it to print, scan the file on screen with your phone. If it opens the right URL, you're done.

Sensible defaults to start with

  • For on-screen use (slides, Slack, web pages): 256px is plenty. Keep around 4× the QR's width as quiet zone in your layout.
  • For print: pick 512px so the vector-y crispness survives any scaling. Print at no smaller than about 2cm (~0.8 inch) per side; aim larger if it'll be scanned from further than arm's length. A loose rule of thumb is that scanning distance should be no more than about 10× the code's printed width.
  • For long URLs: shorten the link first (with a URL shortener you trust) before encoding. Shorter input = smaller grid = easier to scan when printed small.

Common pitfalls

  • Cropping the quiet zone. The 2-module white border isn't decoration; it's part of the spec. Designers sometimes trim it off to "tighten the layout" and the code stops scanning. Leave the white margin alone.
  • Inverting the colors. Scanners expect dark-on-light. White-on-dark sometimes works on modern phones but fails on older ones. This tool already uses dark-on-light, so the trap is only if you re-edit the PNG.
  • Putting too much data in. The standard's theoretical maximum is roughly 4,296 alphanumeric or 2,953 byte characters, but at those sizes the grid becomes a dense mess that's hard to scan at small print sizes. If your input is more than a sentence or two, shorten it.
  • Printing too small. A code that scans fine on screen can be unreadable at 1cm square on a flyer, especially under fluorescent light or at an angle.
  • Assuming you can edit the destination later. The codes this tool produces are static: the URL is baked permanently into the pattern. Once it's printed, the destination is fixed.

When NOT to use this tool

Static QR codes are great when you control the destination and don't need to change it. They're a bad fit when you need any of the following:

  • Scan analytics (how many people scanned, when, where). Use a dynamic QR service or shorten the URL through a link tracker before encoding it here.
  • An editable destination after print. If you might want to change where the code points without reprinting, encode a redirect URL you control and update the redirect later.
  • A branded code with a logo or custom colors. This tool only renders plain black-on-white. Branded codes are a job for a generator that lets you set ECC level High and overlay a logo within the error-correction budget.
  • Encrypted or sensitive payloads. Anything you encode is readable by anyone who scans the result. Don't put passwords, API keys, or private notes in a QR code you intend to share or print.

If the result looks wrong

A few things to check:

  • Scan the on-screen preview with a phone. If that works, the file works. If it doesn't, your input has a typo, an invisible character, or a stray space.
  • If the printed code fails but the on-screen one works, the issue is almost always print size, paper finish (glossy reflections), or the surrounding layout eating the quiet zone.
  • If the Copy button silently puts text on your clipboard instead of an image, your browser blocked the image-clipboard write. Use Download PNG instead.

Adjacent concepts worth knowing

  • Error-correction levels. The QR standard defines four: L (~7%), M (~15%), Q (~25%), H (~30%). Higher levels add redundancy so the code survives more damage, at the cost of a denser grid. This tool is fixed at M.
  • Wi-Fi QR codes. Most phones recognise a string in the format WIFI:S:NetworkName;T:WPA;P:password;; and offer a one-tap join. Encode that string here and you've got a guest Wi-Fi card.
  • vCard / MeCard codes. Encoding a vCard or MeCard text block produces a scan-to-save-contact code. Useful on business cards and event badges.
  • Mailto / tel / sms links. Encoding mailto:you@example.com, tel:+15551234567, or sms:+15551234567 gives you scan-to-email, scan-to-call, and scan-to-text codes.
  • Dynamic vs static. Static codes (what this tool produces) bake the destination into the pattern. Dynamic codes encode a short redirect URL operated by a service, which means you can change where it goes and see scan stats, at the cost of depending on that service staying online.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions

What is a QR code?
A QR (Quick Response) code is a two-dimensional barcode that can store URLs, text, contact information, or other data. When scanned with a smartphone camera, it instantly opens the encoded content. QR codes are used for marketing, payments, event tickets, and contactless menus.
What is the maximum data a QR code can store?
A QR code can store up to 4,296 alphanumeric characters or 7,089 numeric digits. However, more data means a denser, harder-to-scan code. For URLs, keeping them under 100 characters produces the most reliable QR codes. URL shorteners can help reduce length.