Skip to content

CDS declaration XML validator

Paste an import declaration in DEC-DMS XML. It's checked against HMRC's CDS schemas and the UK Trade Tariff, and each problem is named by its data element.

Your declaration isn't saved or logged.

Results

Nothing checked yet

Paste a declaration and select Validate. Each problem shows up here with its data element and line number.

CDS checks EORIs, authorisations and duty when you send. Check the EORIs first.

What the validator checks

Checked

  • Structure against HMRC Customs Declarations API 1.0 (DEC-DMS)
  • Required elements, lengths and code formats
  • Limits from HMRC's Completion Instructions that the schemas don't enforce: an LRN of up to 22 characters (DE 2/5), net mass no higher than gross mass (DE 6/1, 6/5), commodity and TARIC code formats (DE 6/14, 6/15), and the format of GB and XI EORI numbers
  • That each commodity code (DE 6/14 with DE 6/15) exists and is declarable in the UK Trade Tariff

To check that EORI numbers exist, use the bulk EORI checker.

About the validator

Does a pass mean HMRC will accept it?
No. It means the XML matches HMRC's schemas and the limits listed above, and each commodity code exists and is declarable in the UK Trade Tariff. It doesn't check that a code is right for the goods. CDS still checks parties, authorisations and duty when you send it.
Which schema version do you use?
HMRC Customs Declarations API 1.0 (DEC-DMS), downloaded from HMRC's Developer Hub on 25 October 2026 and last checked 12 November 2026. HMRC publishes them under the Open Government Licence v3.0; three of the files also carry UN/CEFACT notices.
Which declarations are the extra checks written for?
Full import declarations. The extra checks on top of HMRC's schemas are written for them.
Do you keep my declaration?
No. It's checked in memory, then dropped, and it isn't logged. Commodity codes are looked up in the UK Trade Tariff, and the tariff's answers are held in memory for up to 24 hours.
Got a rejection already?
Look the code up in CDS error codes to see which field to fix.