Free Barcode Generator
Create Code 128, Code 39, EAN-13, EAN-8, UPC-A and ITF-14 barcodes. Auto checksum, custom size and colours, and PNG or SVG download — all generated locally in your browser.
Content & Style
Preview
Waiting for data
Type something in the left panel to see the barcodeWhat Is a Barcode?
A barcode is a machine-readable representation of data using parallel bars of varying widths and spacing. A scanner reads the pattern of bars and spaces, converts it to binary and decodes it back into the original value. The format has been standardised for retail, logistics and industry since the early 1970s.
This tool supports six of the most widely used barcode symbologies. Each is designed for a different use case, and picking the right one matters for compatibility.
The six formats
| Format | Data | Use for |
|---|---|---|
| Code 128 | Any ASCII 32–126 | Shipping labels, inventory, general-purpose |
| Code 39 | A–Z, 0–9, - . space $ / + % | Legacy systems, ID cards, automotive |
| EAN-13 | 12 or 13 digits | Retail products worldwide |
| EAN-8 | 7 or 8 digits | Small retail items (gum, cigarettes) |
| UPC-A | 11 or 12 digits | Retail products in North America |
| ITF-14 | 13 or 14 digits | Shipping cartons and outer packaging |
Check digits
EAN-13, EAN-8, UPC-A and ITF-14 all end with a check digit. It is calculated from the preceding digits using a fixed weighting (alternating ×1 and ×3), then appended. A scanner recomputes it during decode and rejects the scan if the values do not match, catching most read errors automatically.
Enter the data digits and this tool calculates the check digit for you. If you already know the full number, enter it and the tool verifies the check digit is correct — an invalid one is highlighted in red.
| Format | Data digits you enter | Total after check |
|---|---|---|
| EAN-13 | 12 | 13 |
| EAN-8 | 7 | 8 |
| UPC-A | 11 | 12 |
| ITF-14 | 13 | 14 |
Quiet zones
The empty margin on the left and right of a barcode is called the quiet zone. The specification requires it to be at least 10 times the width of a narrow module, so that the scanner can identify where the barcode begins and ends. Without a quiet zone, the scanner cannot reliably lock onto the pattern.
This tool includes the correct quiet zone automatically. If you crop the downloaded image or place it inside a design, keep at least 10 modules of white space on both sides.
Best practices for scannability
- Print at 300 DPI or higher. Anti-aliasing on low-resolution prints blurs bar edges and confuses scanners.
- Maximise contrast. Black on white is best. Avoid red bars — most laser scanners use red light and cannot see them.
- Do not stretch or squash. Preserve the module width ratio exactly. Never resize a barcode non-uniformly.
- Give the bars room to breathe. Leave at least 3 mm of blank space above and below the bars in addition to the side quiet zones.
- Test with real hardware. Before printing thousands of labels, scan the barcode with the actual scanner you will use in production.
- Use SVG for print. Raster formats get blurry when scaled and blurry edges are the number one cause of scan failures.
Common use cases
Retail Packaging
EAN-13 or UPC-A for products scanned at the till.
Shipping Cartons
ITF-14 for outer packaging and warehouse logistics.
Inventory Tracking
Code 128 on shelf labels and internal stock systems.
ID Cards & Access
Code 39 for employee badges and simple access control.
Document Tracking
Code 128 on invoices, purchase orders and files.
Pharmaceuticals
Code 128 for regulatory serial numbers and lot codes.
Event Tickets
Code 128 encoding a unique numeric ticket ID.
Lab Samples
Code 39 for specimen tubes and laboratory workflows.
Privacy and security
This barcode generator runs entirely in your browser. All encoding and rendering happens in pure JavaScript and canvas — no server, no CDN, no network requests. Nothing is uploaded, stored or logged. But remember: a barcode is not encryption. Anyone who can see the pattern can read the data.