Barcode Generator
Type what it should say, choose a format, and take away a barcode that scans.
A check digit is added for you where the format requires one.
🔒 Runs entirely in your browser — nothing you type is uploaded or stored on a server.
This is a real barcode encoder, not a picture of one. The pattern tables for Code 128, EAN-13, UPC-A, EAN-8 and Code 39 are built into the page, the check digit is calculated from what you typed, and the bars you see are the bars a scanner reads. Type your value, pick a format and download a PNG for printing or an SVG for artwork that stays sharp at any size.
Also on Txtset: make a QR code instead.
Nothing is uploaded. There is no server behind this page and no account. Stock codes, asset tags and order numbers are exactly the sort of thing that should not be passing through somebody else’s machine on the way to a label printer, and here they do not — you can disconnect from the internet once the page has loaded and it still works.
The formats are the ones people actually need. Code 128 carries letters, digits and punctuation and is what most warehouses, couriers and asset registers use. EAN-13 is the retail barcode outside North America and UPC-A is its North American twin — give the first 12 or 11 digits and the final check digit is worked out for you. EAN-8 exists for packs too small for a full EAN-13. Code 39 is the old industrial format that many older readers still expect.
Need a two-dimensional code that can hold a URL, a Wi-Fi password or a whole vCard? Use the QR Code Generator instead — a linear barcode holds a number or a short string and nothing more.
How to use
- Choose the barcode format. Code 128 is the safe answer if you are labelling your own things rather than selling them in shops.
- Type what the barcode should say. Retail formats take digits only; Code 128 takes letters and punctuation too.
- Set the bar width and height. Wider bars are more forgiving of a cheap scanner and a rough print.
- Leave “print the number underneath” on if a person will ever need to read or key it by hand.
- Download the PNG to drop into a document, or the SVG if it is going to be resized or sent to a printer.
Examples
TXT-2026-0417 in Code 128 — letters, digits and a hyphen in one symbol, with a check character added automatically.Typing the first 12 digits of an EAN-13 fills in the thirteenth for you, and the number is printed in the split layout a real pack uses.
Pure digits in Code 128 pack two to a symbol, so a 16-digit code comes out roughly half as wide as the same digits in any other format.
Frequently asked questions
Will these barcodes actually scan?
Which format should I choose?
What is a check digit and why did the number change?
Are my codes sent anywhere?
Why is the SVG better than the PNG?
Can Code 39 hold lower case letters?
- . $ / + %. Lower case is folded to upper case so you get a working barcode rather than an error, and the printed text shows what was actually encoded.