Barcode Generator — Code 128, EAN-13 & UPC-A, Free
Turn text or a product number into a scannable barcode in three formats: Code 128 for general text, EAN-13 for retail products, and UPC-A for the US/Canada market. Check digits are calculated automatically, and you can download the result as a crisp SVG or a PNG image.
How it works
- 1 Pick a barcode type Choose Code 128 for arbitrary text or codes, EAN-13 for a 12-digit product number, or UPC-A for an 11-digit number. Each format shows a placeholder example to match.
- 2 Type your text or number For EAN-13 and UPC-A, enter only the data digits — the final check digit is calculated and appended automatically. Non-digit characters are ignored for these two formats.
- 3 Download the barcode Adjust the bar width and height if needed, then download the result as an SVG for print-quality scaling or a PNG for quick use anywhere.
Your data stays private
All processing happens entirely in your browser. No files, text, or data are ever sent to our servers. You can disconnect from the internet and this tool will still work.
Frequently asked questions
- What's the difference between Code 128, EAN-13, and UPC-A?
- Code 128 encodes any ASCII text (letters, numbers, punctuation) and is common for shipping labels and internal codes. EAN-13 and UPC-A are fixed-length numeric formats used on retail products worldwide (EAN-13 in most countries, UPC-A mainly in the US and Canada).
- Do I need to enter the check digit myself?
- No. For EAN-13, enter 12 digits and the 13th check digit is calculated for you. For UPC-A, enter 11 digits and the 12th is calculated. If you paste in a full 13- or 12-digit code, the extra digit is simply replaced with the correct one.
- Why does it say my Code 128 text is invalid?
- Code 128 (as implemented here) supports standard keyboard characters — ASCII 32 through 126, meaning letters, digits, spaces, and common punctuation. Characters outside that range, like emoji or accented letters, aren't supported.
- Will these barcodes actually scan?
- Yes. The bar patterns follow the official Code 128, EAN-13, and UPC-A symbologies exactly, including correct check digits and quiet zones, so any standard barcode scanner or phone scanning app can read them.
- What resolution should I use for printing?
- Download the SVG for printing — it scales to any size without losing sharpness. If you only need a barcode for a screen or a quick document, the PNG download works fine at the default size.
From the blog
Code 128 vs EAN-13 vs UPC-A: Which Barcode Do You Actually Need? A practical breakdown of the three most common barcode formats and when to use each one. Read the post →Related tools
QR Code Generator Generate QR codes from any URL or text in the browser. Random Password Generator Generate strong random passwords with custom length and character sets. UUID Generator Generate random UUID v4 identifiers for development and testing. Pomodoro Timer Focus timer with automatic work/break cycling and a session counter.