Home/Ecommerce/Barcode Number Generator

Barcode Number Generator

Generate structurally valid EAN-13, UPC-A, EAN-8 and GTIN-14 numbers with correct GS1 check digits — plus a validator that fixes a wrong check digit for you.

Free Browser-based No signup Copy-ready
Generator Settings
For testing, not for retail sale. Real retail barcodes must come from a GS1 company prefix licensed to your business. Numbers generated here are structurally valid but not assigned to you.
Your GS1-issued prefix. Without one, codes use a restricted internal-use range.
Options
2000000000015
Generated Numbers

How it works

1

Choose a format

EAN-13 for global retail, UPC-A for North America, GTIN-14 for cases.

2

Generate a block

Sequential item numbers with the check digit computed for each.

3

Validate anything

Paste any barcode to verify its check digit, or omit the last digit to calculate it.

Why you cannot just make up a barcode

A barcode number is not a format you satisfy — it is an entry in a global registry. GTINs are unique worldwide only because GS1 issues each company its own prefix, and every number a company creates begins with it. That is the entire mechanism.

A number that merely has a correct check digit will scan perfectly on your own equipment and still be rejected by any major retailer, because they verify the prefix resolves to the brand selling the product. Worse, an invented number may already belong to somebody else's item.

Legitimate uses for this tool

  • Test data for a POS, ecommerce or WMS build.
  • Calculating or verifying a check digit on a real number.
  • Internal-use codes for shelf labels and variable-weight items.
  • Learning how GTIN structure works.
  • Populating a staging catalogue before real GTINs arrive.

The internal-use range

Prefixes 02 and 20–29 are reserved by GS1 for in-store use and are never issued to a company. Barcodes in this range are used for deli counter labels, variable-weight goods and internal tracking — they are guaranteed not to collide with a real product because they are never meant to leave the store.

This tool defaults to that range precisely so the numbers it produces are safe to use internally and obviously unsuitable for retail.

The check digit maths is the same for every GTIN length. Weight digits by 3 and 1 alternately from the right, sum, then take the difference to the next multiple of ten. That single algorithm covers EAN-8, UPC-A, EAN-13 and GTIN-14 — which is why the validator here accepts all four.

Frequently Asked Questions

View all FAQs
What barcode formats can this tool generate?
It supports structurally valid UPC-A, EAN-13, EAN-8 and GTIN-14 numbers.
What is a GTIN check digit?
It is the final digit calculated from the preceding digits using the GS1 check-digit algorithm.
Does a valid check digit mean the barcode is registered?
No. It only confirms the mathematical structure. Real retail GTIN assignment comes through GS1.
Can I generate UPC numbers for Amazon or retail products?
Use GS1-assigned identifiers when a marketplace or retailer requires legitimate GTINs. Random test numbers should not be presented as assigned retail codes.
What is the difference between UPC and EAN?
UPC commonly refers to GTIN-12 encoded in UPC-A, while EAN-13 commonly carries GTIN-13.
Can I validate an existing number?
Yes. Paste the full number to verify the check digit or provide the data digits to calculate the correct final digit.
Should barcode numbers be stored as numbers in a database?
Treat them as identifier strings so leading zeros are preserved.

Barcode Number Generator – Create and Validate GTIN Test Numbers

Use the Barcode Number Generator above to create structurally valid EAN-13, UPC-A, EAN-8 and GTIN-14 numbers with correctly calculated check digits.

You can enter a GS1-issued company prefix when you are working with numbers assigned to your business, or generate restricted/internal-use test values when you only need data for software testing, fixtures or scanner workflows.

The distinction matters: a number can have a mathematically correct check digit and still not be assigned to your company.

For real retail products, obtain the appropriate GS1 identification capacity through GS1 and assign GTINs according to GS1 rules.

This tool calculates structure. It does not grant ownership of retail barcode numbers.

What Is a Barcode Number?

The visible digits under a retail barcode normally represent a standardized identifier.

For trade items, that identifier is commonly a GTIN—Global Trade Item Number.

GS1 defines several GTIN formats.

Common examples include:

  • GTIN-12
  • GTIN-13
  • GTIN-14

GTIN-12 is commonly associated with UPC.

GTIN-13 is commonly associated with EAN.

GTIN-14 is commonly used for trade-item groupings and other packaging levels where appropriate.

The number identifies the trade item.

The barcode symbol is the machine-readable graphic that carries that number.

Those are related but separate concepts.

How to Use This Barcode Number Generator

Choose the required format.

Options include:

  • UPC-A
  • EAN-13
  • EAN-8
  • GTIN-14

If you have a GS1-issued company prefix, enter the correct prefix.

Then provide the starting item reference and quantity.

For GTIN-14, select the packaging indicator where appropriate.

Generate the numbers.

The tool calculates the final check digit automatically.

You can also paste an existing barcode number into the validation section to check whether its check digit is correct.

If you do not have assigned GS1 capacity, use generated values only for testing or internal workflows where the number is not being presented as a globally assigned retail product identifier.

GTIN-12 and UPC-A

GTIN-12 is a 12-digit GS1 identification key.

In North America, it is commonly encoded using the UPC-A barcode symbol.

A typical structure contains:

  • company prefix/item reference allocation
  • check digit

The exact division between company prefix and item reference depends on the prefix assigned to the organization.

Do not assume every UPC contains the same-length company prefix.

That is why manually slicing a GTIN based only on visual digit positions can be unreliable.

The complete GTIN is the identifier.

