Generator

UPC and EAN barcode generator.

Type a UPC, EAN, ISBN or SKU to get a scannable barcode with its check digit tested. Download SVG or PNG, print a sheet of labels, and see where each number goes in Shopify.

GS1, Shopify and Google rules checked
What do you need?
Your number

12 digits, US and Canada retail

Valid UPC-A. The check digit 2 matches.

Look

Scanners need this quiet zone. Turn it off only if your label adds its own margin.

Your barcode

036000291452

226 x 136 px at 1x. The print PNG is 300 dpi and about 38.3 x 23 mm.

Shopify mode

The type and number you enter are written into the page address, so a shared link opens the same barcode.

What are UPC, EAN, GTIN and ISBN?

A GTIN (Global Trade Item Number) is the number that identifies a product for sale, and GS1 is the standards body that issues them. UPC and EAN are the barcodes that carry it: a 12-digit GTIN prints as a UPC-A, a 13-digit one as an EAN-13, and an 8-digit one as an EAN-8 on small packs.

An ISBN is a book's number. ISBNs have had 13 digits since 1 January 2007, start with 978 or 979, and print as an EAN-13 barcode, which is why a book's barcode looks like a grocery one.

Barcode types this tool makes
TypeDigitsUsed for
UPC-A 12 Retail checkouts, mainly in the US and Canada
EAN-13 13 Retail checkouts, common outside North America
EAN-8 8 Small packages where a full barcode will not fit
ISBN-13 13, starting 978 or 979 Books (printed as an EAN-13)
Code 128 Letters, digits and symbols SKUs, shelf, bin and shipping labels; not a GTIN

Not made here: UPC-E (a compressed UPC; GS1 US no longer licenses UPC-E prefixes) and ITF-14 or GS1-128 for cartons and logistics.

How check digits work.

The last digit of every UPC, EAN and ISBN-13 is a check digit, worked out from the others so a scanner can catch a misread or a typo. GS1's rule, in plain words:

  1. Start with the rightmost digit before the check digit and multiply it by 3. Multiply the next one to its left by 1, the next by 3, and so on.
  2. Add up the results.
  3. The check digit is whatever takes that sum up to the next multiple of 10, or 0 if the sum already is one.
Worked example: UPC-A 03600029145, then the check digit
Digit 03600029145
Times 31313131313
Result 0318000693415

The results add up to 58. The next multiple of 10 is 60, so the check digit is 2 and the full UPC-A is 036000291452, the same code Shopify uses in its sample product file.

The same rule gives 1 for EAN-13 400638133393 (4006381333931), 4 for EAN-8 9638507 (96385074) and 7 for ISBN 978030640615 (9780306406157). GS1's own example, 629104150021, adds up to 57, so its check digit is 3. Because the weights count from the right, a UPC-A with a 0 in front is a valid EAN-13 with the same check digit.

When to use Code 128.

Code 128 carries letters, digits and symbols, so it suits anything that is not a retail GTIN: SKUs, shelf and bin labels, order numbers and stock tags. Shopify POS finds a variant by scanning its SKU or any of its barcodes, so an internal SKU printed as Code 128 works at your own till with a scanner that reads Code 128.

Shopify's Retail Barcode Labels app prints Code-128 only barcodes, using the last 8 digits of the variant ID. Shopify says those codes are not suitable for Google Shopping because they can be shared across stores, and to buy unique barcodes from GS1 instead. Products you sell through retailers, Amazon or Google need the GTIN on a UPC or EAN barcode.

About the Code 128 check character: it is built into the bars and never typed. The tool works it out the way the Code 128 standard is usually summarized: the start code's value plus each character's value times its position, divided by 103, keeping the remainder. Our sources confirm that the check character exists but not that formula, so read this as a summary. We compared the tool's bars with an independent open-source barcode encoder for every type and the examples we tested, and they matched.

Shopify barcode generator

Barcodes for a Shopify store, step by step.

  1. Get the numbers

    Use the GTIN your manufacturer gave you, or license your own from GS1 if you make the product. Shopify does not issue GTINs: its help sends you to the manufacturer or to GS1.

  2. Make the barcodes here

    Type one number, or paste a list or a spreadsheet column into the batch mode. The tool tests each check digit and lists any line that needs fixing, with the reason.

  3. Add them to Shopify

    In the admin, each variant has a Barcodes field: pick the type (Custom, GTIN, UPC, EAN and ISBN) and paste the number; a variant holds up to 20. In a product CSV, the Variant Barcodes column takes typed values such as upc:012345678905, several separated by semicolons.

  4. Print the labels

    The batch mode lays the barcodes out on a sheet of 2 x 1 in, 50 x 25 mm or other label sizes. Print at 100% scale and test one sheet first.

Data and assumptions.

Checked
  • The check-digit rule is GS1's, and the worked examples on this page were checked against it on October 23, 2026.
  • The tool leaves clear space of 9 modules each side for UPC-A, 11 on the left and 7 on the right for EAN-13 and ISBN-13, 7 for EAN-8 and 10 for Code 128.
  • The print PNG is 300 dpi with 4-pixel modules, about 0.34 mm per bar width. SVG files stay sharp at any size.
  • A 10-digit ISBN is turned into its 13-digit form (978, the first nine digits, a new check digit). The old tenth character is not tested, because its rule was not confirmed with the ISBN agency.
  • Codes starting 02, 04 and 2 (kept for in-store use) or 05, 98 and 99 (coupons) get a warning, because Google Merchant Center does not accept them as product GTINs. The prefix is read on the 13-digit form.
  • Spaces and dashes in a number are ignored, as Google's feed rules ignore them.

Sources

Questions about barcodes.

Can I make up my own UPC number?

You can draw any number as a barcode, but a UPC only identifies your product if it comes from GS1, or from the manufacturer whose GS1 prefix it uses. Marketplaces check GTINs against GS1's records, and Google says not to guess or make one up. For items that stay in your own shop, a SKU printed as Code 128 is the honest choice.

Does Shopify give you barcodes or GTINs?

No. Shopify's help sends you to the manufacturer, or to GS1 if you make the product. Its Retail Barcode Labels app prints internal Code 128 labels from the variant ID, and Shopify says those are not suitable for Google Shopping.

What is the difference between UPC and EAN?

Both carry a GTIN and use the same bar patterns. UPC-A has 12 digits and is used mainly in the US and Canada; EAN-13 has 13 and is used across most of the world. Put a 0 in front of a UPC-A and you have a valid EAN-13 with the same check digit.

Is a GTIN generator the same as a barcode generator?

No. A barcode generator, like this one, draws the bars for a number you already have and tests its check digit. No tool can issue a real GTIN; those come from GS1. A number that only looks valid is not registered to your brand, so retailers and Google can reject it.

How do I add a barcode to a product in Shopify?

Open the product in your admin, open a variant, and in its Barcodes field pick the type and paste the number. A variant can hold up to 20. For many products at once, put typed values such as upc:012345678905 in the Variant Barcodes column of a product CSV and import it.

What size should a printed barcode be?

Print from the 300 dpi PNG or the SVG at 100% scale, keep the clear space on both sides, and never stretch the barcode in one direction only. If you need it smaller, shrink it evenly, then test one label with your scanner or phone before printing a full run.

Selling the same product in several colors?

Make a matching set of swatches for every variant, with the values Shopify's own swatches read.