Barcode generator: Code 128, EAN-13, UPC-A and bulk label sheets, free
A barcode generator turns a number or text into a pattern of bars that a scanner reads back. Choose the type your use needs (Code 128 for shipping and inventory, EAN-13 or UPC-A for retail products, ISBN for books), type the value, and download the barcode as a PNG or a vector SVG. This tool also turns a pasted list or CSV into a zip of images or a printable PDF sheet, including Avery label layouts, and it adds and checks the check digit for you. Everything is generated in your browser.
Your files never leave your device. Processing happens in your browser. How that works.
Presets
How it works
- Choose the barcode type. If you are not sure, Code 128 holds letters and digits and is read by almost every scanner.
- Type the value. The preview updates as you type and tells you if the value does not fit the type.
- Download a PNG for documents and screens, or an SVG for print and design software.
- For many barcodes, paste a list (or open a CSV) in the bulk panel and download a PDF label sheet or a zip of images.
Runs as JavaScript inside this tab. Turn off your connection after the page loads and it still works.
Barcode types: what each one holds and where it is used
Choosing a type
| Type | Holds | Length | Check digit | Typical use |
|---|---|---|---|---|
| Code 128 | Letters, digits, symbols (ASCII) | Any | Built in, not printed | Shipping, inventory, asset tags, tickets |
| EAN-13 | Digits | 13 | Last digit | Retail products worldwide |
| UPC-A | Digits | 12 | Last digit | Retail products in the US and Canada |
| EAN-8 | Digits | 8 | Last digit | Very small retail packages |
| ISBN | Digits (978 or 979 prefix) | 13 | Last digit | Books; drawn as EAN-13 |
| ITF-14 | Digits | 14 | Last digit | Cartons and shipping cases |
| Interleaved 2 of 5 | Digits | Even | None | Warehousing, tickets |
| Code 39 | Capital letters, digits, - . $ / + % and space |
Any | Optional | Industry, defence, ID badges |
| Codabar | Digits and - $ : / . + |
Any | None | Libraries, blood banks |
| MSI | Digits | Any | None here | Shelf labels |
If you control both the labels and the scanners, Code 128 is almost always the right choice: it is the most compact and holds everything on a keyboard.
How the check digit is calculated
EAN-13, EAN-8, UPC-A and ITF-14 all use the same rule:
- Starting from the right-hand end of the digits (before the check digit), multiply the digits alternately by 3 and 1.
- Add the results.
- The check digit is whatever brings the total up to the next multiple of 10.
For 590123412345: (5×3 + 4×1 + 3×3 + 2×1 + 1×3 + 4×1 + 3×3 + 2×1 + 1×3 + 0×1 + 9×3 + 5×1) = 83, so the check digit is 7 and the full code is 5901234123457.
What the parts of a retail barcode mean
An EAN-13 such as 5 901234 123457:
| Part | Example | Meaning |
|---|---|---|
| GS1 prefix | 590 | The GS1 office that issued the number (590 is Poland). It is not the country of manufacture |
| Company and item | 1234 12345 | Assigned to the brand owner, then by them to each product |
| Check digit | 7 | Calculated from the other twelve |
A UPC-A is an EAN-13 with a leading zero left off: UPC 036000291452 is EAN 0036000291452.
Printing so that it scans
| Rule | Why |
|---|---|
| Dark bars on a light background | Scanners read reflected red light; red, orange and yellow bars are invisible to them |
| Keep the blank margins (quiet zones) | A scanner needs about 10 narrow-bar widths of empty space on each side to find the code |
| Do not stretch unevenly | Changing the width alone changes the bar ratios. Scale both directions, or change the bar height option instead |
| Narrowest bar at least 0.19 mm | Smaller needs high-resolution printing and scanning |
| Prefer SVG or PDF for print | They are vector, so bar edges stay exact at any size |
| Barcode | Nominal size | Smallest allowed |
|---|---|---|
| EAN-13 / UPC-A | 37.3 × 25.9 mm | 80% (29.8 mm wide) |
| EAN-8 | 26.7 × 21.3 mm | 80% |
| ITF-14 | 142.8 × 32 mm | 50% on good print |
Label sheets
| Layout | Paper | Labels | Label size |
|---|---|---|---|
| Avery 5160 / 8160 | US Letter | 30 (3 × 10) | 2⅝ × 1 in |
| Avery 5163 / 8163 | US Letter | 10 (2 × 5) | 4 × 2 in |
| Avery L7160 | A4 | 21 (3 × 7) | 63.5 × 38.1 mm |
| Avery L7163 | A4 | 14 (2 × 7) | 99.1 × 38.1 mm |
| Plain grid | Letter or A4 | 12 or 24 | Cut along the dotted guides |
Print at 100% / actual size, with “fit to page” turned off, or the labels drift out of line. Print one page on plain paper first and hold it against a label sheet to the light.
Worked examples
An EAN-13 from 12 digits
Type 590123412345 with the type set to EAN-13. The tool adds the check digit and the barcode reads 5901234123457. The line under the preview shows the full number with “check digit added”.
A mistyped check digit
Type 5901234123450. Instead of drawing a barcode that would not scan, the tool says the last digit should be 7, not 0.
A UPC-A for a US product
Type the 11 digits 03600029145; the result is 036000291452.
An asset tag with letters
Set the type to Code 128 and type TB-000123. Code 128 holds the letters, the hyphen and the digits in a barcode 112 narrow bars wide. Code 39 would need 175 for the same text.
A book barcode from an old ISBN-10
On the ISBN page, type 0-306-40615-2. It is converted to ISBN-13, and the barcode encodes 9780306406157 with “ISBN 978-0306406157” printed above the bars.
Thirty price labels on one sheet
Paste thirty lines such as 4006381333931, Notebook A5 into the bulk box, choose Avery 5160, and download the PDF: one US Letter page, three columns of ten, each barcode with its name underneath. Print at 100%.
A partly used label sheet
The first eight stickers are already gone. Set Skip first to 8 and the barcodes start at the ninth position.
Barcodes for a designer
Paste the list, then Download SVGs (.zip): one vector file per code, named after its value, ready to place in a layout.
Frequently asked questions
Which barcode type should I use?
For your own internal use (inventory, assets, tickets, shipping) use Code 128: it holds letters and digits and is very compact. For products sold in shops use EAN-13, or UPC-A in the US and Canada. For books use ISBN. For cartons use ITF-14.
Do I need to buy a barcode number?
Only for retail. EAN and UPC numbers are issued by GS1 so that no two products in the world share one. For labels used only inside your own business you can make up any numbers you like, with Code 128.
What is the check digit?
The last digit of an EAN, UPC or ITF-14 code is calculated from the others, so a scanner can tell when a code was misread. Enter the code without it and this tool adds it; enter it and the tool tells you if it is wrong, and what it should be.
Should I download PNG or SVG?
SVG for anything that will be printed or placed in a design: it is made of shapes, so it stays sharp at any size. PNG for documents, spreadsheets and screens. For PNG, choose a width of at least 600 pixels for printing.
How small can I print a barcode?
A retail EAN-13 or UPC-A is designed to be 37.3 mm wide and may be reduced to 80% (about 30 mm). For any barcode, keep the narrowest bar at least 0.19 mm (7.5 mil) wide for ordinary scanners, and leave the blank margins on both sides intact.
Can I make hundreds of barcodes at once?
Yes. Paste one value per line, or open a CSV, and download a PDF sheet (plain paper grids or Avery label layouts) or a zip of PNG or SVG files. A label after a comma is printed under each code. There is no row limit.
Will the barcodes scan?
Yes. They follow the published specifications, with the correct quiet zones. Print in black on a white or light background, do not stretch the image unevenly, and test one with your scanner or a phone app before printing a large run.
Are my product numbers uploaded?
No. The barcodes are drawn in your browser. Nothing you type or paste is sent to a server.
Barcode generator · last updated · changelog · part of Canned Tuna