GS1 assignment records determine who owns the prefix and trade item.

GTIN-13 and EAN-13

GTIN-13 is commonly represented with the EAN-13 barcode symbol.

GS1’s own GTIN creation guidance describes the final digit as the check digit.

The earlier digits are used to construct the trade-item identifier according to GS1 assignment rules.

EAN-13 is widely used outside North America, although GTINs are global identifiers rather than "country-specific barcode numbers."

Do not infer product country of origin solely from the first digits of an EAN.

GS1 prefix allocation is about number administration, not necessarily where the product was manufactured.

GTIN-14

GTIN-14 is a 14-digit GTIN format.

It is commonly used to identify trade-item groupings or packaging configurations.

A GTIN-14 can include an indicator digit before the underlying item reference structure.

For example, different case configurations of a product may need distinct trade-item identifiers.

Do not assume the consumer unit and shipping case always use the same GTIN.

Packaging-level identification depends on how items are ordered, priced and traded.

GS1 provides rules for when a new GTIN is required.

The generator can produce structural GTIN-14 values, but business assignment remains your responsibility.

What Is the Check Digit?

The final digit of a GTIN is a check digit.

It is calculated from the preceding digits.

The purpose is error detection.

The GS1 algorithm applies alternating weights and calculates the digit required to make the weighted total align with the modulus rule.

You do not need to perform the arithmetic manually when using the generator.

The validator can also check an existing value.

A correct check digit proves only that the number is mathematically well formed.

It does not prove:

  • GS1 ownership
  • product assignment
  • company identity
  • authenticity
  • marketplace acceptance

Those are separate questions.

How the GS1 Check Digit Works

At a high level, the GTIN check-digit calculation works from the rightmost data digit and applies alternating weights of 3 and 1.

The weighted values are summed.

The check digit is the amount needed to bring the total up to the next multiple of 10.

Example concept:

weighted sum: 67
next multiple of 10: 70
check digit: 3

GS1 provides an official check-digit calculator and manual calculation guidance.

Use the official algorithm rather than creating a custom checksum.

A marketplace may reject a GTIN immediately if the final digit does not validate.

A Valid Check Digit Does Not Mean a Valid Retail GTIN

This is the most important warning on the page.

Anyone can calculate a checksum.

That does not give them the right to assign a retail GTIN.

Suppose you generate 5012345678900 with a correct final digit.

The number may still belong to another company, be unassigned, or have a different product association.

For real retail use, obtain GTINs through GS1 and maintain product assignment records.

Use test-only generated numbers for:

  • unit tests
  • database fixtures
  • scanner demos
  • form validation
  • QA
  • barcode rendering tests

Do not list an invented test GTIN on a marketplace as though it were your assigned product identifier.

GS1 Company Prefix

A GS1 Company Prefix is licensed to an organization and forms part of GS1 identification keys.

The prefix length can vary.

A longer company prefix leaves fewer digits available for item references.

A shorter prefix provides more item-reference capacity.

This is why companies with large product catalogs may receive different prefix capacity than smaller businesses.

Do not guess your company prefix from a barcode.

Use the information provided by GS1.

The generator allows a prefix field because users with legitimate assigned capacity may need to create the corresponding item references and check digits.

Restricted Circulation Numbers

GS1 reserves certain prefix ranges for restricted-circulation purposes.

GS1 documentation identifies prefixes including 02 and 20–29 in restricted-circulation contexts.

These are useful for local, in-store or closed-system identification according to the relevant GS1 rules.

They are not globally unique retail identifiers for normal open supply-chain assignment.

That makes restricted ranges useful for certain test or internal scenarios, but do not assume every retailer or scanner will treat them as a universal product identity.

Know the scope of the number.

Internal Barcode Numbers vs Retail GTINs

A company can barcode internal data without assigning a retail GTIN.

For example, a warehouse may encode SKU-TSH-BLK-M in Code 128.

That is an internal barcode workflow.

A retail EAN-13 or UPC-A identifying a trade item in the open supply chain is different.

Use internal identifiers when:

  • only your system needs the code
  • the item is not sold through GTIN-requiring channels
  • the barcode is for warehouse operations

Use an assigned GTIN when trading partners, marketplaces or retail systems require standardized global product identification.

Validate Existing Barcode Numbers

The validation feature is useful when:

  • importing a supplier catalog
  • debugging a marketplace rejection
  • checking fixtures
  • testing scanner software
  • cleaning spreadsheet data

Paste the number.

If it has the full length, verify the check digit.

If it is missing the final digit, calculate the correct one.

A passing checksum does not prove ownership, so use GS1 verification services when you need to check company/product information associated with a GTIN.

Mathematical validation and assignment verification are separate steps.

Common Barcode Number Mistakes

Avoid these problems:

  • assuming a correct checksum means the number belongs to you
  • inventing a UPC for a real marketplace product
  • treating SKU and GTIN as the same thing
  • removing leading zeros
  • assuming EAN prefix digits prove manufacturing country
  • using a GTIN as a lot number
  • generating a new GTIN for every production batch
  • confusing barcode number and barcode image
  • ignoring packaging-level identification
  • using restricted-circulation numbers as globally assigned retail IDs

A barcode identifier has to be both structurally correct and assigned for the intended use.

Related searches

barcode number generatorean-13 generatorupc-a generatorgtin-14 generatorgs1 check digit calculatorbarcode check digit validatorupc vs eangs1 company prefixgtin test data generatorrestricted circulation number gs1barcode number validatorean-8 generator