About This Tool
NinjaFunction's Barcode Generator & Reader lets you create barcodes in 10+ formats and download them as PNG images or PDFs with exact physical dimensions in mm, cm, or inches. Switch to Reader mode to scan barcodes from your camera or an uploaded image using ZXing WebAssembly. Everything runs locally — your data never leaves the browser.
About Barcodes
Barcodes encode data as a pattern of parallel lines (1D) or a matrix of squares (2D). They are read by optical scanners and are used everywhere from retail checkout to inventory management and shipping labels.
CODE128
A high-density linear barcode that can encode all 128 ASCII characters. The most common general-purpose format.
EAN-13 / EAN-8
The standard retail barcode used worldwide on consumer products. EAN-13 encodes 13 digits, EAN-8 encodes 8.
UPC
The North American equivalent of EAN, used on retail products in the US and Canada.
Which Barcode Type Should You Use?
| Type | Holds | Common use |
|---|
| Code 128 | Letters, numbers and symbols | Shipping, inventory and internal IDs |
| EAN-13 | 13 digits | Products sold in shops worldwide |
| UPC-A | 12 digits | Products sold in North America |
| Code 39 | Capital letters and numbers | Asset tags and older systems |
| ITF-14 | 14 digits | Cartons and cases |
Getting a Barcode That Scans
- Print dark bars on a plain white background with a quiet blank margin on both sides.
- Do not stretch or shrink the barcode in a design program. Keep the proportions.
- Print at the exact size you set, with scaling turned off.
- Test with a phone or a scanner before printing in bulk.
Barcode or QR Code?
A barcode is best for short numbers or codes that a scanner reads at a till or a warehouse door. A QR code holds much more, such as a web address or contact details, and can be scanned by any phone camera. For a product on a shelf use a barcode. For a poster or a menu use a QR code.
FAQ
Are barcodes free to generate?
Yes — this tool is completely free. The barcode formats themselves (CODE128, EAN, UPC, etc.) are open standards.
Can I use generated barcodes commercially?
Yes. However, if you need a retail barcode (EAN/UPC), you must obtain a GTIN from GS1 — the barcode itself is just the encoding.
Is my data safe?
Yes — everything runs locally in your browser using WebAssembly and the Canvas API. No barcode value, image, or camera feed is ever uploaded to a server.
Which barcode format should I choose?
Use CODE128 for most internal labels, because it holds letters, numbers and symbols in a short code. Use EAN-13 or UPC for products sold in shops, with a number issued by GS1. CODE39 suits older industrial scanners, ITF is used on shipping cartons, Codabar appears in libraries and blood banks, MSI on shelf labels and Pharmacode on medicine packaging.
Why does the tool say my input is invalid?
Each format only accepts certain characters and lengths. EAN-13 needs 12 digits (the tool adds the check digit) or 13 digits with a correct check digit, EAN-8 needs 7 or 8 digits, and UPC needs 11 or 12 digits. CODE39 accepts capital letters, digits, spaces and the symbols - . $ / + %. If you are not sure, switch to CODE128.
Can I scan a barcode with my camera?
Yes. The reader can use your device camera or an image you choose. Decoding happens in your browser, so the camera feed and the image never leave your device.