This page's code did not start.

Opening index.html directly from a folder blocks JavaScript modules, so nothing will happen when you choose what goes in it. Serve the folder over http instead:

powershell -ExecutionPolicy Bypass -File serve.ps1

Then open http://localhost:8080/.

QR & Barcode — make a QR code or a barcode, offline

Type it, and it becomes a code. Nothing is sent to make one.

Language: English
View source
Your codes and the text in them are processed in your browser. No processing upload.

A QR code is arithmetic over a string: there is no file to send and no service to ask. Every step — picking the mode, choosing the version, the Reed-Solomon error correction, the mask, the bars of a barcode and the check digit under it — happens in about a thousand lines of JavaScript in this page that you can read. This tool has no network feature of any kind, which matters more here than on most pages: the thing being encoded is often a Wi-Fi password.

Live check: checking…

Offline: checking…

Don't take our word for it: open DevTools, watch the Network tab, and type a password into the Wi-Fi form. Not one request carries a character of it. Or unplug from the internet and make the code anyway.

1 Pick the kind of code

A QR code holds anything and is what a phone camera looks for. A barcode holds a number, and which one you need is usually decided for you — by the shop, the warehouse or the shipping company asking for it.

2 Say what goes in it

The exact string this code will hold
 

3 Choose how it looks

The margin is part of the code, not space around it. Four modules is what the specification asks for, and a code trimmed to its edge is one many scanners will not see at all.

Print the characters underneath What a person reads when the scanner will not. On a retail code the digits sit in the margins as well, which is deliberate: they mark out the white space nobody should trim off.

Add a check character Code 39 does not normally carry one. Some systems insist on it; add it only if yours does, because a reader that is not expecting one will read it as an extra character on the end.

No background at all Transparent, for putting on something that already has a colour. The SVG and the PNG both keep it; whatever ends up behind it has to be pale, or a scanner will find no contrast.

The QR code
Colour and size

4 Take it

The SVG is the one to keep. It is the code as instructions rather than as pixels, so it prints at any size without going soft — which matters more here than in most pictures, because a blurred edge is exactly what a scanner cannot resolve.

View as Markdown

How to make a QR code without uploading anything

  1. Pick the kind of code. A QR code holds anything and is what a phone camera looks for, so it is the answer unless somebody has told you otherwise. A barcode holds a number, and which one you need is decided by whoever is going to scan it — a shop wants an EAN-13 or a UPC-A, a shipping carton an ITF-14, and anything internal is usually Code 128.
  2. Say what goes in it. A link is the common case, and the boxes above it build the other formats phones know: a Wi-Fi network that offers to join itself, a contact card that offers to be saved, an email, a text message, a phone number, a place on a map. Whichever you pick, the finished string is shown on the page — that is all a QR code ever holds.
  3. Choose how much damage it may take. The four levels put more or less error correction in, and more correction means a bigger, denser code. L is enough for a screen, M for ordinary paper, and H for something that will be handled, printed small, or stuck on a window in the sun. A code on a menu that gets wiped down every day is worth Q or H.
  4. Set the size, the margin and the colours. The margin is part of the code: four modules of quiet space around it is what the specification asks for, and trimming it is the single most common reason a printed code will not scan. Dark on light, with real contrast — a scanner reads the difference between the two, so pale grey on white will not do, and light on dark fails outright on a good many readers.
  5. Check it with the phone you have. Before you print a thousand of them, scan the one on your screen. That takes ten seconds and catches the whole category of mistakes a preview cannot: a Wi-Fi password with a character that needed escaping, a link that was missing its https://, a barcode number a digit short.
  6. Take the SVG. It is the code as instructions rather than as pixels, so it prints at any size without going soft, and a soft edge is exactly what a scanner cannot resolve. Take the PNG as well if whatever you are pasting into will not accept an SVG; it is drawn at a whole number of pixels per module, so it has no blurred edges either.

The longer version

How to make a QR code that still scans on somebody else's phone Which error-correction level to pick, why the white margin around a QR code is part of the code, how big to print it, and what a free generator's 'dynamic' code costs you later.

Questions

Is anything I type sent anywhere?

No. A QR code is arithmetic over a string, and that arithmetic runs in your own browser on your own machine. This tool has no network feature of any kind — it never fetches anything and never sends anything — and the page's Content-Security-Policy names every address it may contact, none of which belongs to this site. That is worth more here than on most pages, because the thing people most often put in a QR code is the password to their Wi-Fi.

