15 standardscheck digit explainedSVG and PNGruns in your browser
The last digit checks all the others.
A barcode is a number with one rule: its final digit is calculated from the rest, so a scanner can tell when something was misread. This studio draws 15 standards, works the digit out in front of you, and checks the codes you already have.
5901234123457Encoded on the server by the studio’s own encoder. The last digit is the one the next section works out.
- Standard
- EAN-13
- Digits
- 12 + 1 check
- Width
- 95 modules
- Check digit
- 7
Standards
Every thumbnail is the real output.
Products and publications
What goes through a till
EAN-13
Thirteen digits; the retail barcode of most of the world.
EAN-8
Eight digits, for packs too small for an EAN-13.
UPC-A
Twelve digits; the North American retail standard.
UPC-E
A six-digit UPC-A squeezed for small packaging.
GTIN
The family name for EAN and UPC item numbers in the supply chain.
ISBN-13
The 978/979 number on every book, drawn as an EAN-13.
ISSN
Eight digits that identify a magazine or journal.
ISMN
The number for printed music, drawn as an EAN-13.
Logistics and industry
Warehouses, cartons, pharmacy, libraries
Code 128
Dense alphanumeric code for shipping and stock.
GS1-128
Code 128 carrying GS1 data such as dates and batch numbers.
ITF-14
Fourteen digits, for outer cartons and pallets.
Code 39
Plain alphanumeric code, common in industry and government.
Code 93
A denser, more careful successor to Code 39.
Codabar
Libraries, blood banks and parcel labels.
Pharmacode
Bars-only code for pharmaceutical packaging lines.
How the last digit is worked out
With the numbers from the barcode above.
The last digit of 5901234123457 is not chosen. It is calculated from the twelve before it, so a scanner can tell when one of them was misread.
- Multiply each digit by 3 or 1 in turn, starting with 3 at the digit next to the check digit.
- Add the products together.
- The check digit is whatever brings that sum up to the next multiple of ten.
| Digit | 5 | 9 | 0 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 5 | 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Weight | ×1 | ×3 | ×1 | ×3 | ×1 | ×3 | ×1 | ×3 | ×1 | ×3 | ×1 | ×3 | |
| Product | 5 | 27 | 0 | 3 | 2 | 9 | 4 | 3 | 2 | 9 | 4 | 15 |
- Sum
- 83
- Remainder
- 83 mod 10 = 3
- Check digit
- 10 − 3 = 7
Pick by the job
Each opens its own generator.
Products on a shelf
EAN-13 — what the till expects on almost every product outside North America.
Stock and inventory
Code 128 packs letters and digits densely, so internal SKUs fit on a small label.
Cartons and pallets
ITF-14 prints large and tolerates rough cardboard.
Books
ISBN-13, drawn as an EAN-13 with the 978 prefix.
Small packs
EAN-8, for packaging with no room for thirteen digits.
Testing a till
UPC-A codes with valid check digits, for checkout and scanner tests.
Inside the studio
Beyond one barcode at a time.
Validator
Paste a code and find out which standard it is and whether its check digit is right.
Bulk generation
Make a run of sequential or random codes and download them as CSV, JSON or plain text.
SVG and PNG
Vector for print, bitmap for everything else — or copy the SVG straight to the clipboard.
Size and colour
Bar width, height, margins, colours, and whether the digits show underneath.
Frequently Asked Questions
Which barcode should I use?
For products sold in shops, EAN-13 outside North America and UPC-A inside it. For your own stock, Code 128. For shipping cartons, ITF-14. For books, ISBN. The rule is to use whatever the people scanning it already expect.
How is the check digit calculated?
The digits are multiplied by 3 and 1 in turn, starting with 3 next to the check digit; the products are added; the check digit is what brings the total up to a multiple of ten. The section above shows it with real numbers.
What is a GTIN?
The Global Trade Item Number is the number behind a product barcode. A GTIN-13 is an EAN-13, a GTIN-12 is a UPC-A, a GTIN-8 is an EAN-8 and a GTIN-14 is the number on an ITF-14 carton.
Can I print the codes?
Yes. Download the SVG, which stays sharp at any size, or a PNG. Keep a blank margin around the bars: a code crowded by artwork is the usual reason one fails to scan.
Are the generated codes valid?
Their check digits are correct and they follow each standard’s encoding rules, so a scanner reads them. They are not registered with GS1, though: a code made here belongs to no company and should not go on a product you sell.
Is anything sent to a server?
No. Barcodes are drawn in your browser, and nothing you type is stored or logged.
Make a barcode now
Pick a standard, type the digits, and the check digit is added for you.
Open the studio