Barcode Generator
Generate Code 128, EAN-13, EAN-8, UPC-A and Code 39 barcodes. Custom colours, bar width and height. Download PNG or SVG for print and digital use. 100% browser-based.
Five Barcode Standards, One Generator
Different industries use different barcode formats, each with specific data capacity and character restrictions. The ToollyX Barcode Generator produces the five most widely used standards: Code 128 (letters and numbers, unlimited length - the most flexible general-purpose barcode), EAN-13 (exactly 12 digits - standard retail product code in Europe and internationally), EAN-8 (exactly 7 digits - compact version for small packaging), UPC-A (exactly 11 digits - North American retail standard), and Code 39 (letters, numbers and a few symbols - common in automotive, defence and industrial supply chains). Download as PNG for digital use or SVG for print at any size.
EAN-13 and UPC-A - Retail Barcode Rules
EAN-13 and UPC-A have strict digit count requirements because the last digit is a check digit calculated from the preceding digits. EAN-13 requires exactly 12 input digits - the tool calculates and appends the 13th check digit automatically. UPC-A requires exactly 11 digits - the 12th is the check digit. Entering the wrong number of digits for these formats will produce an error. For genuine retail use, EAN-13 and UPC-A barcodes must be registered through GS1 (the global barcode authority) to be unique and scannable at point-of-sale systems without conflicts. Barcodes generated here are technically correct but use unregistered number ranges - appropriate for internal use, mockups, prototypes and education, but not for retail products sold in mainstream retail channels.
Bar Width, Height and Visual Customisation
The Bar Width slider (1-5px per module) controls how wide each individual bar is. Narrower bars produce a more compact barcode; wider bars are easier to scan with lower-quality scanners. For print, 2-3px at the PNG output size is generally reliable. The Bar Height slider controls the vertical dimension - standard retail barcodes are tall relative to their width (typically 69% of the total symbol width per ISO standards), but for screen display or decorative use you can shorten them. The text label below the bars can be shown or hidden - for machine scanning it is optional, but for human identification of the encoded number it is useful.
PNG vs SVG Download for Barcodes
Download PNG when the barcode will be embedded in a document, inserted into a presentation, used in a web page at a known size, or sent as an image. The PNG output is generated at the display resolution - if you need a larger PNG, adjust the bar width and height sliders to increase the overall dimensions before downloading. Download SVG when the barcode will be printed at large scale (product packaging, shipping labels, posters) or when a layout application needs a scalable vector that stays perfectly sharp at any print size. SVG barcodes can be scaled to any physical dimension without pixelation. After downloading, verify your barcode scans correctly using the QR Scanner & Decoder which also handles standard barcodes.
Code 128 - The Most Versatile Format
Code 128 is the right choice when you are not constrained by a specific industry standard. It encodes the full ASCII character set - all letters (upper and lower case), all digits, spaces and punctuation - with no length limit. It is used in shipping (FedEx, UPS, USPS all use Code 128 variants), healthcare, ticketing, library systems and any internal tracking application. Code 128 automatically selects between three encoding subsets (A, B, C) to minimise the symbol length for the given data. For numeric-only data, Code 128C encodes pairs of digits in each symbol character, producing the most compact possible barcode for long number strings like order IDs and tracking numbers.
Colours and Contrast
The bars (dark elements) and background (light elements) are independently configurable. Standard barcodes are black bars on white background - the maximum contrast for reliable scanning. Coloured barcodes work when there is strong contrast between the bars and background, but light-coloured bars on white or similarly-toned backgrounds will fail to scan. The ISO scanning standard requires a minimum print contrast signal of 0.75 on a 0-1 scale - dark navy or black bars on white or light yellow achieve this easily; red or dark green bars on white also work. Avoid using colours where the bars and background have similar luminosity values.
✓Verified by ToollyX Team · Last updated June 2026
Frequently Asked Questions
Disclaimer: All barcode generation is performed locally in your browser. No data is sent to any server. Always test-scan barcodes before printing or distribution.