SKU Generator: Readable Codes for Every Variant
Give the product a short base code, list its attributes such as colour and size with a code for each option, and choose a separator. The generator writes one SKU for every combination, adds an optional sequence number, flags any duplicates and lets you download the list as a CSV to import into your store or spreadsheet.
| Code | Who makes it | Format | Used for |
|---|---|---|---|
| SKU | You, the seller | Any letters and digits you choose | Your own stock tracking and reports |
| GTIN-12 (UPC) | Licensed through GS1 | 12 digits | Scanning at checkout, mainly North America |
| GTIN-13 (EAN) | Licensed through GS1 | 13 digits | Scanning at checkout, mainly outside North America |
| GTIN-8 | Licensed through GS1 | 8 digits | Small items at checkout |
| GTIN-14 | Licensed through GS1 | 14 digits, never starts with 0 | Cases and other groupings of a product |
Updated
A SKU (stock keeping unit) is your own name for one exact sellable thing: the medium blue shirt, not just the shirt. Because you invent it, it can carry meaning, so anyone in the stockroom can read TEE-BLU-M and know what to pick. The trick is a consistent pattern, which is what this tool enforces.
Build your SKUs
Base code (product line): TEE
Separator: -
Colour: Blue=BLU, Sage=SAG, Black=BLK
Size: Small=S, Medium=M, Large=L
Add a sequence number
9 SKUs
| SKU | Colour | Size |
|---|---|---|
| TEE-BLU-S | Blue | Small |
| TEE-BLU-M | Blue | Medium |
| TEE-BLU-L | Blue | Large |
| TEE-SAG-S | Sage | Small |
| TEE-SAG-M | Sage | Medium |
| TEE-SAG-L | Sage | Large |
| TEE-BLK-S | Black | Small |
| TEE-BLK-M | Black | Medium |
| TEE-BLK-L | Black | Large |
Built in your browser; nothing is uploaded.
Generate SKUs in your own script
The same rule in a few lines of JavaScript, for when you import products from a spreadsheet or a supplier file.
Every combination of attribute codes
flatMap builds the combinations one attribute at a time. Run it in your browser console to see the list.
const base = "TEE";
const attrs = [["BLU", "SAG", "BLK"], ["S", "M", "L"]];
const skus = attrs.reduce(
(combos, codes) => combos.flatMap((c) => codes.map((code) => [...c, code])),
[[base]],
).map((parts) => parts.join("-"));
console.log(skus); // ["TEE-BLU-S", "TEE-BLU-M", ... 9 SKUs]
A pattern that scales
Decide the parts once and write them down: product line, then each attribute in a fixed order, then an optional number. TEE-BLU-M, TEE-BLU-L and MUG-SAG-12 all follow the same rule, so a new product never needs a meeting.
Fixed-length codes per attribute (three letters for colour, one or two for size) keep SKUs lined up in a list, which makes mistakes easier to spot.
When you also need barcodes
If you sell through other retailers or marketplaces that ask for a UPC or EAN, you need GTINs licensed through GS1 for each variant. Keep a column in your sheet that maps each SKU to its GTIN, then print barcodes from the GTIN, not the SKU.
For your own shelves and bins, you can print a barcode that encodes the SKU itself, because that code is only ever read inside your business.
How it works
- Type a base code for the product, for example TEE for a t-shirt line.
- For each attribute, enter its options one per line as Name=CODE, such as Blue=BLU. Without a code, the first letters of the name are used.
- Pick the separator and decide whether to add a sequence number and how many digits it should have.
- Check the table: every combination gets a SKU, and duplicates are highlighted.
- Press Download CSV or Copy list to move the SKUs into your store or spreadsheet.
Tips
- Start with the most general part (product line) and end with the most specific (size), so SKUs sort into sensible groups.
- Avoid the letters O and I next to digits; they are easy to confuse with 0 and 1 on a label.
- Never reuse a SKU for a different product, even after the old one is discontinued. Old orders and reports still point to it.
- Keep SKUs short enough to read off a shelf label, roughly 8 to 12 characters.
- Do not put the price or the supplier's name in a SKU; both change, and the SKU should not.
Frequently asked questions
What is the difference between a SKU and a UPC?
A SKU is an internal code you create for your own inventory, and two shops can give the same item different SKUs. A UPC is a GTIN-12, a 12-digit number licensed through GS1 that identifies the product the same way everywhere. GS1 US sells single GTINs from $30 with no renewal fee, as of October 2026.
Can I use my SKU as a GTIN in Google Merchant Center?
No. Google's gtin attribute takes real GTINs such as UPC, EAN, JAN, ISBN or ITF-14, and its help page says to only provide a GTIN if you are sure it is correct. Put your SKU in the product's own SKU or ID field instead.
Does Shopify need a SKU?
Shopify calls SKUs an optional code that identifies the product within your business and says each SKU needs to be unique for effective tracking. Barcodes are a separate field.
Are the SKUs saved anywhere?
No. They are built in this browser tab. Download the CSV or copy the list before you close the page.
Will the CSV open in Excel or Google Sheets?
Yes. Fields that contain a comma or a double quote are wrapped in double quotes, with inner quotes doubled, following RFC 4180, and lines end with CRLF.
Related: Barcode generator, Product label maker, Packing slip generator, Shopify pricing guide.
Start a 7-day free trial or see all free tools. On We.Inc you get a 7-day free trial, not a free plan: card needed, $0 today, cancel before it ends and you pay nothing. AI building is on paid plans from $20 a month.
More in Free Tools
- Free Slogan Generator, with Example Slogans by Trade
- Social Media Audit Template
- Social Media Content Calendar
- Social Media Image Sizes 2026: Every Post Size
- Social Media Post Templates
- Email Spam Word Checker
- SQL Formatter
- Srcset Generator
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App