Skip to content

Generating SKUs for Shopify Products in a Spreadsheet

How to generate consistent SKUs for hundreds of Shopify variants with spreadsheet formulas, check them for duplicates, and import them with the product CSV.

By Koa Sterling. Product specialist at TaroStack and small business owner. Yes, I am a real human, and I actually sit in front of a computer and write these articles. Reviewed October 27, 2026 · 3 min read

Shopify doesn't generate SKUs, but a spreadsheet can. Export the product CSV, add a column that builds each SKU from codes for the product and its options, check for duplicates, then paste the results into the SKU column and import. A formula such as product code, dash, option 1 code, dash, option 2 code gives every variant a readable, consistent SKU in minutes. Apps can do the same inside Shopify if you'd rather not touch a CSV.

The short version

  • Export Products > Export (the product CSV).
  • Make short codes for products and option values in a lookup table.
  • Build SKUs with a formula: =B2&"-"&C2&"-"&D2.
  • Check uniqueness with COUNTIF. Fix any duplicates.
  • Paste into the SKU column (as values), import, overwrite existing products.

Step 1: Lookup codes

Name Code
Lavender candle LAV
Coconut candle COC
8 oz 08
16 oz 16
Amber jar AMB
Frosted jar FRO

Short, fixed-length codes sort neatly. Use zero-padded sizes (08, 16) so 8 sorts before 16.

Step 2: The formula

In a helper sheet, with the product handle in column A and option values in B and C:

  • Product code: =VLOOKUP(A2, Codes!A:B, 2, FALSE)
  • Size code: =VLOOKUP(B2, Codes!A:B, 2, FALSE)
  • Jar code: =VLOOKUP(C2, Codes!A:B, 2, FALSE)
  • SKU: ="CND-"&D2&"-"&E2&"-"&F2

Result: CND-LAV-08-AMB.

Step 3: Check for duplicates

Next to the SKU column: =COUNTIF(G:G, G2). Anything above 1 is a duplicate. Duplicates break CSV matching and confuse apps that look products up by SKU.

Step 4: Import

Copy the SKU column and paste as values into the product CSV's SKU column. Format the column as text so codes like 0812 keep their zeros. Import with Overwrite products with matching handles. Check a few products afterwards.

Keeping SKUs consistent later

  • Keep the lookup table. New scents and sizes get codes from the same sheet, so the pattern holds.
  • Never reuse a retired code. If Coconut is discontinued, COC stays retired; old orders still point to it.
  • Write the pattern down in one line at the top of the sheet: product, size, jar.
  • Add SKUs when you create products, not months later, so CSVs and purchase orders match from day one.

A made-up example

Mākena Candle Co. has 22 scents in 3 sizes and 2 jars: 132 variants, none with SKUs. With a 30-row lookup table and four formulas, every variant gets a SKU in 15 minutes. One duplicate appears: two scents both coded COC (coconut and cocoa). Cocoa becomes CCA, and the import goes through. Shopify SKU numbers covers choosing a pattern.

Where this stops working

A generator names what you sell. Makers also need codes for materials (wax, wicks, fragrance, jars) and a lot code for each batch, and neither belongs in Shopify's product CSV. A SKU also can't tell two pours of the same scent apart. Shopify lot numbers and Shopify SKU vs barcode cover the other codes.

How TaroStack does it

TaroStack for Shopify runs inside your Shopify admin and keeps your Shopify SKUs matched to your products, adds codes for the materials behind them, and gives every batch its own lot code, printed on GS1-128 labels if you want them. Free for 14 days.

Questions people also ask

Can Shopify generate SKUs automatically?

No. Use a spreadsheet formula with the product CSV, or an app.

What's a good SKU format for Shopify?

Product code, then option codes, joined by dashes: short, readable, fixed length.

How do I bulk add SKUs in Shopify?

Through the product CSV's SKU column, or the bulk editor for smaller sets.

Do I need a SKU for every variant?

For anything you stock, yes. Purchase orders, CSV imports and counts all match on it, and a variant without a SKU is the one that gets missed.

Should the SKU include the price or supplier?

No. Prices and suppliers change; a SKU should stay the same for the life of the variant.

Can I change SKUs after products have sold?

Yes, but reports and apps that match by SKU may split old and new. Change them once, early.

Sources

  1. Shopify Help Center: Using CSV files to import and export products · read October 27, 2026
  2. Shopify Help Center: Adjusting inventory quantities in bulk · read October 27, 2026
  3. Shopify Help Center: Adding variants · read October 27, 2026

We use AI to help with the research for these articles. Every one is read, checked against its sources and edited by Koa before it's published. Spot a mistake? Tell us and we'll fix it and say so. How we write these.

Let’s get your stack in order.

TaroStack for Shopify

Free for 14 days.