Barcode Generator — CODE128, EAN-13, UPC-A & CODE39
Type a value, get a live barcode — download as SVG or PNG, free.
A free online barcode generator for developers, sellers, and makers. Choose CODE128 for general text, EAN-13 or UPC-A for retail products, or CODE39 for logistics labels — the tool validates check digits and rejects invalid input, so what you download actually scans. Everything runs in your browser; nothing is uploaded.
Which barcode format should you use?
- CODE128 — encodes any ASCII text (letters, digits, symbols) at high density. The most versatile format; use it whenever you're not required to use a specific retail or industry standard.
- EAN-13 — the international standard for retail product barcodes, fixed at 13 digits with a check digit. Used on packaged goods sold in Europe, Asia, and most of the world outside North America.
- UPC-A — the North American equivalent of EAN-13, fixed at 12 digits with a check digit. Both are technically compatible; a UPC-A code is an EAN-13 code with a leading zero.
- CODE39 — encodes uppercase letters, digits, and a limited symbol set (space,
- . $ / + %). Widely used in logistics, inventory, and industrial labeling because it's easy to print and scan reliably even at low resolution.
What is a check digit, and why does it matter?
EAN-13 and UPC-A both end in a check digit — a number mathematically derived from the digits before it, used by scanners to catch misreads. If you type a 13-digit (or 12-digit for UPC-A) value with the wrong final digit, the barcode is invalid and won't scan correctly. This tool validates the check digit before rendering, so an invalid value shows a clear error instead of a barcode that looks fine but fails at the register.
SVG vs PNG — which export should you use?
Download the SVG when you need a crisp vector for print, packaging artwork, or further editing in a design tool — it scales to any size with no quality loss. Download the PNG when you need a raster image to drop straight into a document, spreadsheet, or website that doesn't accept SVG.
Frequently asked questions
How do I generate a barcode online?
Pick a format (CODE128, EAN-13, UPC-A, or CODE39), type your value into the input, and the barcode updates live. Adjust bar width, height, margin, and colors if needed, then download it as an SVG or PNG.
Which barcode format should I use?
CODE128 encodes any ASCII text and is the most versatile choice for general-purpose use. EAN-13 and UPC-A are fixed-length numeric formats used for retail product barcodes — EAN-13 internationally, UPC-A mainly in North America — and both require a valid check digit. CODE39 encodes uppercase letters, digits, and a small set of symbols, and is common in logistics and industrial labeling.
Why does my EAN-13 or UPC-A barcode show an error?
EAN-13 and UPC-A both end in a check digit calculated from the preceding digits. If the value you entered has the wrong check digit — or the wrong number of digits (13 for EAN-13, 12 for UPC-A) — the barcode is invalid and won't scan, so the tool rejects it with an error instead of generating a broken barcode.
Can I use lowercase letters or symbols with CODE39?
CODE39 automatically uppercases lowercase letters, so typing them works fine. Its full character set is A-Z, 0-9, space, and the symbols - . $ / + %. Any other character will be rejected.
Should I download the barcode as SVG or PNG?
Download SVG when you need a vector file for print or further editing — it stays crisp at any size. Download PNG when you need a raster image to paste directly into a document, website, or design tool that doesn't support SVG.
Is my data uploaded anywhere?
No. Every barcode is generated locally in your browser. Nothing is uploaded or stored on a server.
Related tools: UUID Generator · SVG Background Remover