How to create a barcode
- Choose the barcode type. If you're not sure, use Code 128.
- Type the data to encode. The preview updates as you type, and you'll see a message if the data isn't valid for that type.
- Adjust the bar width, height and colours if you need to.
- Download a PNG for documents or an SVG for print and design work.
Barcode types compared
| Type | Data | Typical use |
|---|---|---|
| Code 128 | All ASCII letters, numbers and symbols | Inventory, shipping labels, asset tags, tickets |
| EAN-13 | 12 digits + check digit | Retail products outside North America; books (ISBN) |
| UPC-A | 11 digits + check digit | Retail products in the US and Canada |
| EAN-8 / UPC-E | 7 or 6 digits + check digit | Small packages with little label space |
| Code 39 | A–Z, 0–9 and - . $ / + % space | Industrial, automotive and government labels |
| ITF-14 | 13 digits + check digit | Outer shipping cartons |
| Codabar | 0–9 and - $ : / . +, with A–D start/stop | Libraries, blood banks, some couriers |
Barcodes vs QR codes
A barcode stores a short code in one direction, which is why it's fast and reliable for checkout and stock systems. A QR code stores information in two dimensions, so it can hold a whole web address, Wi-Fi details or contact card. Need one of those? Use the QR code generator, or read one with the QR code scanner.
Generated with JsBarcode (MIT licence) in your browser. GS1, UPC and EAN are standards maintained by GS1.
Frequently asked questions
For your own labels, inventory, asset tags and tickets, use Code 128: it encodes letters, numbers and symbols compactly and every scanner reads it. Retail products sold in shops use UPC-A (North America) or EAN-13 (most other countries). ITF-14 is for shipping cartons, Code 39 for some industrial and government systems, and Codabar for libraries and blood banks.
You can draw any valid UPC or EAN number here, but to sell through retailers the number itself must come from GS1, the organisation that issues company prefixes. A barcode with a made-up number will scan, but it won't be registered to your company. Once you have a GS1 number, enter it here to create the image.
The last digit of UPC and EAN codes is calculated from the others so scanners can catch misreads. Enter 12 digits for EAN-13 or 11 for UPC-A and the check digit is added for you. If you enter all 13 or 12 digits, the last one must be correct or you'll see an error.
SVG is a vector image that stays perfectly sharp at any size, so it's best for printing and design software. PNG is a regular image for documents, spreadsheets and web pages; it's exported at high resolution so it still prints cleanly.
Keep dark bars on a light background, leave the white margin (quiet zone) on both sides, don't print it too small, and test it with a phone scanner app before printing a large batch. Avoid stretching the image unevenly.
Yes. The barcodes you create are yours to use for any purpose, with no watermark or sign-up.