Code 128, EAN-13, UPC and more
- Free
- No sign-up
- No upload
- Works offline
Tool facts
- Saves as
PNGSVG- Price
- Free, no sign-up, no watermark
- Are files uploaded?
- No. Everything is processed in this browser, on your device.
- Offline use
- Works without a connection once this page has loaded
- Built with
- Canvas and JsBarcode
- Browser
- A recent Chrome, Edge, Firefox or Safari, on computer or phone.
Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.
About Barcode Generator
Barcode Generator draws a one-dimensional barcode from the number or text you enter, in Code 128, EAN-13, EAN-8, UPC-A, Code 39, ITF-14, MSI, Pharmacode or Codabar, and lets you download it as a PNG image or an SVG vector file. It checks the input against the rules of each symbology while you type: for EAN, UPC and ITF-14 it calculates the GS1 check digit if you leave it out and warns you if the one you typed is wrong.
You can set the bar width, bar height, margin, font size and colors, and choose whether the human-readable text is printed under the bars. SVG is the best choice for labels and packaging because it stays sharp at any size; PNG can be exported at 1× to 4× scale. Note that retail EAN and UPC numbers must be licensed from GS1; this tool draws the symbol but does not assign product numbers.
Barcode Generator runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.
How to use Barcode Generator
- Choose a Format, for example Code 128 for any text or EAN-13 for retail products.
- Type the Value. For EAN-13 you can enter 12 digits and the check digit is added for you.
- Adjust bar width, bar height, text and colors under Options.
- Click Download SVG for print, or Download PNG at the chosen scale.
Frequently asked questions
Which barcode format should I use?
Use EAN-13 (or UPC-A in North America) for products sold in shops, ITF-14 for shipping cartons, Code 128 for internal labels, asset tags and anything with letters, and Code 39 when an older system requires it. Pharmacode is used on pharmaceutical packaging and Codabar in some libraries and blood banks.
How is the EAN-13 check digit calculated?
Starting from the rightmost of the first 12 digits, multiply digits alternately by 3 and 1, add the results, and take the number needed to reach the next multiple of 10. For 590123412345 the check digit is 7, giving 5901234123457. The same GS1 method is used for EAN-8, UPC-A and ITF-14.
Which characters can each format contain?
Code 128 accepts all 128 ASCII characters. Code 39 accepts A–Z, 0–9, space and - . $ / + %. EAN-13, EAN-8, UPC-A, ITF-14 and MSI accept digits only. Pharmacode is a number from 3 to 131070. Codabar accepts digits and - $ : / . + with optional start and stop letters A–D (both or neither).
Will my barcode scan at any size?
Scanners need enough width per bar and a clear quiet zone on both sides. For printing, export SVG or a PNG at 3× or 4× scale, keep a margin, and use black bars on a white background. Test the printed result with a real scanner before mass printing.
Do I need to register EAN or UPC numbers?
Yes, for retail. Product numbers used in shops must come from GS1 so they are unique worldwide. For internal use (inventory, libraries, events) you can use Code 128 with any value you like.