# Barcode Generator

Generate a Code 128, EAN-13, UPC-A or EAN-8 barcode and save it as PNG or SVG. The check digit is worked out for you and nothing is uploaded.

Canonical page: https://filetity.com/barcode-generator

## Capabilities

- Free: Yes, with no watermark and no page limit.
- Account required: No. There is no account system.
- Processed on device: Yes. The file is read by your browser and never uploaded. There is no server to send it to.
- Formats: Code 128 for letters and digits, EAN-13, UPC-A and EAN-8 for numbers. Out as an SVG that stays sharp at any size, or a PNG at twice the module width.
- Limits: One barcode at a time. Not 2D codes: the QR generator is a separate page, and reading a barcode back out of a photograph is a different and harder problem this does not attempt.
- Mobile: Yes, on any modern mobile browser. Large files are limited by the memory the phone gives the browser.
- Offline: Yes, once the page has loaded. The tool keeps working with no network connection.

## Questions

### Which type do I need?

Code 128 unless something specific asked otherwise. It carries letters and digits, it is what warehouses, couriers and asset labels use, and it packs numbers tightly. EAN-13 and UPC-A are retail product codes and you do not invent those: they are issued to a company by GS1, and making one up produces a code that scans as somebody else's product.

### What is the check digit and why does it matter so much?

It is the last digit, and it is arithmetic on the ones before it: weights of 3 and 1 alternating from the right, summed, subtracted from the next ten. A scanner recomputes it and rejects the read if it disagrees, which is how a barcode survives a scuffed label. Get it wrong when generating and the code either will not scan at all or, worse, scans cleanly as a different number.

### Why does my long number make a shorter barcode than I expected?

Because Code 128 has a numeric mode that packs two digits into one symbol. A run of four or more digits is worth switching into, so a twelve digit number takes six symbols rather than twelve. The switch and the switch back cost one symbol each, which is why short digit runs are left alone.

### Will this print properly?

Save the SVG for anything going to print. It is drawing instructions rather than pixels, so the bars stay exactly proportioned at any size, and bar edges landing on half a pixel is the usual reason a printed barcode will not scan. Print it big enough that the narrowest bar survives your printer, and test one before running a thousand.

## Related tools

- [QR Code Generator](https://filetity.com/qr-code-generator): Generate a QR code from a link or text, and save it as a PNG or an SVG.
- [QR Code Scanner](https://filetity.com/qr-code-scanner): Read a QR code out of a picture and see where it goes before you go there.