Do these codes expire, or stop working later?

No, and they cannot. What you type is what the code holds, so scanning it gives back exactly that string forever. The codes that expire are the ones with somebody else's address inside them: a "dynamic" QR code holds a link to the generator's server, which redirects to yours, which means they can count every scan, change where it goes, or switch it off when a trial ends. Nothing here redirects through anything.

Is it free, and can I use it commercially?

It is free, there is no account, no watermark and no limit on how many you make, and you can put the result on a product, a poster or a shopfront. QR Code is a registered trademark of Denso Wave, who have stated they will not exercise it against people using the codes — the specification is published as ISO/IEC 18004 and is free to implement, which is what this page does. The site carries advertising, which is what pays for it.

Which error correction level should I pick?

M unless you have a reason. L makes the smallest code and is fine on a screen; M survives ordinary handling; Q and H are for a code that will be printed small, laminated, stuck on a window, or partly covered by a logo. Each step up puts more check data in, which needs a bigger symbol at the same amount of text — going from L to H roughly doubles the number of modules for the same string.

How much can a QR code hold?

At the largest size, 177 modules square, up to 7,089 digits, 4,296 capital letters and digits, or 2,953 bytes of anything else — and that is at the weakest error correction; at the strongest it is about a third of those. Practically, the limit is not the format but the scanner: past a few hundred characters the modules get so small that an ordinary phone camera cannot resolve them at arm's length. A long code is usually a sign that a short link belongs in it instead.

Why is my code bigger when I write the link in lower case?

Because a QR code has a mode for capitals and digits that packs two characters into eleven bits, and no such mode for lower case, which costs eight bits each. A URL written HTTPS://EXAMPLE.COM/PAGE can be a third smaller than the same URL in lower case. The scheme and the host are case-insensitive, so shouting them changes nothing except the size; the path after the host is not, so leave that alone.

Can it read a QR code as well as make one?

Not this page, but the one next door does: the reader takes a photograph, a screenshot or your camera and gives back the string. It is a considerably larger job than drawing one — finding the symbol in a picture, correcting for the angle it was taken at and repairing the damage are three problems this page does not have — which is why it is a tool of its own rather than a button here. It runs on the same terms as everything else: nothing uploaded, and no camera frame kept.

What is the margin for, and can I make it smaller?

The white space around a QR code is part of the code. A reader uses it to find where the symbol ends, and the specification asks for four modules on every side; a barcode wants about ten. You can set it to zero here and the picture will look tidier, and a good many scanners will then fail to see it at all — especially against a busy background. If space is the problem, make the code smaller rather than trimming its margin.

Which barcode do I need?

Whichever the person scanning it asks for. EAN-13 is the retail barcode outside North America and UPC-A is the North American one — both need a number issued to you by GS1, because the number identifies your company, not just the product. EAN-8 is the short version for small packages. ITF-14 goes on the shipping carton. Code 128 and Code 39 hold text as well as digits and need no registration at all, which makes them the right answer for anything internal: assets, shelves, job sheets.

What is a check digit, and why did the tool add one?

It is the last digit of a retail barcode, worked out from the ones before it, so that a scanner can tell a misread from a read. EAN-13 wants twelve digits and computes the thirteenth; UPC-A wants eleven and computes the twelfth. Type the short number and this page adds it. Type the full number and it checks the one you gave — and refuses, rather than silently correcting it, because a wrong digit quietly fixed is a label that scans as somebody else's product.

Can I put a logo in the middle of a QR code?

A small logo can work, but no percentage of image area is guaranteed safe. DENSO defines level H’s roughly 30% restoration against total codewords, not arbitrary squares. Keep finder and alignment patterns clear, use H, and test the final printed code on several phones. DENSO’s error-correction explanation describes the denominator.

Why is the SVG better than the PNG?

Because a code is edges, and a PNG has a fixed number of pixels to make them out of. Enlarge one and every edge softens; a soft edge is precisely what a scanner has trouble with, and a printer at 1200 dpi given a 512 pixel PNG is being asked to invent the difference. An SVG is the squares as instructions, so it prints sharp at a business card or a billboard. The PNG here is drawn at a whole number of pixels per module, which is the best a PNG can do.

Does it work offline?

Yes. Load the page once, then disconnect from the internet and it keeps working. That is also the simplest way to prove nothing is being uploaded: a tool that sent your text away to have a code drawn would stop the moment you unplugged.