Barcode generator
Generate EAN, UPC, Code 128 or Code 39 barcodes as SVG or PNG. Valid digits do not establish ownership of a product code.
Runs entirely in your browser
Label sheet (PDF)
The whole barcode is scaled evenly inside each label, including its blank margins.
Leave columns and rows blank for as many as fit; leave copies blank to fill the first sheet (up to 100).
Filled cells will print; empty cells stay blank.
Print at Actual size / 100%, no fit-to-page.
Barcodes are drawn with the JsBarcode library. The tool checks the digits and check digit but cannot tell whether a number is registered to you; real EAN and UPC product codes come from GS1.
How to make a barcode
- Pick the format your scanner or retailer asks for. If you are unsure and the content is ordinary text or numbers, Code 128 is the usual choice.
- Type the value. For EAN-13, EAN-8, UPC-A and ITF-14, leave the check digit off and it is added, or type it and it is verified.
- Adjust bar width, height and colours if needed, then download the barcode as SVG or PNG. For repeated labels, set the PDF sheet dimensions in millimetres and the first unused cell. Print at Actual size / 100%.
How linear barcodes encode data
A linear barcode is a row of bars and spaces whose widths stand for characters. EAN-13 and UPC-A are fixed-length numeric codes for retail products: twelve digits for EAN-13 or eleven for UPC-A identify the product, and a final check digit protects against misreads. Code 128 is the flexible one, encoding any ASCII character by switching between character sets, which makes it dense and the default for shipping labels and internal asset tags.
The check digit for the GS1 family (EAN, UPC and ITF-14) is a weighted sum. Starting from the rightmost data digit, the digits are weighted 3, 1, 3, 1 and so on, and the check digit tops the sum up to the next multiple of 10. UPC-E is a compressed form of UPC-A, so its check digit is calculated on the expanded twelve-digit number. This tool computes all of these and refuses a number whose check digit does not match, rather than printing a code that would fail.
Print size matters more than format. Scanners need a quiet zone of blank space on both sides, which is the margin setting here, and bars that are not too thin for your printer. A bar width of 2 pixels at 300 dots per inch is far finer than at screen resolution, so test a printed sample before a full run.
Tips
- Need a code that holds a link or Wi-Fi login instead? Use the QR code generator.
- Creating unique identifiers to encode? The UUID generator makes random ones.
- Converting a code from hexadecimal or binary? Try the Number base converter.
Run this job in code with the paid API. Barcode generator API.
Questions
What is a check digit?
The last digit of an EAN, UPC or ITF-14 number is calculated from the others, so a scanner can catch a typo. Each digit counting from the right is multiplied by 3 and 1 alternately, the products are added, and the check digit is whatever brings the total up to a multiple of 10.
Can I use these for products I sell in shops?
Retail systems expect numbers allocated to you by GS1 or your national GS1 office. This tool draws any valid number, but a number you invented may clash with someone else's product. Use it for internal labels, tests and artwork.
Which format fits which job?
Code 128 packs any ASCII text compactly. EAN-13 and EAN-8 are for retail products worldwide, UPC-A and UPC-E for North American retail. ITF-14 labels shipping cartons, Code 39 and Codabar appear in logistics, libraries and blood banks, and Pharmacode is used in pharmaceutical packing.
Should I download SVG or PNG?
Use SVG for print or anything that must stay sharp at any size. Use PNG for documents and web pages that need a bitmap; choose a larger scale to avoid soft edges when the image is enlarged.