How to find missing or duplicate barcodes in Shopify
Missing and duplicate barcodes cause the same problem at the counter: the scan finds nothing, or it rings up the wrong variant. Shopify doesn't have a built-in "missing barcodes" report, but you can find both problems in about 15 minutes with the bulk editor or a CSV export and a few spreadsheet formulas. This guide walks through both methods, then shows the app way for stores that restock often.
Before you start: what counts as a problem
- Missing: a variant with an empty Barcodes field. Each variant (each size and color) needs its own code. A barcode on only one variant isn't enough.
- Duplicate: two different variants with the same barcode. This usually comes from duplicated products, copied rows in a CSV, or one supplier code used for every size.
- Invalid: a UPC or EAN whose check digit is wrong, often because of a typo. Scanners reject it. We'll catch these too.
Since September 2026, a Shopify variant can hold up to 20 barcodes. Labels, channel feeds and apps use the first one, so that's the one to check.
Method 1: The bulk editor (small catalogs)
This works well up to a few hundred variants.
- In your Shopify admin, go to Products.
- Select products using the checkbox at the top of the list. To include every product, click the option to select all products in your store when it appears.
- Click Bulk edit.
- Click Columns and select Barcodes. Add SKU too, because it helps you tell variants apart.
- Scroll down the Barcodes column and look for empty cells. Click a cell to type or scan a code in, then click Save.
The bulk editor is fine for spotting missing codes, but you can't easily spot duplicates by eye. For those, use the export method. Shopify also recommends a CSV for large volumes of edits, and suggests Chrome, Firefox or Safari over Microsoft Edge for the bulk editor.
Method 2: CSV export and spreadsheet formulas
Step 1: Export your products
- Go to Products and click Export.
- Choose All products.
- Choose CSV file for Excel, Numbers, or another spreadsheet program.
- Click Export products. A full export is emailed to you. Only current-page or selected-product exports download directly.
Very large catalogs can time out. If you see "There was an error exporting your products", filter the list, for example by vendor or collection, and export in parts.
Step 2: Open it without losing leading zeros
This step matters. Excel turns 036000291452 into 36000291452 and can show 13-digit EANs as 4.00638E+12. Both break barcodes, and they also hide or create false duplicates.
- Google Sheets: File > Import > Upload, then untick Convert text to numbers, dates, and formulas.
- Excel: Data > From Text/CSV, click Transform Data, and set the barcode and SKU columns to Text before loading.
Don't double-click the CSV to open it in Excel. That's what triggers the conversion.
Step 3: Set up a check sheet
Each variant is one row. Rows with only an image URL are extra rows for product images, so ignore them. Copy these columns to a new tab in this order:
| Column | Copy from the export |
|---|---|
| A | URL handle |
| B | Title |
| C | Option1 value (every real variant has one; single-variant products say "Default Title") |
| D | SKU |
| E | Barcodes |
Older exports used different headers: Handle, Option1 Value, Variant SKU and Variant Barcode. Use whichever your file has. Leave row 1 for headers and put the formulas below in row 2, then fill them down.
Step 4: Pull out the first barcode (column F)
The Barcodes column can hold several codes separated by semicolons, sometimes with a type in front, like upc:012345678905; INTERNAL-123. This formula keeps just the first code:
Google Sheets:
=IFERROR(TRIM(REGEXEXTRACT(E2&"","^(?:[A-Za-z-]+:)?\s*([^;]+)")),"")
Excel 365:
=TRIM(TEXTAFTER(TEXTBEFORE(E2&";",";"),":",,,,TEXTBEFORE(E2&";",";")))
If your file has one plain code per variant, =TRIM(E2) is enough.
Step 5: Flag missing barcodes (column G)
=IF(AND(C2<>"",F2=""),"MISSING","")
The check on column C skips image-only rows, which have no option value.
Step 6: Flag duplicates with COUNTIF (column H)
=IF(AND(F2<>"",COUNTIF(F:F,F2)>1),"DUPLICATE","")
COUNTIF counts how many times the code appears in the whole column. More than once means at least two variants share it.
Excel caveat: COUNTIF treats text that looks like a number as a number. Codes that differ only by leading zeros, or codes longer than 15 digits, can be counted as matches when they aren't. For an exact text match, use this instead:
=IF(AND(F2<>"",SUMPRODUCT(--(F$2:F$5000=F2))>1),"DUPLICATE","")
Raise 5000 if you have more rows.
Step 7: Catch bad check digits (column I)
This formula checks any all-digit code of 8, 12, 13 or 14 digits using the GS1 check digit rule, and leaves other codes (like Code 128 SKUs) blank:
=IF(OR(F2="",ISERROR(MATCH(LEN(F2),{8,12,13,14},0)),ISERROR(--F2)),"",IF(MOD(10-MOD(SUMPRODUCT(MID(F2,ROW(INDIRECT("1:"&(LEN(F2)-1))),1)*(1+2*MOD(LEN(F2)-ROW(INDIRECT("1:"&(LEN(F2)-1))),2))),10),10)=--RIGHT(F2,1),"OK","BAD CHECK DIGIT"))
Want to know how the math works? See check digits explained.
Step 8: Review and fix
- Turn on filters and filter columns G, H and I to show only flagged rows. Sort by column F so duplicates sit together.
- For each duplicate, decide which variant really owns the code. Give the other variant its manufacturer's GTIN, a new GS1 GTIN, or an internal code.
- Fix a handful in the bulk editor (Method 1). For hundreds, edit the original export and import it under Products > Import with Overwrite products with matching handles selected.
Import safety: with overwrite on, a blank cell clears the existing value. Including SKU or barcode data without the Option name and value columns can delete variant options. Keep the URL handle and Option columns in the file, and save a backup export before you import. Shopify imports can't be canceled once they start.
Then reprint labels for every variant whose code changed. Our free barcode label generator prints Code 128 or EAN-13/UPC-A on Avery 5160 sheets or 2.25" x 1.25" thermal labels.
Method 3: A barcode report app
The spreadsheet method works, but you have to redo it after every new product or import. Oak Glen Barcode Labels (our app) runs the same checks inside Shopify:
- A barcode report showing variants with a missing barcode, an invalid check digit, or a barcode shared with another variant.
- One-click fixes for those variants. The Free plan includes 50 fixes a month, and Pro is unlimited.
- Label printing from the same app: pick products or a collection, set quantities per variant or match stock, and print to Avery sheets, A4, DYMO, Zebra or custom roll sizes.
Find and fix missing, invalid and duplicate barcodes without a spreadsheet. Oak Glen Barcode Labels is free for 300 labels and 50 barcode fixes a month. Pro is $6.99/month for unlimited, with a 7-day free trial.
Try Barcode Labels freeKeep barcodes clean going forward
- Add the barcode when you create the variant, not later. Scanning it with the Shopify mobile app avoids typos.
- After duplicating a product, check its variants' barcodes before saving.
- Set the barcode type (UPC, EAN, GTIN) for real GTINs, so Shopify validates the format as you type.
- Re-run your check after every bulk import.
Related: How to print barcode labels for Shopify products.
FAQ
Does Shopify stop two variants from having the same barcode?
Shopify blocks the same value twice on a single product or variant, and it recommends a unique barcode for every variant. Its documentation doesn't describe a check across different products, so duplicates from copied products or CSV imports can slip in. That's why a periodic check is worth doing.
Why did Excel remove the leading zero from my UPC codes?
Excel treats long digit strings as numbers, so 036000291452 becomes 36000291452, and 13-digit codes may show as 4.00638E+12. Import the CSV with the barcode column set to Text (Data > From Text/CSV), or use Google Sheets with "Convert text to numbers" turned off.
Can I search the Shopify admin for products without a barcode?
The products bulk editor with the Barcodes column added is the quickest way to spot blanks in the admin. For large catalogs, an export plus a spreadsheet formula or a barcode report app is faster and catches duplicates too.
What should I do with a duplicate barcode?
Decide which variant the code really belongs to. For a GTIN, that's the item it was licensed for. Give the other variant its own code: its manufacturer's GTIN, a new GS1 GTIN, or an internal Code 128 value. Then reprint the labels for the variant that changed.
Is it safe to fix barcodes by re-importing a CSV?
It works, but be careful. With "Overwrite products with matching handles", blank cells clear existing values, and leaving out option columns while including SKU or barcode data can delete variant options. Back up first, and include URL handle and the Option columns in the file.