Build a test product catalog with SKUs, JAN codes, prices, stock and release dates
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.
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.
| Column | Contents |
|---|---|
sku | Product code: 2 category letters, 4 digits, 1 letter. Unique within one generation |
name | Fictional brand, item and size |
category | Beverage, Snack, Household, Stationery or Appliance |
jan | 13 digits, 20-29 prefix, check digit computed |
price / tax_rate / price_incl_tax | Pre-tax price, rate and gross price. 0.08 for beverages and snacks, 0.10 otherwise |
stock | Units on hand, 0-499 |
released_on | Release date. Never in the future |
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.
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.
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.
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.
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.