How to find duplicate barcodes in your Shopify catalog
Shopify doesn’t enforce unique barcodes. You can give fifty variants the same value and it will save all fifty without a word.
That’s fine right up until someone scans one.
What a duplicate actually breaks
A barcode is a lookup key. When two variants share one, every system that scans it has to pick — and it picks arbitrarily.
- At the till, the wrong product rings up. Usually the wrong price.
- In stock counts, units get decremented from whichever variant was matched, so both variants’ numbers drift away from reality.
- In fulfilment, pickers grab the blue one when the order was for the red one.
The insidious part is that it looks like a different problem. You investigate mysterious stock discrepancies for weeks before someone thinks to scan two items and notices they read the same.
How duplicates get in
Almost always one of these:
CSV imports. Someone exports products, edits in a spreadsheet, and copies a barcode down a column — autofill happily repeats the same value across every row it touches.
Supplier feeds. Two suppliers use the same manufacturer GTIN for what you list as separate products, or a feed reuses an internal SKU as a barcode.
Variant duplication. You duplicate a product to make a similar one and forget to change the barcode. The duplicate inherits everything, barcode included.
Naive bulk tools. A tool regenerates barcodes from a counter that restarts, or doesn’t check new values against the catalogue before writing them.
Finding them
There’s no duplicate report in Shopify admin, so you either export and check in a spreadsheet, or use a tool that scans for you.
The spreadsheet route:
- Products → Export → All products → CSV.
- Open it and find the
Variant Barcodecolumn. - Sort by that column so identical values sit next to each other.
- Use conditional formatting (Highlight cells → Duplicate values) to mark
repeats, or add a helper column with
=COUNTIF(range, cell) > 1. - Ignore the blanks — empty barcodes aren’t duplicates, they’re just unassigned,
and
COUNTIFwill flag every one of them if you let it.
That last point catches people out: on a catalogue where most variants have no barcode, a naive duplicate check reports thousands of “duplicates” that are all empty strings.
Re-run this after any bulk import, which is when duplicates arrive.
Fixing them safely
Once you’ve found a collision, resist the urge to just regenerate both.
Work out which one is “right” first. If one of the two products has labels already printed and on shelves, that one keeps the number. Change the other.
Then check what’s physically out there. If both have printed labels in circulation, you need to reprint for whichever one you reassign — otherwise you’ve swapped one wrong scan for another.
Assign the new value from outside your existing range, so you don’t collide with something else while fixing a collision. If your numbers run to 000500, the replacement should be 000501 and up, not a gap you think is free.
Then reprint and replace the physical labels before the next stock count.
Preventing them
- Check every new barcode against the entire catalogue before writing it, not just against the batch being generated.
- Never overwrite a barcode that already exists.
- Use a prefix for internal numbers so they can’t collide with manufacturer GTINs from a supplier feed.
- Re-check after every CSV import.
Doing this with LabelForge
LabelForge has a duplicate finder that scans your whole catalogue and lists any barcode assigned to more than one variant, so you’re not maintaining a spreadsheet for this. It ignores empty barcodes, so you get real collisions rather than a list of unassigned variants.
Prevention is built into assignment, too: every new barcode is checked against your entire catalogue before it’s written, and existing barcodes are never overwritten.