Excel removed the leading zero from my barcodes in a Shopify CSV. How do I fix it?

Updated 2026-10-21. Checked against Shopify's own documentation; links are under Sources.

When Excel or Google Sheets opens a CSV, it treats a barcode column as numbers. That drops leading zeros, so a 12-digit UPC becomes 11 digits, and long numbers can turn into scientific notation such as 3.6E+11. Lost zeros can be put back, and our validator tells you which 11-digit values become valid when they are. Scientific notation can't be undone, so those values have to be typed in again. To stop it happening, open the file with the barcode column set to Text.

Why it happens

A CSV file is plain text and doesn't record that a column is text. When you double-click it, the spreadsheet guesses, and 036000291452 looks like a number, so it's stored as 36000291452. Very long values can also be shown as 3.6E+11. If you then save, the damaged values replace the originals in the file. Importing that file into Shopify overwrites the good barcodes on your products.

A UPC-A (GTIN-12) always has 12 digits, and many of them start with 0. Google Merchant Center accepts only GTINs of 8, 12, 13 or 14 digits with a correct check digit, so an 11-digit barcode shows up as "Invalid GTIN".

Open a Shopify CSV without damage

Excel (Windows and Mac, Microsoft 365)

  1. Open a blank workbook. Don't double-click the CSV.
  2. Go to Data › From Text/CSV and choose the exported file.
  3. In the preview, click Transform Data. Select the Variant Barcodes column (in older exports, Variant Barcode or Barcode) and set its type to Text. Do the same for SKU if any SKUs start with zeros.
  4. Click Close & Load, make your edits, and save as CSV UTF-8.

Older Excel versions have the same option in the Text Import Wizard (Data › Get External Data › From Text). Choose Text as the column data format at the last step.

Google Sheets

  1. Use File › Import › Upload and clear the option to convert text to numbers, dates and formulas.
  2. If you paste values in by hand, first select the column and choose Format › Number › Plain text.
  3. Download it again with File › Download › Comma-separated values.

Or don't use a spreadsheet at all

To check barcodes without editing them, you don't need to open the file. The product CSV checker and the duplicate finder read the raw text in your browser, so the values aren't changed.

Repair barcodes that are already damaged

  1. Export your products again from Products › Export. If the damaged file was already imported, the bad values are now in Shopify and the new export shows them.
  2. Copy the barcode column and paste it into the GTIN validator.
  3. 11 digits: the validator tests the value with a 0 added in front. If that makes a valid UPC-A, the zero was almost certainly dropped by a spreadsheet, and the 12-digit form is the fix.
  4. Other lengths: a barcode can lose more than one zero. Add zeros in front until it is 12 or 13 digits and check it again; a valid result is a strong hint, not proof. For anything uncertain, compare with the barcode printed on the product or your supplier's file.
  5. Scientific notation (3.6E+11): the original digits were rounded away and can't be recovered from this file. Take them from the packaging, the supplier's list, or an older export made before the damage.
  6. Put the corrected values into the CSV with the column set to Text, then import it from Products › Import with the option to overwrite existing products turned on.

Check that it worked

A note on the CSV format

Shopify's current product CSV uses Variant Barcodes, and a single cell can hold more than one barcode with its type, for example ean:4006381333931; upc:036000291452. Shopify's help notes that an older file with a singular Barcode column is updated to Barcodes on your next export, and that "A file that has both columns fails to import". When you merge old and new files, keep only one of the two columns.

Sources