IIX Lab / Guides

Stop your spreadsheet from eating leading zeros in SKUs

A SKU is an identifier, not a number. The moment a spreadsheet treats it as a number it drops the leading zeros, and the file no longer matches your warehouse.

Last verified 2026-11-01 · 3 min read

Do this, in this order

  1. Set the column to text before you paste. Format the column as text (or prefix with an apostrophe) before pasting. Setting it afterwards does not bring the zeros back.
  2. Export with everything quoted. When writing CSV, quote identifier columns so Excel cannot reinterpret them on open.
  3. Verify a known row. Pick one SKU you know starts with zeros and search the exported file for it. If it is gone, the export is wrong, not your data.
  4. Fix a file that already lost the zeros. Only possible if the original width is known (UPC is always 12, EAN-13 always 13). Otherwise re-export from the source system.

Where people get stuck. Google Sheets' “Convert text to numbers” on import happens before you see the data. Check File > Settings > Recalculate, then re-import with the column pre-formatted.

Identifier widths you can repair from length alone

IdentifierLengthRepairable after zeros are lost?
UPC-A12Yes, pad to 12
EAN-1313Yes, pad to 13
GTIN-1414Yes, pad to 14
Custom SKUvariesNo, re-export from the source

Questions we keep getting

Does CSV itself lose leading zeros?

No. The file keeps them. It is the spreadsheet application that reinterprets the column when you open the file.

Will Shopify keep my zeros?

Yes, as long as the CSV carries them. Shopify stores the SKU as text.

Related

Official references

Why spreadsheets reinterpret data: Microsoft: format numbers as text