How to make a barcode
- Choose the Barcode type: Code 128 for text and internal labels, EAN-13 or UPC-A for retail products, ITF-14 for outer cartons, and so on (see the table below).
- Type into Number or text to encode, or tap one of the Examples. For EAN, UPC and ITF-14 you can leave out the last digit: the check digit is calculated and added. If you enter every digit, the check digit is verified, and a wrong one is reported with the correct value.
- Watch the live preview. Encoded shows the full number the bars contain, and Copy number copies it. For retail and carton codes, Check digit calculation shows the working.
- Adjust the Options if needed: Bar width, Bar height (px), Quiet zone, Font size (px), Show text, Bar colour and Background. The tool warns you about colours or margins that scanners struggle with.
- Press Download PNG (drawn at the chosen PNG scale for crisp edges), Download SVG for print and design software, or Print to print only the barcode.
Which barcode type should you choose?
| Type | Characters | Length | Typical use |
|---|---|---|---|
| EAN-13 | Digits | 13 (12 + check digit) | Retail products worldwide; books (ISBN starting 978 or 979) |
| UPC-A | Digits | 12 (11 + check digit) | Retail products in North America |
| EAN-8 | Digits | 8 (7 + check digit) | Small packs where EAN-13 does not fit |
| UPC-E | Digits | 8 (number system, 6 digits, check digit) | Small packs in North America (a compressed UPC-A) |
| ITF-14 | Digits | 14 (13 + check digit) | Outer cartons and case codes (GTIN-14) |
| Code 128 | All printable ASCII | Variable | Logistics, shipping labels, internal IDs |
| Code 39 | A–Z, 0–9, space, - . $ / + % | Variable | Industry, ID badges, automotive and defence |
| ITF | Digits | Even number | Warehouses and distribution |
| Codabar | 0–9, - $ : / . +, start/stop A–D | Variable | Libraries, blood banks, older systems |
Code 128 is the most compact general-purpose choice for text: it switches automatically to a double-density mode for runs of digits. GS1-128 is a GS1 application of Code 128 that adds standard data fields such as batch numbers and expiry dates; it is used on pallet and logistics labels. Code 39 is older and wider, but almost every scanner reads it and it needs no check character.
How check digits work
EAN-13, EAN-8, UPC-A, UPC-E and ITF-14 all end in a check digit that lets the scanner detect a misread. They use the same GS1 rule:
- Starting from the rightmost digit (before the check digit), multiply the digits by 3 and 1 alternately: 3, 1, 3, 1, and so on.
- Add up the products.
- Check digit = (10 − sum mod 10) mod 10, which is the amount needed to reach the next multiple of 10.
Worked example, EAN-13 400638133393: from the right, 3×3 + 9×1 + 3×3 + 3×1 + 3×3 + 1×1 + 8×3 + 3×1 + 6×3 + 0×1 + 0×3 + 4×1 = 89. The next multiple of 10 is 90, so the check digit is 1 and the full number is 4006381333931. For UPC-A 03600029145 the sum is 58, so the check digit is 2: 036000291452. UPC-E codes take their check digit from the UPC-A number they expand to. Code 39 can carry an optional mod 43 check character (the sum of the character values divided by 43, keeping the remainder), and Code 128 always includes a mod 103 check character that the scanner uses but does not show.
Printing tips
- Size: an EAN-13 or UPC-A at the GS1 nominal size (100%) is about 37.3 mm wide including its quiet zones, with a module (the narrowest bar) of 0.33 mm. Do not shrink retail codes far below that.
- Quiet zone: keep the blank margin on both sides. EAN-13 needs 11 modules on the left and 7 on the right, UPC-A 9 on each side, and Code 128, Code 39 and ITF about 10. Text or a box edge inside that margin is a common reason for failed scans. The Recommended setting applies these values.
- Contrast: use dark bars on a light background; black on white is safest. Many scanners use red light, so red, orange and yellow bars look like the background and do not scan. The tool warns you about them.
- Do not stretch: resize proportionally, or better, change Bar width. Stretching one way distorts the bar ratios.
- Print at 100%: turn off "fit to page" in the print dialog, then test-scan a printed proof with a real scanner or phone before printing a full run.
Barcodes or QR codes?
A 1D barcode stores a short number or code that points to a record in a database, such as a product, a parcel or an asset, and every checkout and warehouse scanner reads it. A QR code is two-dimensional, stores far more (a whole web address, Wi-Fi details or a contact card) and is read by phone cameras. For product numbers and internal labels, use a barcode; for links and anything longer than a few dozen characters, use the QR code generator. For more background, read Barcode Types Explained: EAN vs UPC vs Code 128, or browse more everyday tools.
Privacy: barcodes are drawn by JavaScript in your browser, so the numbers and text you type are never sent to a server. Only your settings (barcode type, bar width, height, quiet zone, font size, text on or off, colours, PNG scale and the Code 39 and ITF-14 options) are remembered on this device, in local storage. The data itself is not saved.
Frequently asked questions
Is this barcode generator free?
Yes. There is no sign-up, no watermark and no limit on how many barcodes you make, and you can use the PNG and SVG files for any purpose. The barcodes are created in your browser.
Can I use these barcodes on products sold in shops?
Only if the number belongs to you. Retailers accept EAN and UPC numbers that come from a GS1 company prefix, which you license from your local GS1 member organisation. This tool draws a correct barcode for a number you already have; it does not give you one.
How do I calculate an EAN-13 check digit?
Multiply the first 12 digits alternately by 3 and 1, starting with 3 on the rightmost of the 12, add the products, and take (10 − sum mod 10) mod 10. For 400638133393 the sum is 89, so the check digit is 1. Choose EAN-13 above and enter 12 digits to see the full calculation.
What is the difference between UPC and EAN?
UPC-A has 12 digits and is used mainly in the United States and Canada; EAN-13 has 13 digits and is used in the rest of the world. A UPC-A number is the same as an EAN-13 with a leading 0, so modern scanners read both.
Which barcode should I use for inventory?
Code 128 is the usual choice for your own inventory, asset and location labels: it accepts letters, digits and symbols and stays compact. Code 39 also works with practically any scanner, but it is wider for the same data and has only uppercase letters.
Can I make a barcode from text or a URL?
Short text, yes: choose Code 128 and type up to 80 plain ASCII characters (letters without accents, digits and symbols). For a URL or long text, a QR code is the better choice, because a 1D barcode becomes too wide to scan reliably and most barcode scanners will not open links.
Updated