← Hashito System Home 日本語 Tools Blog
Settings
Output

Why every JAN starts with 2

The JAN codes here (13 digits, the same structure as EAN-13) always begin with 20-29. GS1 reserves that range for company-internal use and never assigns it to a business, so a number generated here cannot collide with a real product.

Codes starting 45 or 49 belong to companies that GS1 Japan actually assigned them to. Inventing "test" codes in that range means you can end up storing another company's real product number in your own catalog, which surfaces later during POS or e-commerce validation.

How the check digit is computed

The 13th digit is derived from the first 12. Counting from the left, odd positions are weighted 1 and even positions 3; the digit is whatever brings that sum up to the next multiple of 10. This tool runs that calculation for every row, so the codes pass barcode readers and validators.

To check by hand: the correct digit for 490177701868 is 6, giving 4901777018686. The check digit calculator gives the same answer.

Columns

ColumnContents
skuProduct code: 2 category letters, 4 digits, 1 letter. Unique within one generation
nameFictional brand, item and size
categoryBeverage, Snack, Household, Stationery or Appliance
jan13 digits, 20-29 prefix, check digit computed
price / tax_rate / price_incl_taxPre-tax price, rate and gross price. 0.08 for beverages and snacks, 0.10 otherwise
stockUnits on hand, 0-499
released_onRelease date. Never in the future

Why the seed matters

With the same seed you get the same rows in the same order every time. That is what makes it possible to write expected values into a test, or to reproduce a bug. Change one character of the seed and the whole set changes.

Everything is generated in your browser with JavaScript; nothing is sent to a server. Brand and product names are fictional and do not refer to any real company or product.

Frequently asked questions

Can I put a generated JAN code on a real product?

No. The 20-29 range is reserved for use inside a single company or store and is not meant for goods that enter distribution. A product you actually sell needs a code issued under a company prefix from your GS1 member organisation. This output is for testing only.

If I keep the seed and change the count, do the first rows stay the same?

Yes. Generation runs from the top, so with the same seed the 10 rows you get from a count of 10 are identical to the first 10 rows of a count of 100. Increasing the count does not shift the existing rows.

Can I run the SQL output directly?

Yes, if your products table has the columns sku, name, category, jan, price, tax_rate, price_incl_tax, stock and released_on. Single quotes inside strings are escaped by doubling. For different column names, replace the header part of the INSERT statements.

Do product names contain real manufacturers?

No. Brands are limited to words such as Sample, Test and Dummy that make the data obviously fictional, and the item names are ordinary nouns.