About the Barcode Generator
This Barcode Generator turns a number or text into a scannable linear barcode in eight common symbologies, from Code 128 for shipping labels to EAN-13 and UPC-A for retail products. It checks your input against each format's rules as you type and lets you save the result as a crisp SVG or PNG.
How it works
Each symbology defines a pattern of wide and narrow bars and spaces for every character it supports, plus start and stop patterns that tell a scanner where the code begins and ends. Before drawing, the tool checks your value against the selected format: Code 128 accepts any text, Code 39 accepts letters, digits, space and - . $ / + %, EAN-13 needs 12 or 13 digits, EAN-8 needs 7 or 8, UPC-A needs 11 or 12, ITF-14 needs exactly 14, MSI accepts digits only, and Pharmacode needs a number from 3 to 131070.
Retail codes end in a check digit calculated from the other digits. If you enter one digit fewer than the full length (12 for EAN-13, 7 for EAN-8, 11 for UPC-A), the check digit is calculated and appended for you. If you enter the full length, the last digit must be the correct check digit or the tool reports an error. The barcode is drawn as an SVG with 2-pixel module width and 90-pixel bar height; the PNG export renders that SVG at twice the size on a white background.
How to use
- 1
Choose a symbology from the Format menu.
- 2
Type the value to encode in the input box; the preview updates as you type.
- 3
If an error appears, adjust the value to match the format's allowed characters or length.
- 4
Tick or untick "Show text below barcode" to control the readable caption.
- 5
Click SVG or PNG to download the barcode.
Worked examples
EAN-13 with an automatic check digit
You have the first 12 digits of a product number.
The check digit 7 is computed from the 12 digits using the alternating 1 and 3 weighting.
Internal inventory label
A workshop labels parts bins with short alphanumeric codes.
Wrong length for the format
You pick ITF-14 but paste a 13-digit number.
Frequently asked questions
What's the difference between EAN-13 and Code 128?+
EAN-13 is a fixed 13-digit numeric format used on retail products worldwide, while Code 128 is variable length, supports letters and numbers, and is widely used for shipping and inventory labels.
Will any barcode scanner be able to read these?+
Standard scanners read these common formats, but always test a printed sample with your actual scanner before relying on it, since print quality and size affect results.
Do I need to enter the check digit for EAN-13 or UPC-A?+
No. Enter 12 digits for EAN-13 or 11 digits for UPC-A and the check digit is calculated for you. If you enter the full length, the last digit must be correct.
Can I use these barcodes on products I sell in stores?+
The barcode itself will be valid, but retailers expect product numbers registered through GS1. Use a number assigned to your company rather than one you made up.
Which download format should I choose?+
SVG is a vector file that scales without blurring and is best for printing and design software. PNG is a raster image at twice the on-screen size, handy for documents and spreadsheets.