Skip to content
LHDN compliance

What is UBL 2.1? MyInvois format

5 min read

Key takeaways

  • UBL 2.1 (Universal Business Language) is an international XML standard for business documents — invoices, credit notes, and more.
  • LHDN MyInvois uses UBL 2.1 as the format for Malaysian e-Invoices, so every submission is structured XML, not a PDF.
  • The XML carries the buyer and supplier details, line items, amounts, tax, and the LHDN-required fields in a defined structure the system can validate automatically.
  • You don't write UBL by hand — accounting software or an e-Invoice tool generates it from a normal invoice. What matters is that the fields are correct.

If you've read anything about LHDN e-Invoicing, you've probably seen the term “UBL 2.1” and wondered whether it's something you need to learn. The short answer: it's the file format MyInvois uses, software generates it for you, and this guide explains what it is and why it matters.

What UBL 2.1 actually is

UBL stands for Universal Business Language — an open, international standard (maintained by OASIS) for representing business documents as structured XML. Version 2.1 is the one Malaysia adopted. Instead of a human-readable page, a UBL document is data: clearly labelled fields for the supplier, the buyer, each line item, the tax, and the totals, arranged in a defined structure.

Why LHDN uses it

Structured data is what lets LHDN validate an e-Invoice automatically and in near real time. Because every field is in a known place, MyInvois can check that the required information is present and correctly formatted, then accept or reject the document with a specific reason. A PDF can't be checked that way — UBL 2.1 can. It's also an international standard, which keeps Malaysia's system interoperable rather than proprietary.

What's inside the XML

  • Supplier and buyer identification (including tax identification details).
  • Invoice metadata — document type, number, dates, currency.
  • Line items — description, quantity, unit price, and per-line tax.
  • Tax and totals — SST where applicable, and the document totals.
  • The LHDN-specific fields the guideline requires for validation.

You don't write this by hand

Nobody keys XML tags manually. Accounting software or an e-Invoice tool takes a normal invoice — the buyer, the items, the amounts — and generates the UBL 2.1 for you. Your job is to get the business details right; the software handles the format.

UBL 2.1 across the document types

The same UBL 2.1 structure underlies every MyInvois document — invoice, credit note, debit note, and refund note, plus their self-billed variants. The document type changes which fields apply, but the format is consistent, which is part of why a single tool can handle all of them.

This is general information, not tax advice

Field requirements and formats are defined by LHDN and can change. For the authoritative specification, refer to the e-Invoice guidelines and technical documentation on hasil.gov.my.

What is UBL 2.1 in e-Invoicing?

UBL 2.1 (Universal Business Language) is an international XML standard for business documents. Malaysia's LHDN MyInvois uses it as the format for e-Invoices, so each submission is structured XML rather than a PDF.

Do I need to understand XML to issue an e-Invoice?

No. Accounting software or an e-Invoice tool generates the UBL 2.1 XML from a normal invoice. You work in plain business terms; the software produces the format MyInvois requires.

Why does LHDN use UBL 2.1 instead of PDF?

Structured data lets LHDN validate an e-Invoice automatically and in near real time, checking each field and returning a specific accept/reject reason. A PDF is an image and can't be validated that way.

Let the software handle the UBL

MyInvois Bridge turns a plain invoice into validated UBL 2.1, submits it to LHDN, and shows you the accepted or rejected reason clearly. 14-day free trial, no credit card.