Barcode Generator — EAN-13, UPC, Code 128 & More
Create EAN-13, UPC-A, Code 128, Code 39, ITF-14 and other barcodes, with check digits calculated, as PNG or SVG.
Found a problem, or something that could be better? We read every message and we fix things quickly.
This barcode generator makes standard 1D barcodes, including EAN-13 and UPC-A for retail products, Code 128 for shipping and inventory, Code 39, ITF-14 for cartons, MSI, Codabar and Pharmacode, and lets you download each one as a crisp SVG for print or a PNG for screens. Enter 12 digits for an EAN-13 and the check digit is calculated for you; enter all 13 and it is verified, with the correct digit shown if yours is wrong.
Bulk mode takes a list, one value per line, and renders every barcode with its own download buttons, which covers the common job of making a set of shelf or asset labels. One limit is worth knowing before you print packaging: a retail EAN or UPC only scans at checkout if the number was issued to your company by GS1. This tool draws any valid number; it does not issue them.
How to use
- Choose the barcode type. The hint below it says what that type accepts.
- Enter the value. For EAN and UPC you can leave off the check digit and it will be added.
- Adjust bar width, height, margin and text if your label needs it. Keep dark bars on a light background.
- Download SVG for print work or PNG for documents and screens.
- For many barcodes, switch to Bulk, paste one value per line, and download each.
Frequently asked questions
How do I create a barcode for my product?
For products sold through retailers you need a GS1 company prefix, bought from your country’s GS1 office, which gives you a range of official numbers. Assign one to each product, generate its EAN-13 (or UPC-A in North America) here, and download the SVG for your packaging designer. Numbers bought from resellers or made up yourself may be rejected by retailers and marketplaces.
How is the EAN-13 check digit calculated?
Take the first 12 digits. Starting from the rightmost, multiply alternately by 3 and 1, and add the results. The check digit is the amount needed to reach the next multiple of 10. For 400638133393: the weighted sum is 89, so the check digit is 1, giving 4006381333931. UPC-A, EAN-8 and ITF-14 use the same GS1 Mod 10 rule.
What is the difference between EAN-13 and UPC-A?
UPC-A has 12 digits and is the traditional standard in the US and Canada; EAN-13 has 13 and is used almost everywhere else. A UPC-A is an EAN-13 with a leading 0, and retail scanners worldwide read both. Use whichever format GS1 issued your number in.
Which barcode type should I use?
EAN-13 or UPC-A for retail products, ITF-14 for outer cartons of products, Code 128 for anything internal such as shipping labels, inventory, asset tags and tickets (it holds letters and digits compactly), and Code 39 where an older system or a specification requires it. For URLs or larger amounts of data, a QR code is a better choice than any 1D barcode.
Should I download PNG or SVG?
SVG for anything printed. It is vector, so bars stay perfectly sharp at any size and your designer can scale it exactly. PNG is fine for documents, spreadsheets and screens, but scaling a PNG up blurs bar edges, which can make it harder to scan. If you need a PNG, generate it at the size you will use it.
Why will my barcode not scan?
The usual causes are too little contrast (coloured bars or a coloured background), a missing quiet zone (the blank margin on each side), printing too small, or a blurry scaled-up image. Use black on white, keep the margin, and for EAN-13 stay between 80% and 200% of its nominal 37.29 × 25.93 mm size. Always test-scan a printed sample.
Barcode types at a glance
• EAN-13: 13 digits, retail products worldwide. Needs a GS1-issued number.
• UPC-A: 12 digits, retail in the US and Canada. UPC-E is a zero-suppressed 8-digit version for small packs.
• EAN-8: 8 digits, for packaging too small for EAN-13. Issued separately by GS1.
• ITF-14: 14 digits (GTIN-14), printed on shipping cartons, tolerant of rough corrugated surfaces.
• Code 128: any ASCII text, very compact. The default choice for logistics and internal labels.
• Code 39: uppercase letters, digits and a few symbols. Wide and simple; common in automotive and defence specs.
• Codabar: digits and a few symbols, used in libraries, blood banks and some courier systems.
• MSI Plessey: digits only, mostly retail shelf labels. Pharmacode: a number from 3 to 131070 used for packaging control in pharmaceutical production.
Printing barcodes that scan
Scanners read the contrast between bars and spaces, so black bars on a white or very light background are by far the most reliable. Red bars are invisible to many laser scanners, which use red light. Avoid placing a barcode over a seam, a curve or a fold.
Leave the quiet zone. EAN-13 needs a blank margin of at least 11 module widths on the left and 7 on the right; Code 128 needs 10. The margin setting here adds that space around the symbol, so keep it unless your layout already provides it.
Size matters more than resolution. An EAN-13 at 100% magnification is 37.29 mm wide by 25.93 mm tall including quiet zones, and GS1 allows 80% to 200% of that. Shrinking the height (truncation) is common on small packaging but some retailers reject it, so check their requirements.
Related free tools
- QR Code Generator — Make a QR code for a URL, text, email, phone, SMS, Wi-Fi or contact card, in your colours, and download it as PNG or SVG. Codes never expire.
- Invoice Generator — Fill in your details and line items, add tax, and download a clean PDF invoice, quote, estimate, receipt or purchase order. No account; your details stay in your browser.
- Image Converter — Convert between AVIF, HEIC, TIFF, PNG, JPG, WebP, GIF, BMP and SVG. Most conversions never leave your browser.
- Placeholder Image Generator — Make a dummy image at any size with your colours and a label, and download it as PNG, JPG, WebP or SVG. Presets for social, ads and hero banners.