About the Barcode Generator
This free barcode generator turns a number or text into a scannable barcode image instantly. Use it for product packaging, inventory and shelf labels, library books, asset tags or shipping cartons.
For barcodes that end in a check digit, such as UPC-A and EAN-13, just type the leading digits and the check digit is calculated for you; type the full number and the tool tells you whether it is valid. Download a high-resolution PNG or a scalable SVG for print. Everything runs in your browser.
How to use
- Choose a barcode type. Retail products in the US and Canada use UPC-A, most other countries use EAN-13, and Code 128 is the usual choice for internal labels.
- Type the number or text. The barcode appears right away (beside the form on desktop, below it on mobile).
- Adjust bar width, height, colors and whether the digits are printed under the bars.
- Click Download PNG or Download SVG to save the image.
Worked examples
UPC-A for a new product
- Input
- Type UPC-A, first 11 digits
04210000526 - Result
- Message “Check digit 4 was added automatically.”, barcode 042100005264, saved as
barcode-upc-042100005264.png(or .svg).
You never need to work out the 12th digit yourself. Use the 11 digits from your GS1 company prefix range, not invented ones, for anything sold in stores.
Common mistake: a typo in the last digit
- Input
- UPC-A, full number copied from a package with the last digit wrong:
042100005265 - Result
- Red notice “Wrong check digit. The last digit should be 4 (correct number: 042100005264).” No barcode is drawn.
A barcode with a bad check digit is rejected by checkout scanners, so the tool stops you before you print it. Spaces and hyphens in the input (0 42100 00526 4) are ignored.
Internal labels: Code 39 vs Code 128
- Input
- Code 39:
asset-0042, thenRoom 3B_12. Code 128:SKU-1042/blue, thenCafé-12 - Result
- Code 39 turns the first into ASSET-0042 (“Lowercase letters were converted to uppercase.”) and rejects the second: “These characters can’t be used in Code 39: _”.
Code 128 encodes SKU-1042/blue exactly as typed but rejectsCafé-12because of the “é”.
For asset tags or SKUs with lowercase letters or underscores, pick Code 128. If you need accented text or a long description, a QR code is the better fit.
Barcode types compared
| Type | Length / characters | Typical use |
|---|---|---|
| UPC-A | 12 digits | Retail products in the US and Canada |
| EAN-13 | 13 digits | Retail products worldwide (UK prefixes 50) |
| EAN-8 | 8 digits | Very small packages such as gum or cosmetics |
| ITF-14 | 14 digits | Outer cases and shipping cartons |
| Code 128 | All ASCII letters, digits and symbols | Shipping labels, inventory, asset tracking |
| Code 39 | Uppercase, digits, a few symbols | Industrial labels, ID badges |
How the check digit is calculated
The last digit of UPC-A, EAN-13, EAN-8 and ITF-14 is a check digit computed from the other digits. Starting from the rightmost data digit, multiply the digits alternately by 3 and 1, add them up, and the check digit is the number needed to reach the next multiple of 10.
Example: UPC-A 03600029145 → weighted sum 58, so the check digit is 2 and the full number is 036000291452.
Barcodes for products you sell
You can’t make up UPC or EAN numbers for products sold through retailers or on Amazon. Companies license a company prefix from GS1 (GS1 US in the United States, GS1 UK in Britain, and so on) and assign product numbers within that range. Use this tool to turn your licensed GS1 numbers into barcode artwork. For internal use – inventory, assets, events – you can freely create Code 128 barcodes.
FAQ
Will the barcodes scan?
Yes. Barcodes are drawn to the official specifications and scan with standard barcode scanners and phone apps. When printing, keep the original proportions, avoid blurry scaling and leave a white quiet zone on both sides. Keep the bars dark and the background light: red bars are invisible to many laser scanners, so stick to black or dark blue.
Can I use any UPC or EAN number for my product?
Not for products you sell. Random numbers may belong to another company’s product. Get your numbers from GS1. For practice or internal use, any number is fine.
Is a barcode generated here free to use commercially?
Yes. The images are yours, with no watermark and no sign-up. Only the number itself must be legitimately yours for retail products.
How do I make an ITF-14 number for a shipping case?
An ITF-14 (GTIN-14) is usually an indicator digit (1–8) for the packaging level, followed by the item’s number without its check digit, padded to 13 digits. For a case of the UPC item 042100005264, enter 1004210000526 in ITF-14 and the tool adds check digit 1, giving 10042100005261. Ask your retailer or GS1 which indicator digit they expect.
What size should I print a retail barcode?
According to the GS1 General Specifications, the nominal (100%) size of a UPC-A or EAN-13 symbol is about 1.47 × 1.02 in (37.3 × 25.9 mm) including the digits, and GS1 allows roughly 80% to 200% of that. Place the SVG in your layout and scale it proportionally; don’t squash it or crop the bar height. The PNG download is rendered at 3× the preview resolution.