UBL 2.1 Validator
Generic UBL validator. Accepts any UBL 2.1 document (Invoice, CreditNote, Order, DespatchAdvice…). Envelope checks only.
Paste a UBL 2.1 document (Invoice, Order, DespatchAdvice…) to validate it.
How it works
UBL (Universal Business Language) is an OASIS standard defining around 60 B2B document types under a consistent XML schema family. This validator only runs envelope checks — the structure common to all types — without diving into per-document business rules (EN 16931 invoices, OpenPEPPOL orders, etc.). Pipeline:
- XML parsing (DOMParser in browser, fast-xml-parser fallback).
- Type detection from root element name + default namespace.
- Envelope rules application (below).
Supported UBL documents
The validator auto-recognises:
- Billing: Invoice, CreditNote, DebitNote.
- Order: Order, OrderResponse, OrderResponseSimple, OrderChange, OrderCancellation.
- Logistics: DespatchAdvice, ReceiptAdvice.
- Catalogue: Catalogue, CatalogueRequest.
- Payment: RemittanceAdvice, Statement, Reminder.
- Response: ApplicationResponse.
Rules checked
- Root + namespace: the root element must belong to the
UBL 2.1 list above and its default namespace must start with
urn:oasis:names:specification:ubl:schema:xsd:. - cbc:UBLVersionID (optional): if present, value in { 2.0, 2.1, 2.2, 2.3, 2.4 }.
- cbc:ID: document identifier, mandatory, non-empty.
- cbc:IssueDate: mandatory issue date in ISO 8601
format
YYYY-MM-DD. - cbc:DocumentCurrencyCode: mandatory for monetary documents (Invoice, CreditNote, DebitNote, Statement, Reminder, RemittanceAdvice), ISO 4217 three-letter code.
- Mandatory parties: each type has its own required
cac:elements. Invoice/CreditNote/DebitNote ⇒cac:AccountingSupplierParty+cac:AccountingCustomerParty. Order ⇒cac:BuyerCustomerParty+cac:SellerSupplierParty. DespatchAdvice ⇒cac:DespatchSupplierParty+cac:DeliveryCustomerParty, etc.
Relation to PEPPOL / EN 16931
This validator is generic: it only checks conformance to the UBL 2.1 OASIS layer. To validate an invoice against the European EN 16931 norm or the PEPPOL BIS Billing 3.0 rules (BR-*, BR-CO-*, BR-S/Z/E/AE/G/IC/O-*, LegalMonetaryTotal totals, EAS code list, etc.), use instead:
- EN 16931 Validator for the European norm.
- PEPPOL Validator for BIS Billing 3.0.
The UBL validator is useful for non-invoicing documents (Order, DespatchAdvice, Catalogue) or for a quick envelope check before pushing an Invoice into a stricter pipeline.
Limits
- No full XSD validation — only the envelope rules above.
- No calculation rules (totals, VAT).
- No partner rules (OpenPEPPOL, XRechnung, Factur-X CIUS).
- No XAdES signature verification (a signed Invoice is accepted as-is).
Privacy
Related documentation
- UBL / PEPPOL — overview of the standard and its adoption.
- OASIS UBL 2.1 specification — the official reference.
- PEPPOL BIS specifications — PEPPOL profiles for invoicing, ordering, catalogue.