Barcode Generator
Generate barcodes in multiple formats including Code 128, EAN-13, UPC-A, and more. Create scannable codes for products and inventory.
Download
What is a barcode?
A barcode is a machine-readable representation of data using parallel lines of varying widths and spacings. First used commercially in 1974 to scan a pack of chewing gum at an Ohio supermarket, barcodes have become fundamental to retail, logistics, and inventory management worldwide.
Barcodes encode data in one dimension (horizontally), with the pattern of bars and spaces representing numbers or characters that scanners convert back to readable information.
Common barcode formats
Retail and product codes
EAN-13 - The European Article Number, used worldwide (except North America) for retail products. Encodes 13 digits including a country code, manufacturer code, product code, and check digit.
UPC-A - The Universal Product Code, standard in North America. Encodes 12 digits. Compatible with EAN-13 (a UPC-A is an EAN-13 with a leading zero).
EAN-8 - Compact version for small packages where EAN-13 won’t fit. Encodes 8 digits.
UPC-E - Compressed 6-digit version of UPC-A for small items.
Industrial and logistics
Code 128 - High-density format supporting all 128 ASCII characters. Widely used in shipping, packaging, and supply chain management. Three subsets (A, B, C) optimise for different character types.
Code 39 - Alphanumeric format supporting uppercase letters, numbers, and some symbols. Self-checking (no check digit required). Common in automotive, defence, and healthcare.
Interleaved 2 of 5 (ITF) - Numeric-only, high-density format used for shipping cartons and warehouse applications. Encodes digits in pairs.
GS1-128 - Extension of Code 128 used for logistics, encoding application identifiers for batch numbers, expiry dates, serial numbers, and more.
Specialised formats
Codabar - Used by libraries, blood banks, and FedEx. Supports digits and six special characters.
MSI Plessey - Used for inventory and warehouse shelves. Numeric only with various check digit options.
Pharmacode - Binary code used in pharmaceutical packaging for automated verification.
Barcode structure
Most barcodes share common elements:
Quiet zones - White space before and after the barcode that helps scanners identify where the code begins and ends. Minimum 10× the narrowest bar width.
Start/stop characters - Special patterns marking the beginning and end of the data.
Data characters - The encoded information, represented by specific bar and space patterns.
Check digit - A calculated digit that validates the other digits were scanned correctly.
Choosing the right format
| Use Case | Recommended Format |
|---|---|
| Retail products (global) | EAN-13 |
| Retail products (North America) | UPC-A |
| Small retail packages | EAN-8 or UPC-E |
| Shipping labels | Code 128 or GS1-128 |
| Inventory management | Code 128 or Code 39 |
| Alphanumeric data | Code 128 or Code 39 |
| Numeric-only, high density | Interleaved 2 of 5 |
| Library books | Codabar or Code 39 |
Barcode printing requirements
Minimum size - Each format has minimum dimensions for reliable scanning. Code 128 typically requires at least 25mm width at 100% magnification.
Bar width - The narrowest bar (X-dimension) should be at least 0.25mm for retail scanning, larger for warehouse/logistics applications.
Print quality - High contrast between bars and background is essential. Thermal transfer or laser printing typically produces better results than inkjet.
Colour considerations - Black bars on white background is most reliable. Red backgrounds don’t work -most scanners use red light. Blue or green bars on white can work but reduce read reliability.
Verification and testing
Before production use, barcodes should be verified using ISO/IEC standards that measure:
- Symbol contrast - Difference between light and dark elements
- Modulation - Consistency of bar and space widths
- Decodability - How well the code can be interpreted
- Defects - Spots or voids that affect readability
Grades range from A (best) to F (fail). Retail typically requires C grade or better.
How this tool works
Select a barcode format and enter your data to generate a barcode instantly. The code is generated at the edge via a QuantCDN Edge Function and can be downloaded as an image for labels, packaging, or inventory systems.