About the SKU Generator
This SKU generator builds a stock-keeping unit code for every combination of your product attributes. Enter a brand or store prefix, a product category, and lists of variant values such as colors and sizes; the tool abbreviates each value, joins the parts with your chosen separator and can append a running sequence number, producing a ready-to-paste list of SKUs.
It is meant for e-commerce sellers setting up Shopify, Amazon or WooCommerce catalogs, retailers building a spreadsheet of variants, and warehouses that need human-readable location-independent product codes. Because every code follows the same pattern, staff can tell what an item is from its SKU, and the list sorts sensibly by category, then color, then size.
A SKU is your own internal code — it is not the same as a UPC, EAN or GTIN barcode number, which must be licensed from GS1. The tool flags any duplicate codes created when two values abbreviate to the same letters (for example Blue and Blueberry), so you can change the abbreviation length or style before using them.
How to use the sku generator
- 1Enter a short brand prefix and the product category or style name.
- 2List the first set of variant values, such as colors, separated by commas.
- 3Optionally list a second set, such as sizes.
- 4Choose abbreviation length, style, separator and whether to add sequence numbers.
- 5Copy the SKU list, and fix any duplicates the tool reports.
Formula and method
Each part is uppercased and stripped of spaces, accents and punctuation. Text values are shortened to the chosen length: “first letters” keeps the first N characters (Navy Blue → NAV), while “first letter + consonants” keeps the first letter and then drops vowels (Black → BLC), falling back to the first N letters when there are not enough consonants (Blue → BLU). Purely numeric values such as size 10 or 32 are kept whole.
The generator creates one SKU for every combination of variant 1 × variant 2, in the order you list them, and optionally appends a sequence number padded with zeros. The prefix is used exactly as typed (cleaned), so keep it short. Duplicates are counted so you can fix collisions before importing.
- abbr()
- Abbreviation to N characters using the chosen style
- sep
- Separator character (hyphen, underscore, period or none)
Worked examples
T-shirt in 3 colors and 4 sizes
Three colors × four sizes gives 12 SKUs. “T-Shirt” becomes TSH, Black becomes BLA and sizes stay as typed, so the first code is MD-TSH-BLA-S-001 and the last is MD-TSH-NAV-XL-012.
Consonant style, colors only, no sequence
In consonant style Black becomes BLC and Brown becomes BRW. Blue and Mug have only two consonants each, so they fall back to their first three letters, BLU and MUG. With no sizes and no sequence, each code is just ACME, the category and the color.
Spotting a collision
Blue and Blueberry both abbreviate to BLU, so the tool reports one duplicate. Raising the length to 5 (BLUE vs BLUEB) or turning on sequence numbers makes every code unique.
Frequently asked questions
What is a SKU number?+
A SKU (stock-keeping unit) is an internal code a business assigns to each distinct product variant it stocks, such as a black medium T-shirt. It helps track inventory, pick orders and report sales. Each variant needs its own unique SKU.
How do I create a SKU?+
Pick a consistent pattern that starts with the broadest attribute and ends with the most specific, such as brand–category–color–size. Use short uppercase abbreviations, avoid confusing characters like O and 0, and never reuse a code for a different product.
Is a SKU the same as a UPC or barcode?+
No. A SKU is created by you and is unique only within your business. UPC, EAN and GTIN numbers are global identifiers licensed from GS1 and are required by many marketplaces and retailers. A product can have both.
How long should a SKU be?+
There is no standard length, but common practice is to keep SKUs short — roughly 8 to 12 characters — and avoid going much past 20. Short codes are faster to type and scan, fit on labels and reduce data-entry errors.
Should SKUs start with zero or include spaces?+
Avoid both. Spreadsheets often strip leading zeros, and spaces cause import and lookup problems. Start with a letter and use hyphens or no separator between parts.