QR Code Generator

Generate QR codes instantly with custom size and error correction level

Enter content to generate a QR Code

This generator encodes a string — a URL, a phone number, a Wi-Fi credential blob — into a QR code, draws it onto a <canvas> in your browser, and lets you save it as a PNG. The encoding runs entirely in local JavaScript, with no request to an external image API. That is worth checking, because a surprising number of "online QR generators" simply pass your URL as a query parameter to a third-party service, which means your content ends up in someone else's access log.

How to use it

  1. Paste your content into the input box. The preview redraws on every keystroke — there is no generate button to press.
  2. Choose an image size: 128px, 256px, or 512px. This sets the pixel dimensions of the exported PNG only; it does not change how many modules the code has, which is driven by data length.
  3. Choose an error correction level: L, M, Q, or H (default M). Higher levels survive more damage but need more modules to carry the same data.
  4. Check the white preview panel below, then scan it once with a phone to confirm it resolves to what you expect.
  5. Use the download button below the preview to save it as qrcode.png. The colors are fixed black-on-white and there are no logo or color options.

When it comes in handy

Print a signup link on a poster or table card

A short URL is a genuine technical advantage here. https://exp.tw/a1 is a dozen-odd bytes, so the grid stays sparse and each module prints large and readable from a distance or in poor light. The same destination carrying a full UTM query string produces a grid dense enough to fail even on an A4 poster. Use 512px for anything headed to a printer.

Let guests join the shop Wi-Fi

Encode a string like WIFI:T:WPA;S:NetworkName;P:password;; and the stock camera app on both iOS and Android offers to connect directly, so the password never has to go on the wall. Do note that the password is encoded in plain text: anyone who scans the image can read it, so keep it inside.

Add a scannable entry point to a document or deck

A QR code in the corner of a spec sheet, manual, or slide saves readers from typing a long URL. A 256px PNG is usually crisp enough in Word or Google Slides, since neither screen nor print scales it up much.

Test your own app's scanner

The fastest way to exercise scan-handling logic is to generate a spread of inputs live: a normal URL, UTF-8 text with emoji, a near-maximum-length string, each error correction level. Edit one character and the code redraws — quicker than re-running a generation script each time.

Limits and behavior

  • Longer data means more modules, and more modules means each one is smaller. At a fixed 3cm print size, a 20-character URL gives you roughly 0.8mm modules; 800 characters of text gives you under 0.2mm, below what a typical phone camera can resolve. If it has to print small, shorten the payload first.
  • Error correction trades capacity for resilience: L recovers about 7% damage, M about 15%, Q about 25%, H about 30%. The cost is real — the same payload needs noticeably more modules at H than at L. For on-screen display, L or M is plenty. Save Q and H for print that will be creased, smudged, or overlaid with a logo.
  • The QR specification calls for a quiet zone of 4 modules of blank space on all sides, which is how scanners find the symbol's edges. This tool exports a 2-module margin, narrower than the spec recommends. Most phones tolerate it, but for print or placement on a dark background, add your own white border around the image and never let the code butt up against a trim line or a neighbouring design element.
  • These are static QR codes: the content is baked into the geometry at generation time and cannot be edited afterwards. If you print a thousand posters and then find the URL is wrong, reprinting is the only fix. When the destination might change, encode a short-link or a redirect page you control and repoint that instead.
  • Input is encoded verbatim — leading and trailing whitespace and newlines are not stripped. Copying a URL from elsewhere often drags in a trailing newline, and the scanned result then has a stray %0A on the end. Glance at the field after pasting, or scan the code once before shipping it.
  • This tool only generates. It cannot decode an existing QR code image back into text, and it does not offer custom colors, a center logo, SVG or vector export, CSV batch generation, or scan analytics.

Frequently asked questions

Is my content sent to a third-party service?

No. Encoding is done by the qrcode JavaScript package running in your browser, drawn straight to a <canvas>; downloading just converts that canvas to a data URL. No request carries your content anywhere, and you can verify it by going offline and generating again — it still works. (The page itself loads third-party resources such as ads; those requests contain none of your input.) That is materially different from generators built on <img src="external-api?data=your-url">, where your content is written into someone else's server logs.

How much text fits? Why did the preview stop updating on a long paste?

The ceiling comes from the spec. At the largest symbol (version 40) in byte mode, capacity is roughly 2953 bytes at L, 2331 at M, 1663 at Q, and 1273 at H. Remember that non-ASCII goes through UTF-8 — a CJK character costs 3 bytes — so H holds only about 400 Chinese characters. When you exceed the limit this tool currently shows no error message and the preview keeps displaying the last code that succeeded. So "I edited the text but the image did not change" means you hit the capacity ceiling: shorten the content or drop to a lower error correction level.

Does picking 512px let the code hold more data?

No. Size only renders the same module grid at more pixels; the module count is unchanged. Data length and error correction level are what determine module count. Size matters for output resolution: use 256px on screen and 512px when the image will be printed or enlarged, so the PNG does not go soft and jagged at the edges.

Why does it scan on one phone but not another?

Four usual suspects: modules too small (long payload printed small), insufficient quiet zone, poor contrast (the PNG placed over a tinted background, or printed on dark stock), and screen glare. Try shortening the content, exporting at 512px, and adding extra white space around the image. For print, always proof at final size and test on several handsets before the run.

Can I download SVG? My printer is asking for vector.

PNG only — the symbol is rasterized from a <canvas>. The practical compromise is to export at 512px and ask the printer to place it at 100% or an integer scale rather than blowing it up past 200%. A QR code is nothing but solid black squares, so at adequate resolution the raster edges are not visible in the finished piece.

Can I put a logo in the middle?

Not with this tool; you would composite it in an image editor. If you do, raise error correction to H first, keep the logo under about 15% of the code's area, center it, and stay clear of the finder patterns in three corners. Always rescan afterwards: H recovers roughly 30% damage, but that assumes damage spread across the symbol — a single solid block covering one region can still break it.