SKU generator
Build stock codes from variant attributes and check duplicate or missing values before exporting. Your entries stay in this browser.
Your stock codes
Variant preview
Variant codes
3
Records with warnings
0
3 variant codes generated. No warnings.
Generated SKUs
| Record | Generated SKU | Warnings |
|---|---|---|
| 2 | TEE-BLK-S | None |
| 3 | TEE-BLK-M | None |
| 4 | TEE-NVY-S | None |
Warnings stay in the CSV. Resolve them before assigning these codes in your catalogue.
Build a pattern your team can read
A SKU is your store’s internal stock code. Use attributes that distinguish one variant from another and keep their order consistent across the range. A product family code identifies the style, while colour and size separate its variants.
For the sample tee range, the pattern is family-colour-size. Tee becomes TEE and Black becomes BLK, so the small black tee becomes TEE-BLK-S. Keep changeable prices out of the pattern so a price update leaves the stock code intact.
Column names ignore letter case and surrounding spaces. Abbreviations match values the same way. Generated codes use uppercase and replace internal whitespace with underscores. Original CSV cells stay unchanged.
The generator preserves punctuation and Unicode characters, so choose abbreviations that fit the systems receiving the codes. Save the pattern with your catalogue procedures before generating the next range.
Generated codes use uppercase, trim surrounding spaces and replace internal whitespace with underscores.
Generate a variant range
The starting example generates TEE-BLK-S, TEE-BLK-M and TEE-NVY-S, in that order. Each code keeps the family prefix while the differing colour or size distinguishes the variant.
To see a collision, change the Navy abbreviation from NVY to BLK. The first and third variants now both generate TEE-BLK-S. Both receive a duplicate warning. Enter TEE-BLK-M in the existing SKU list and the second variant also warns that its code already exists.
Missing selected attributes receive warnings beside their original record numbers. The generator keeps every record and never adds a suffix to hide a duplicate. Resolve conflicting abbreviations or add a distinguishing attribute to the pattern, then review the preview again.
Each CSV or existing-code input accepts up to 100,000 characters. Record 1 is the header, and a quoted value spanning several lines counts as one record. Quoted commas and doubled quotation marks follow the CSV conventions in RFC 4180.
The export keeps original column values and record order, then appends source_record, generated_sku and sku_warnings. An existing result column name gains an underscore. Any supplied sku column is preserved and the proposal goes in a separate column.
The CSV download includes warnings even when conflicts remain. Review the proposals before importing them into your catalogue. Import identifier columns as text in spreadsheets to retain leading zeros and prevent formula interpretation.
Keep skus separate from gtins
A SKU follows your store’s own naming scheme. A Global Trade Item Number (GTIN) identifies a trade item across businesses under the GS1 system. Different retailers can use different internal SKUs for a product that has the same GTIN.
GS1 explains the difference between GTINs and SKUs. Generating a stock code here does not allocate a GS1 identifier or create a barcode image. Keep your internal SKU and the product’s GTIN in separate catalogue fields.
Read the guide to GTINs for the meaning and use of global product identifiers.
Use generated SKUs in Excel and Shopify
In Excel, join your attribute abbreviations into a SKU and check the completed column for duplicates before exporting. Format attribute columns as Text before entering values so codes such as 001 keep their leading zeros.
For the tee example, put family, colour and size abbreviations in columns A to C, with headers in row 1. Enter TEE, BLK and S in row 2. In D2, enter this formula, then fill it down through the variant rows.
=TEXTJOIN("-",FALSE,A2:C2)The result is TEE-BLK-S. Microsoft’s TEXTJOIN instructions explain the separator and empty-cell setting. FALSE keeps empty positions visible, so reject any row with a missing abbreviation before export.
For this pattern of letters, numbers and hyphens, put this duplicate check in E2 and fill it down. Change row 1001 to your last data row.
=COUNTIF($D$2:$D$1001,D2)>1TRUE marks a repeated code, including its first occurrence. Microsoft’s COUNTIF guidance explains matching and wildcard characters. Resolve duplicates, then copy the finished SKU column and paste it as values before saving your reviewed sheet as CSV. This browser tool accepts CSV text, not an Excel workbook.
For Shopify, start with your store’s product CSV export. Match each generated_sku to its product and variant, then copy the reviewed code into that variant’s SKU column. Keep the product handles, titles and variant option columns intact.
Shopify’s product CSV instructions explain the required columns and variant dependencies. Review the import preview before applying updates. The generator’s download adds review columns and is not a ready-made Shopify import file.
You can also edit a variant’s SKU under Inventory in Shopify. These are internal stock codes. Barcode fields hold separate identifiers, and a barcode symbol needs a separate label-generation step.