Three symbologies, one box to type in, and the two things a hand-made barcode usually gets wrong done for you: the check digit is calculated or verified while you type, and the quiet zone is drawn into the file rather than left to whoever pastes it.
Which one to choose
Code 128 for anything internal, such as asset tags, shelf locations, order numbers and batch codes, because it carries letters as well as digits at any length. EAN-13 and UPC-A are for retail products, and only with a number issued to you: those numbers identify a company.
Why a check digit exists
The last digit of an EAN-13 or UPC-A is arithmetic over the others. A scanner repeats the sum on each read, so a scratched or smudged code fails to scan instead of returning a wrong number. Type one digit short and this tool completes it; type the full length and it verifies it.
The quiet zone
The blank margin either side is part of the symbol, not padding: it is what the scanner measures the narrowest bar against. A code pasted flush against a table edge or a coloured background is the commonest reason a picture that looks perfect will not read. It is drawn into every file this tool produces.
What it checks
Both files are opened again from their own bytes and compared with the symbol that was drawn, module by module, before any download exists. Separately, every bar pattern this tool can produce is held by a test against the output of Barcode Writer in Pure PostScript, which is a completely independent implementation of the same standards.
Printing, which is where they fail
Scale matters more than resolution. A retail EAN-13 is meant to be about 37 mm wide, and below roughly 80% of that it stops being reliable. Print black on white, avoid glossy laminate, and take the SVG when the label is going to a printer.
The short answer
Which barcode you need depends on where it will be scanned. A product sold in shops needs an EAN-13 (13 digits) or, in North America, a UPC-A (12 digits), and its number has to be licensed from GS1; this page draws it and works out the check digit. Anything you label for yourself — stock, shelves, assets, orders — takes Code 128, which carries any text and needs no registration.
The check digit, worked through
A worked example for retail codes, using 952000123456 — a number beginning 952, which GS1 reserves for demonstrations. Every digit gets a weight, alternating three and one so that the digit just before the check carries three. The weighted digits are summed, and the check digit is the amount needed to reach a multiple of ten.
Check digit for 952000123456
Position
Digit
Weight
Product
1
9
×1
9
2
5
×3
15
3
2
×1
2
4
0
×3
0
5
0
×1
0
6
0
×3
0
7
1
×1
1
8
2
×3
6
9
3
×1
3
10
4
×3
12
11
5
×1
5
12
6
×3
18
Sum
71
Here the products add up to 71. The next multiple of ten is 80, so the thirteenth digit is 9 and the barcode encodes 9520001234569. Type the same twelve digits into the tool above with EAN-13 selected and it returns the same digit.
May I invent an EAN-13 or UPC-A number for my own product?
You can draw the picture, but a number for something on sale has to be one you were issued. The first digits name a company, through GS1 in most countries, and a made-up number collides with a real product or is refused. For stock and assets, use Code 128.
How does a barcode differ from a QR code?
A barcode keeps its data in the widths of vertical bars, is read along one line and holds a short number. A QR code is a grid read in two dimensions, holds far more and survives damage. Tills want barcodes; phones want QR codes, and this site has a tool for those too.
Why will the barcode I printed not scan?
Usually it is too small, stretched in one direction, short of blank space on either side, or printed on something shiny. Scale it proportionally, leave the margin that is in the file, print black on plain white, and prefer the SVG.
What kind of text can the Code 128 option hold?
Plain ASCII, with no fixed length. Accented letters and other characters outside ASCII are refused rather than changed. The Code 128 page goes through the three internal code sets and how the symbol grows.
Is there a number printed beneath the bars?
For EAN-13 and UPC-A, yes: it is drawn into the image in the grouping the standard prints it in. Code 128 has no standard printed form, so no caption is invented; add one wherever you place the picture.
Does the number I type go anywhere?
No. The encoding, the drawing and the read-back check all run in this tab, and the site has no server to receive a code. Product numbers are often confidential before a launch.
We count page views with our own analytics, which sets no cookie and stores no analytics identifier in this browser. Your choice below is about advertising: if it is switched on here, our partners may store and read information on your device. How we use it