Barcode Generator & Reader
Create a CODE128, EAN-13, UPC-A, CODE39 or ITF-14 barcode and download it — or switch to Scan to read a barcode from an uploaded photo or right off your camera. Both run entirely in your browser; nothing is ever uploaded.
🔒 Processed locally — nothing is uploadedCustomize
to generate a barcode
Related tools
A barcode is a compact, machine-readable way to represent a code — a product number, a shipment ID, a ticket reference — as a pattern a scanner can read in a fraction of a second. This tool builds the common retail and logistics formats, and reads them back from a photo or a live camera, all without sending anything to a server.
Which barcode format to use
Barcode "formats" aren't interchangeable — each one is a different way of encoding data, and most real-world uses expect a specific one:
- CODE128 — encodes any letters, numbers and most symbols. The default choice for shipping labels, internal inventory codes and anything that isn't a retail product.
- EAN-13 / EAN-8 — the standard on retail products outside North America. 12 or 7 digits plus an automatically-computed check digit.
- UPC-A / UPC-E — the North American retail equivalent of EAN. UPC-E is a compressed 6-digit form used on small packaging.
- CODE39 — an older format still common in badges, asset tags and some automotive/defense systems. Supports uppercase letters, digits and a handful of symbols.
- ITF-14 — used on shipping cartons and pallets, always 14 digits.
- MSI and Pharmacode — niche formats seen in inventory shelving and pharmaceutical packaging respectively.
- Codabar — still used on some library cards and blood bank labels.
If you're not encoding an existing product number for a specific system, CODE128 is almost always the right pick — it's the most flexible and the most widely supported by scanners.
Generating a scannable barcode
Type the value, pick the matching format, and the barcode renders instantly. EAN, UPC and ITF-14 expect an exact digit count and will show an error if the value doesn't fit that format — the tool checks the length and check digit before drawing anything, so it won't produce an invalid code. Keep the bars tall relative to their width and leave a plain quiet margin around the code; both colors need enough contrast for a scanner to lock onto the pattern.
How the scanner works
Switching to the Scan tab loads your image (or camera frame) onto an in-memory canvas and runs it through ZXing, an open-source multi-format decoder that recognizes both linear barcodes and QR codes. The camera option asks for permission the same way a video call would; the stream is decoded frame-by-frame locally and is never recorded or sent anywhere. Closing the tab or clicking "Stop camera" releases it immediately.
Getting a clean scan
- Fill as much of the frame as you can with the barcode — a tiny code in a large photo is harder to lock onto.
- Keep the barcode roughly level; a steep tilt can still work but a straight-on shot is far more reliable.
- Avoid glare on glossy labels — angle the camera slightly rather than shooting straight into a reflection.
- For a printed barcode, make sure it isn't smudged, creased across the bars, or printed at a very small size.
Frequently asked questions
Is anything uploaded when I generate or scan a barcode?
No. Generating a barcode is pure client-side rendering, and scanning — whether from an uploaded photo or a live camera — decodes the image in your browser. Nothing is sent to a server.
Why does EAN-13 or UPC-A reject my number?
Those formats need an exact digit count. For EAN-13, enter 12 digits and the tool adds the check digit, or all 13 if the last one is a correct check digit; UPC-A works the same way with 11 or 12 digits. Anything else — or a 13th/12th digit that doesn't match the calculated check digit — isn't a valid code in that format. Double-check the number, or switch to CODE128 if you just need to encode an arbitrary number.
Can the scanner read a QR code too?
Yes — the Scan tab uses a multi-format decoder that recognizes QR codes as well as linear barcodes. For QR-specific features like Wi-Fi and contact-card parsing, the dedicated QR Code Reader gives a more detailed breakdown.
Will the generated barcode work when printed?
Yes, at a reasonable size. Download the SVG for anything printed larger than a few centimeters — it stays perfectly sharp at any scale, unlike the PNG which is a fixed resolution.
Why won't my camera start?
Your browser needs permission to use the camera, and it must be served over HTTPS (this site is). If you previously denied the permission, allow it again from your browser's site settings and reload the page.