"Harmonized code is invalid"
This one is different from a missing code. The field has something in it. The carrier looked at it and refused it.
What makes a code valid
Two rules, and almost every rejection is one of them:
- At least six digits. A four-digit heading is a category, not a classification. Carriers reject it.
- Numbers only. No periods, no spaces, no dashes, no letters, no stray characters.
If the digits themselves are the question rather than the formatting, start with what an HS code is — what each digit means and how many you actually need.
Where the bad characters come from
Nobody types a period into an HS code on purpose. It arrives one of these ways:
- Copied from a tariff schedule. Official schedules print codes with periods, like
6109.10.0012. Pasted straight in, that's invalid. It needs to be6109100012, or just the first six digits. - Copied from a spreadsheet. Excel and Sheets strip leading zeros and turn long numbers into scientific notation. A code starting with zero comes out short, and a long one comes out as something like
6.1091E+09. - Placeholder text. Someone filled the column with
N/A,TBD, or a run of dots to get past a required field. - A trailing space. Invisible, and enough to fail.
The version of this you don't see
An invalid code throws an error, which is annoying but at least it's loud.
A blank code can be quieter. Depending on the shipping tool, a label can still print with an automatically generated placeholder in the customs field rather than a real classification. The label buys, the package ships, and the problem surfaces at the border instead of at your desk. That's the expensive version.
Fixing one
- From your Shopify admin, go to Products.
- Click the product.
- In the Shipping section, confirm Physical product is on.
- Clear the Harmonized System (HS) code field completely and retype the digits. Don't edit around the bad characters — a trailing space survives that.
Finding all of them
One bad code means there are probably more, because they nearly always arrive the same way: one import, one copy-paste session, one spreadsheet. The codes that came in with periods came in with periods everywhere.
Shopify's bulk editor will let you fix them once you know which ones they are — from the product list, check the products, click Bulk edit, click Columns, and under Shipping tick Harmonized system code. What it won't do is find them. There's no filter for "HS code is malformed," so the search is either opening products one at a time or exporting and reading a column by eye.
Frequently asked questions
How many digits does an HS code need?
Six at minimum. That's the internationally standardized part of the Harmonized System. Countries extend it for their own tariff schedules, so a US import code runs to ten digits, but six is what clears a validity check.
Can an HS code contain a period?
Not in Shopify's field. Official tariff schedules print codes with periods for readability, like 6109.10.0012, but the field wants digits only: 6109100012.
Why did a code that worked before stop working?
Usually the value changed rather than the rule. A re-import, a bulk edit, or a spreadsheet round-trip can reformat the field, most often by stripping a leading zero or converting a long number to scientific notation.
Does a wrong-but-valid code cause problems?
It passes the format check and prints a label, and the problem moves downstream. The code sets the duty rate and, on some international labels, drives the description of contents that gets printed. Wrong code means wrong duty and a description that doesn't match what's in the box.
Related: "HS codes and country of origin are required" · What is an HS code? · Adding HS codes in bulk · Shopify customs information
Last reviewed 27 July 2026.
Find every product that's missing customs data.
Origova scans your whole catalog and lists exactly what's missing. The scan is free and unlimited — you see your number before you decide anything.
Install on Shopify