Skip to content

Free tool · Generator

Shopify SKU generator for every variant, with an import-ready CSV

Build a SKU pattern from brand, category, product and option codes, generate one SKU per variant, catch duplicates and spreadsheet traps, and download a CSV with Shopify's current column names. It runs in your browser.

Free, no signup Built by Billy Reiner Updated

1 · Products

Input

Separate values with commas.

2 · Pattern

Segments, in order

One per line, value = code. Works for product titles and option values, and always wins over the automatic code.

3 · SKUs

Variants12
Duplicates0
Other warnings0
Longest12
#ProductOptionsSKUChecks
1Linen ShirtS / BlackNR-LSH-S-BLAOK
2Linen ShirtS / BlueNR-LSH-S-BLUOK
3Linen ShirtS / BrownNR-LSH-S-BROOK
4Linen ShirtS / WhiteNR-LSH-S-WHIOK
5Linen ShirtM / BlackNR-LSH-M-BLAOK
6Linen ShirtM / BlueNR-LSH-M-BLUOK
7Linen ShirtM / BrownNR-LSH-M-BROOK
8Linen ShirtM / WhiteNR-LSH-M-WHIOK
9Linen ShirtL / BlackNR-LSH-L-BLAOK
10Linen ShirtL / BlueNR-LSH-L-BLUOK
11Linen ShirtL / BrownNR-LSH-L-BROOK
12Linen ShirtL / WhiteNR-LSH-L-WHIOK

The update file needs a pasted Shopify export, so it can match your existing products by URL handle.

What a SKU is, and what it isn't

A SKU (stock keeping unit) is your own code for one sellable item. On Shopify it sits on the variant, so a shirt in three sizes and four colours has twelve SKUs. It's optional: Shopify says "SKUs aren't required", and lists better inventory tracking, accurate reporting, easier fulfillment and third-party integrations as the reasons to use them1.

A barcode is a different field. It holds a number other systems recognise: Shopify accepts GTIN (8, 12, 13 or 14 digits), UPC, EAN, ISBN, ASIN or a custom value up to 255 characters, and up to 20 barcodes per product or variant2. You make SKUs up. GTINs you get from GS1 or your supplier, and Google Shopping and marketplaces match products on them. The GTIN glossary entry explains the identifier, and the barcode field guide covers which one each product needs. Don't put a SKU in the barcode field or a GTIN in the SKU field.

Shopify's SKU rules

Shopify's SKU page sets out four rules1. First, every SKU should be unique: "SKUs within your Shopify admin must be unique and no two product variants should include the same SKU." Shopify doesn't block a duplicate. It shows a warning on the variant and notes that duplicates cause trouble with integrations and inventory tracking.

Second, keep them short: "no more than 16 characters", and as few as 4 to 8 for a small catalog. The generator warns above 16 by default. Third, avoid a format where 0 and 1 can be confused with O and I. Tick "Leave out the letters O and I" and automatic codes drop them, so Olive becomes LVE and Ivory becomes VRY. Fourth, skip special characters, symbols and spaces, which Shopify says "can cause search problems". Dashes and underscores are fine for separating attributes. The generator offers those two, or no separator at all.

A good SKU structure

Go from general to specific: brand, then product, then the options that make each variant different. Anyone reading NR-LSH-S-BLA on a bin label can tell it's the small black linen shirt without looking anything up. With brand code NR, the product "Linen Shirt" and three sizes by four colours, the default pattern gives:

SizeColorSKU
SBlackNR-LSH-S-BLA
SBlueNR-LSH-S-BLU
SBrownNR-LSH-S-BRO
LWhiteNR-LSH-L-WHI

The product code comes from the title's initials, topped up from the last word (Linen Shirt → LSH). Option codes are the first three letters of each value. If you'd rather number products than abbreviate them, turn on the sequence segment and turn off the product code: the same shirt becomes NR-001-S-BLA, and the next product in the list gets 002. "Per product" gives every variant of a product the same number; "per variant" counts every row.

Abbreviations collide. With two-letter codes, Black and Blue both start BL. The generator keeps the first one and moves the next to other letters of the same word, in order: Black = BL, Blue = BU, Brown = BR. Every change is listed under the results so nothing moves silently. Codes you set yourself in the abbreviations box are never changed; if two of yours clash, the tool tells you.

Things to leave out of a SKU: the price (it changes), the supplier's code (keep that in a separate field or metafield), and anything you'd be tempted to change later. A SKU that changes breaks every app, 3PL and spreadsheet that stored the old one.

Why SKUs matter on Shopify

A store can run without SKUs. They start to matter the moment anything outside Shopify gets involved: warehouse and 3PL systems, inventory and ERP tools, marketplace connectors and accounting exports often match products on SKU. Shopify's own note is that "many apps and services require SKUs to sync inventory"1. Reports and exports are also easier to read with a code that means something. The time to set a scheme is before the first integration, because changing SKUs later means updating every system that stored them.

