How it works
Code 128 can hold letters and numbers, which suits a SKU or a membership id. EAN-13 is the 13-digit retail code. You can type 12 digits and the page adds the check digit, or type all 13 if you already have a valid code. UPC-A is 12 digits, from 11 digits plus a check digit, with the same idea.
The check digit is a weighted sum so a scanner can tell a smudged code from a wrong one. The picture is an SVG drawn in your browser. Nothing you type is uploaded. A square code for a URL is the QR code generator, not a barcode.
Formula
- EAN-13 check
from the left, odd digits ×1, even digits ×3; check = (10 − sum mod 10) mod 10 - UPC-A check
from the left of 11 digits, odd ×3, even ×1; same remainder rule
Worked examples
A known EAN-13
400638133393 plus the check digit is 4006381333931. Typing the 12 digits is enough. The page appends 1.
A known UPC-A
03600029145 plus the check digit is 036000291452. That is the classic example used to test the weighting.
| Code | You type | Typical use |
|---|---|---|
| Code 128 | Letters or digits | Internal SKUs |
| EAN-13 | 12 or 13 digits | Retail outside the US |
| UPC-A | 11 or 12 digits | Retail in the US |
Common questions
Is the number uploaded?
No. The barcode is drawn in your browser from the text you typed.
Why was my EAN rejected?
It needs 12 digits, or 13 digits that already include the correct check digit. Letters are not allowed. Code 128 is the format for mixed text.
Does the SVG print sharply?
Yes. It is vectors, not a photo of bars. Drop it into a label template at the size the scanner expects. Very small prints fail even when the math is right.
Can this look up a product?
No. It only draws the symbol for the digits you provide. It does not query a product database.