ECF XML Validator
A developer tool for validating Dominican Republic e-CF invoice XML against official DGII XSD schemas. It highlights every issue in context — breaking errors, math discrepancies, conditional warnings, informational notes and advisory hints — with human-readable messages instead of the vague feedback DGII gives you. Validation runs in your browser — the XML itself is never uploaded.
DGII tells you something is wrong. That's usually all it tells you.
Nine times out of ten, the most you get from DGII is a field name and a generic error code — no indication of what the correct value should be, no hint at why your structure is wrong, no explanation of which conditional rule you violated. During the certification process you get slightly more context, but it's still limited and cryptic.
Developers end up debugging invoices blind: resubmitting, getting the same error, changing one field at a time, burning limited government-issued NCF sequences in the process.
"Campo RNCComprador invalido."
RNCComprador is required for all E-31 invoices. Your buyer must have a valid RNC (or cedula). The field cannot be omitted even if the buyer name is present.
What it looks like
A simplified demo of the real interface. Click any issue to jump to its line — and back. Try it with your own XML ↗
Six states, immediately readable
DGII will reject — missing required fields, invalid RNC, wrong field names, schema violations.
Recalculated line totals, ITBIS or MontoTotal don't match the declared amounts.
Invoice passes as Aceptado Condicional — phone too long, address over character limit.
Not an error — signature absent, unusual date gap, or a deprecated field in use.
Doesn't affect validity — context worth knowing, like hints from the emitter's registered business activity. Shown in its own lane.
No issues found — the entire XML highlights in green.
What it checks.
Everything below is live today.
- Official DGII XSD validation for all 10 e-CF types, the RFCE summary, and the ARECF / ACECF / ANECF response documents
- Element order checked against the schema sequence; required and forbidden fields per document type
- Document type detected automatically, and packed XML is beautified before display
- RNC and cédula check digits, plus a live DGII registry lookup (active status, electronic-invoicer registration)
- eNCF prefix ↔ TipoeCF consistency
- Province and municipality codes checked against DGII tables
- Per-line arithmetic (quantity × price) and header totals recalculated
- ITBIS rates, additional taxes (ISC) and MontoTotal compared with the declared amounts
- Export totals for E-46 and foreign-currency (OtraMoneda) conversions and cross-rates
- 60+ DGII business rules: required-if fields and sections forbidden by invoice type
- GMT-4 date handling, with a hint when a future FechaHoraFirma points to a UTC mix-up
- Structural digital-signature check (well-formed, non-empty), without claiming cryptographic validity
- Advisory hints based on the emitter’s registered economic activity
- Click any issue to jump to its line, and back
- Filter by severity, with a built-in legend
- Copy the issue list or export it as JSON, sorted by severity
- Cryptographic signature verification — not just structure
- Batch mode for validating many XMLs at once
Free to use. Free to read.
The validator is a Next.js app written in TypeScript. Rules are organized by category — format, math, conditional fields, sequences, registry — and a Vitest suite runs valid and deliberately broken XML fixtures against the engine.
The source is available under the PolyForm Noncommercial 1.0.0 license: free to read, study, and modify for noncommercial use. The hosted tool is free for everyone, including businesses.