SKU generator
A SKU generator builds a stock keeping unit code from a brand prefix, the attributes that separate one variant from another, and a zero-padded sequence number. Build one code or a whole catalog of them, and paste a product list to number the lot in one pass. Copy the codes or take the CSV.
Verified August 21, 2026
Your SKUs
1 SKU
Generated SKUs
| # | Product | Attributes | SKU | Length |
|---|---|---|---|---|
| 1 | Acme | Hat, Red | ACME-HAT-RED-001 | 16 |
Green is sixteen characters or fewer, which is what Shopify's own guidance asks for. Amber is longer. No platform rejects it, but it prints smaller on a warehouse label.
How to generate a SKU number
A SKU is a code you assign, not one you apply for. Shopify puts it plainly: SKUs are codes that you can use internally to track your inventory and report on your sales. That means the only real requirements are that you can read it, your team can read it, and no two variants share one. The rest is a pattern you pick once and then stop thinking about.
- 1. Pick a prefix you will still recognize in two years. Brand initials or a category, up to six characters. It is the part that tells you at a glance whose shelf a box belongs on.
- 2. Add the attributes that separate one variant from another. Color, size, material, whichever actually vary. Put them in a fixed order and keep that order for every product, because a scheme where color is sometimes second and sometimes third is not a scheme.
- 3. End with a padded sequence number. Width three gives you 001 through 999 and keeps the list sorting in order. Unpadded, most tools sort 1, 10, 2.
- 4. Choose one separator and never change it. A dash is the safest. Shopify asks you not to use special characters, symbols, or spaces as they can cause search problems, so a dash or an underscore is as decorative as it should get.
- 5. Check the result against the codes you already use. Paste your current list into the box above. A collision your fulfillment provider finds first ships the wrong box.
ACME
Brand prefix
HAT
Attribute
RED
Attribute
001
Padded sequence
Joined by your separator: ACME-HAT-RED-001, sixteen characters.
The generator above is those five steps with the typing removed, and bulk mode runs them down a pasted list so a hundred new variants get numbered in one pass.
SKU format rules that travel
A stock keeping unit has to travel. It goes into your store, out to whatever marketplaces you sell on, into your fulfillment provider's system, and through a spreadsheet at least once a quarter. The rules below are the ones the platforms themselves publish, so they hold wherever the code lands.
- No spaces, no symbols. Shopify's guidance is not to use special characters, symbols, or spaces as they can cause search problems. Letters, digits and one separator.
- Keep it short. Shopify asks you to keep your SKUs as short as possible, such as no more than 16 characters. It is guidance, not a limit anything enforces, and it is a reasonable target: sixteen characters fits a label and a search box.
- Unique inside your store. Shopify states that SKUs within your Shopify admin must be unique and that no two product variants should include the same SKU in their details, and that duplicate SKUs can cause issues with third-party integrations and inventory tracking.
- Assume case matters. Shopify's Admin API describes the variant SKU as a case-sensitive identifier for the product variant in the shop. Pick uppercase, stay uppercase, and the question never comes up.
- Keep 0 and O apart. Shopify asks you to avoid a format where the numbers 0 and 1 can be confused with the letters O and I. Identifier design has been solving this the same way for decades: Douglas Crockford's Base32 alphabet excludes I and L because each can be confused with 1, excludes O because it can be confused with 0, and excludes U to avoid accidental obscenity.
- Put a letter in it. A spreadsheet treats an all-digit SKU as a number. The next section is what it does to one.
Your store
A marketplace
Your 3PL
The spreadsheet
One string, four places it has to arrive intact.
How to create SKU codes in Excel
If your catalog already lives in a spreadsheet, you can build the same pattern there. This is the recipe we use, written for a sheet where the prefix sits in A1, the product name in B, the color in C, and the first product row is row 2.
- 1. Put the prefix and the attributes in their own cells. The prefix in A1, the product name in column B, the color in column C. One attribute per column, in the order you want them read.
- 2. Put the formula below in the SKU column. It joins those cells and adds the padded counter on the end.
- 3. Fill it down the column. Every row numbers itself from the row it sits on.
- 4. Paste the result as values into a column formatted as Text. Format the column first, then paste, or the spreadsheet rewrites the codes.
=TEXTJOIN("-",TRUE,$A$1,B2,C2,TEXT(ROW()-1,"000"))
ACME-HAT-RED-001
TEXTJOIN puts the dash between every piece and the TRUE skips any cell you left empty, so a product with no color does not come out with a doubled dash. TEXT(ROW()-1,"000") is the padded counter: ROW() returns the row you are standing on, the minus one turns row 2 into 1, and the "000" pattern pads it to three digits. On older Excel builds without TEXTJOIN, CONCAT with literal dashes gets you there with more typing.
Now the part that bites. Copy that column, paste it back as values, and the spreadsheet may quietly rewrite what you made. Microsoft documents three behaviors: Excel automatically removes leading zeros, it converts large numbers to scientific notation, like 1.23E+15, and because Excel has a maximum precision of 15 significant digits, any numbers past the 15th digit are rounded down to zero. Your 0012 becomes 12. Your sixteen-digit code becomes 1.23E+15 on screen, and digits past the 15th round to zero.
What you pasted
- 0012
- 00450
- 1234567890123456
What the cell holds after
- 12
- 450
- 1.23E+15
All-digit codes are the ones at risk. A letter anywhere in the string keeps the cell text.
Two defenses. Format the column as Text before anything is pasted into it, which is the documented fix for keeping leading zeros. And keep a letter in every SKU, which the prefix above already does: a string with a letter in it is not a number, so none of the three behaviors can fire. That is the practical reason this generator puts letters at the front rather than handing you an all-digit code.
Taking the result back into Shopify is a CSV import. Shopify's CSV documentation describes the SKU field as the stock keeping unit of a variant, used to track inventory, adding that the SKU column can't be blank if you use a custom fulfillment service. Shopify also asks that you save your CSV file in UTF-8 format using LF-style linefeeds. The Download CSV button above writes exactly that, with every field quoted, so you can open it, check it and import it without a round trip through a spreadsheet at all.
SKU vs UPC vs ASIN
Three codes get used interchangeably in conversation and they are not interchangeable at all. One you invent, one you buy, one a marketplace assigns you.
The SKU is yours. Shopify calls SKUs codes that you can use internally, and adds that SKUs are different from barcodes and are used for different purposes. The same help page draws the line at the hardware: if you're using a barcode scanner, then it typically reads the barcode field, not the SKU. So a SKU is the code your team reads and a barcode is the code a machine reads, and they live in different fields for that reason.
The UPC you print is a barcode, and the family it belongs to is the GTIN. GS1 US defines it directly: GTIN stands for Global Trade Item Number, a GS1 identification key used to identify a trade item, and it is a globally unique number used to identify your specific product or service. Globally unique is the whole difference. Your SKU is unique inside your business; a GTIN is unique everywhere, which is why you get one from GS1 rather than making it up.
You do not invent the ASIN. Alongside it Amazon carries a seller SKU, which its Selling Partner API describes as a selling partner-provided identifier for an Amazon listing. The SKU you send Amazon is still the one you invented, so the scheme you build here is the one you keep across every channel you sell on.
Practical version. Invent the SKU today, for free, and use it everywhere. Buy a GTIN when a retailer or a marketplace listing requires one. Take the ASIN as given. If you are budgeting the other identifiers a brand pays for, the trademark cost calculator prices a US filing against the current USPTO fee schedule.
Where a SKU scheme stops helping
A consistent SKU scheme makes your catalog easier to run. It counts stock correctly, it makes returns match orders, and it stops two variants from sharing one history. It does not stop anyone from taking your product photographs and putting them on a listing of their own. Nothing about your internal codes is visible to the person doing it, and nothing about them slows it down.
Where the codes do earn their keep is afterwards. When a copied listing turns up and you have to show who owns the product, the variant SKUs are part of how you point at your own records: this listing, this variant, these codes, this catalog. Tidy codes make that paperwork short.
Finding the copies is a different job. Knockoff watches your catalog's photos across the marketplaces and the open web and builds the takedown you approve for each confirmed match. If you are working out what protecting a store you run yourself involves, start there. And when a copy takes a click your ads paid for, the spend does not move and the revenue does, which the ROAS calculator turns into a number.
The cheap first check is finding out whether anyone is already running listings with your product photos on them. Run a free scan to see which listings are using your product photos today.
Common questions about SKUs
What is a SKU? +
A stock keeping unit is a code you assign to one product variant so you can track stock and read sales by variant. Shopify describes SKUs as codes you use internally to track your inventory and report on your sales, and internally is the operative word: nobody outside your business has to recognize it.
Do SKUs have to be unique? +
Inside one store, yes. Shopify states that SKUs within your Shopify admin must be unique and that no two product variants should include the same SKU, and that duplicate SKUs can cause issues with third-party integrations and inventory tracking. Paste your current list into the duplicate box above and every collision gets flagged.
Does Shopify require a SKU? +
Not for every product. Shopify's product CSV documentation says the SKU column can't be blank if you use a custom fulfillment service, which is the one case where the field is mandatory. Anything you plan to count, pick or ship is easier with one.
How long should a SKU be? +
Shopify's written guidance is to keep your SKUs as short as possible, such as no more than 16 characters. That is guidance rather than a rule any platform enforces, so treat 16 as a target. The length badge in the generator above flags anything longer.
Can I reuse a SKU after discontinuing a product? +
It is common practice not to. Old orders, returns and reports keep pointing at the code, so a reused SKU mixes two products in one history. Retire the code and let the sequence counter move on.
Sources
- Shopify Help Center, SKUs, for what a SKU is, the 16-character guidance, the special-character and ambiguous-character warnings, the uniqueness rule and the barcode distinction: help.shopify.com SKUs
- Shopify Admin GraphQL API, ProductVariant, for the SKU as a case-sensitive identifier: shopify.dev ProductVariant
- Shopify Help Center, using CSV files, for the SKU column, the custom fulfillment service rule and the UTF-8 with LF-style linefeeds requirement: help.shopify.com product CSV
- Microsoft Support, keep leading zeros and large numbers, for the stripped zeros, the 1.23E+15 scientific notation and the 15-significant-digit precision limit: support.microsoft.com leading zeros
- Douglas Crockford, Base32, for the exclusion of I, L, O and U from an identifier alphabet: crockford.com base32
- GS1 US, what is a GTIN, for the Global Trade Item Number definition and its global uniqueness: gs1us.org GTIN
- Amazon Selling Partner API, Listings Items model, for the seller SKU as a selling partner-provided identifier: github.com selling-partner-api-models
Every quoted rule on this page was read at its source on August 21, 2026. The Excel recipe is ours and belongs to nobody. Shopify's 16 characters is written guidance, not a limit any platform enforces.