Common SKU mistakes

The most common one is a code that a spreadsheet rewrites. Excel drops leading zeros, so 00123 becomes 123, and it keeps only 15 significant digits, so a 16-digit numeric SKU loses its last digit8. A code like 1E5 reads as scientific notation and becomes 100000, and 3-12 turns into a date. The checks flag all four. Starting every SKU with a letter avoids the lot.

  • Reusing a retired SKU for a new product. Sales history and reports then mix the two.
  • Spaces and punctuation inside the code, which Shopify warns cause search problems.
  • Two formats in one catalog: half as SHIRT-BLK-S, half as BLK-SHIRT-SMALL. Sorting and picking get harder. Pick one pattern and generate every SKU from it.

How to bulk-update SKUs in Shopify

Shopify documents two ways: "you can use the bulk editor or import them using a CSV file"1. For a few dozen variants, the bulk editor is quicker: select the products, choose Bulk edit, and add the SKU column from Columns if it isn't showing. Each variant gets its own row6. For a whole catalog, use a CSV:

  1. Export your products from the Products page. Keep this file as your backup.
  2. Choose "Paste rows or a Shopify export" above and paste the file's contents or open it. The generator reads the URL handle, Title and Option columns. Tick "Keep SKUs that are already filled in" if you only want to fill the gaps.
  3. Set the pattern, fix anything the checks flag, and download "Shopify CSV: update SKUs".
  4. Import it from the Products page and select "Overwrite products with matching handles". Try one product first.

The update file holds only Title, URL handle, the Option name and value columns, and SKU. That's deliberate. Shopify's overwrite rules are strict: a column you leave out keeps its current values, but a column you include with a blank cell is overwritten as blank3. Shopify also warns that sending SKU without the Option1 columns deletes the variant option5, and that changing an Option value "deletes existing variant IDs, and creates new variant IDs"3, which breaks apps that stored those IDs. So the generator writes your option values back exactly as they came in. Keep every variant of a product in the file, and don't edit option values in the same import.

File rules from Shopify: UTF-8 with LF line endings3, no larger than 15 MB (split bigger catalogs), and don't sort the export in a spreadsheet editor before re-importing, which can separate products from their images5. The generator writes UTF-8 with LF line endings. If you open the file to check it, Shopify recommends Google Sheets3; Excel will rewrite the codes described above when it saves.

The CSV the generator writes

Column names follow Shopify's current product template, which renamed the older columns: "URL handle" instead of Handle, "Option1 name" and "Option1 value", and plain "SKU" instead of Variant SKU4. The generator also reads exports that still use the old names. For new products, the file adds a Status column set to draft on every row. Shopify publishes products as active when the column is missing, and a present Status column needs a value3, so drafts give you time to add prices and photos before anything goes live. The first rows of the linen shirt example:

Title,URL handle,Option1 name,Option1 value,Option2 name,Option2 value,SKU,Status
Linen Shirt,linen-shirt,Size,S,Color,Black,NR-LSH-S-BLA,draft
,linen-shirt,Size,S,Color,Blue,NR-LSH-S-BLU,draft

The product title goes on the first row of each product only, and the URL handle repeats on every variant row, the layout Shopify describes for products with variants3. Shopify allows up to three options and 2,048 variants per product, though it notes some themes, apps and channels stop at 1007. The generator warns when one product goes over 2,048.

FAQ

Is a SKU required on Shopify?

No. Shopify says SKUs aren't required. You need them once apps, a warehouse or a marketplace have to match your products, and they make inventory and reports easier to read.

What's the difference between a SKU and a barcode?

A SKU is your own code, made up to suit your business. A barcode (GTIN, UPC, EAN, ISBN) is a standard number recognised outside your store. Shopify has separate fields for each, and a variant can have both.

How long should a SKU be?

Shopify suggests no more than 16 characters, and 4 to 8 can be enough for a small catalog. The generator warns above 16; change the limit if a supplier or marketplace needs something else.

Can two variants share a SKU?

Shopify says they shouldn't: SKUs must be unique. It shows a warning on duplicates rather than blocking them. The generator flags duplicates in red; add a segment or change an abbreviation to separate them.

Dash, underscore or nothing?

Shopify calls dashes and underscores useful for separating attributes. Dashes are easier to read aloud and on labels. With no separator, codes are shorter but harder to read, and two different combinations can run together into the same string.

Will the update CSV change anything besides SKUs?

It only contains Title, URL handle, the option columns and SKU, and under Shopify's overwrite rules columns that aren't in the file are left as they are. Title and option values are written back exactly as they came from your export. Test with one product first and keep your export as a backup.

Is my product data uploaded?

No. Parsing, generation and the CSV files all happen in your browser. Nothing is sent anywhere.