MyInvois XML viewer for Malaysian e-invoices
Read a MyInvois e-Invoice XML as a person would; each value tagged with its UBL path. A viewer, not a validator; nothing is uploaded.
🔒 100% client-side · zero server upload
Malaysian rules & edge cases
An e-Invoice XML is a UBL 2.1 document: a tree of elements with namespaced prefixes, so cbc:ID and cac:TaxTotal mean the same thing whatever prefix the writer chose for those namespaces. The viewer reads elements by their local name and shows each value beside the path the LHDN SDK schema writes it at. The table below is the sample invoice on this page:
| What a person reads | Where the viewer read it from |
|---|---|
Invoice number INV20261107001 | cbc:ID on the root |
| Issue date and time | cbc:IssueDate, cbc:IssueTime |
Invoice type code 01 and code list version 1.0 | cbc:InvoiceTypeCode and its @listVersionID attribute |
| Supplier name, TIN, BRN, SST, MSIC and address | cac:AccountingSupplierParty/… — every identifier is told apart by its schemeID |
| Buyer name and TIN (the buyer carries no BRN) | cac:AccountingCustomerParty/… |
Total tax 37.40, then one subtotal per tax type | cac:TaxTotal/cbc:TaxAmount and each cac:TaxSubtotal |
Payable 491.40 | cac:LegalMonetaryTotal/cbc:PayableAmount |
| Three line items, one with a 100% trade discount | each cac:InvoiceLine |
- This is a viewer, not a validator. It never says a document is valid, compliant, accepted or rejected, and it does not compute whether LHDN would accept it. The observations list is presence only —
Supplier TIN: present,Buyer BRN: not present in this file— and says nothing about whether the file should have it. - Money is shown exactly as the document states it. No float arithmetic, no recomputation; the one derived figure, the sum of the line extensions, is labelled as the viewer’s own addition.
- A missing optional element is absent, never zero. It renders as
—. An empty or unparseable input, a root that is notInvoice(aCreditNotegets its own sentence), and input over 2 MB of text are refused with their own messages. - Elements are matched by local name. A document that uses
Cbc:ID,cbc:IDor any other prefix for the same namespace reads the same way. - Regulatory questions belong to LHDN. LHDN publishes the e-invoice structure and the tax-type list on the MyInvois SDK site; the value labels here come from those lists, and this tool does not make a compliance claim about any file.
Nothing you paste leaves your browser: the page is static JavaScript with no network calls.
Before and after
Before
<?xml version="1.0" encoding="UTF-8"?>
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2.1"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:ID>INV20261107001</cbc:ID>
<cbc:IssueDate>2026-11-07</cbc:IssueDate>
<cbc:IssueTime>14:35:00</cbc:IssueTime>
<cbc:InvoiceTypeCode listVersionID="1.0">01</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>MYR</cbc:DocumentCurrencyCode>
<cbc:TaxCurrencyCode>MYR</cbc:TaxCurrencyCode>
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyIdentification>
<cbc:ID schemeID="TIN">C12345678901</cbc:ID>
</cac:PartyIdentification>
<cac:PartyIdentification>
<cbc:ID schemeID="BRN">202501123456</cbc:ID>
</cac:PartyIdentification>
<cac:PartyIdentification>
<cbc:ID schemeID="SST">B16-1234567890</cbc:ID>
</cac:PartyIdentification>
<cbc:IndustryClassificationCode schemeID="MSIC">62012</cbc:IndustryClassificationCode>
<cac:PostalAddress>
<cac:AddressLine>
<cbc:Line>12, Jalan Teknologi 3/1, Taman Sains</cbc:Line>
</cac:AddressLine>
<cbc:CityName>Cyberjaya</cbc:CityName>
<cbc:PostalZone>63000</cbc:PostalZone>
<cbc:CountrySubentityCode>10</cbc:CountrySubentityCode>
<cac:Country>
<cbc:IdentificationCode>MYS</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:Contact>
<cbc:Telephone>+603-8311 0000</cbc:Telephone>
<cbc:ElectronicMail>billing@hoelee.com</cbc:ElectronicMail>
</cac:Contact>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Hoelee Enterprise</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cac:PartyIdentification>
<cbc:ID schemeID="TIN">C87654321090</cbc:ID>
</cac:PartyIdentification>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Restoran Aisyah Sdn. Bhd.</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="MYR">37.40</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="MYR">400.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="MYR">32.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>02</cbc:ID>
<cbc:Percent>8.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">OTH</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="MYR">54.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="MYR">5.40</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>01</cbc:ID>
<cbc:Percent>10.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">OTH</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="MYR">454.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="MYR">454.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="MYR">491.40</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="MYR">0.00</cbc:AllowanceTotalAmount>
<cbc:ChargeTotalAmount currencyID="MYR">0.00</cbc:ChargeTotalAmount>
<cbc:PayableRoundingAmount currencyID="MYR">0.00</cbc:PayableRoundingAmount>
<cbc:PayableAmount currencyID="MYR">491.40</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="EA">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="MYR">400.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="MYR">32.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="MYR">400.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="MYR">32.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>02</cbc:ID>
<cbc:Percent>8.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">OTH</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:Item>
<cbc:Description>Website maintenance service — November 2026</cbc:Description>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="CLASS">030</cbc:ItemClassificationCode>
</cac:CommodityClassification>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="MYR">40.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:InvoicedQuantity unitCode="EA">6</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="MYR">54.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="MYR">5.40</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="MYR">54.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="MYR">5.40</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>01</cbc:ID>
<cbc:Percent>10.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">OTH</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:Item>
<cbc:Description>IP camera 4MP — wired</cbc:Description>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="CLASS">022</cbc:ItemClassificationCode>
</cac:CommodityClassification>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="MYR">9.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>3</cbc:ID>
<cbc:InvoicedQuantity unitCode="EA">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="MYR">0.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="MYR">0.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="MYR">0.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="MYR">0.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>06</cbc:ID>
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">OTH</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:Amount currencyID="MYR">46.00</cbc:Amount>
<cbc:AllowanceChargeReason>Trade discount — end of year</cbc:AllowanceChargeReason>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>E-commerce setup consultation</cbc:Description>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="CLASS">022</cbc:ItemClassificationCode>
</cac:CommodityClassification>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="MYR">46.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</ubl:Invoice> After
Invoice
Invoice number: INV20261107001 (cbc:ID)
Issue date: 2026-11-07 (cbc:IssueDate)
Issue time: 14:35:00 (cbc:IssueTime)
Invoice type: 01 — invoice (cbc:InvoiceTypeCode)
Code list version: 1.0 (cbc:InvoiceTypeCode/@listVersionID)
Document currency: MYR / tax currency: MYR
Supplier
Name: Hoelee Enterprise
TIN (schemeID=TIN): C12345678901
BRN (schemeID=BRN): 202501123456
SST (schemeID=SST): B16-1234567890
MSIC: 62012
Address: 12, Jalan Teknologi 3/1, Taman Sains, 63000 Cyberjaya, MYS
Telephone: +603-8311 0000 / Email: billing@hoelee.com
Buyer
Name: Restoran Aisyah Sdn. Bhd.
TIN (schemeID=TIN): C87654321090
Taxes
Total tax: 37.40 (cac:TaxTotal/cbc:TaxAmount)
Tax subtotal 1: taxable 400.00, tax 32.00, 02 — service-tax, 8.00%
Tax subtotal 2: taxable 54.00, tax 5.40, 01 — sales-tax, 10.00%
Totals
Line extension: 454.00 / tax exclusive: 454.00 / tax inclusive: 491.40
Payable: 491.40 (cac:LegalMonetaryTotal/cbc:PayableAmount)
Sum of line extensions: 454.00 (this viewer’s own addition of the line amounts in the file)
Line items
Line 1 · ID 1 · Website maintenance service — November 2026
030 · 10 EA · unit price 40.00 · line 400.00 · tax 32.00 (02 — service-tax, 8.00%)
Line 2 · ID 2 · IP camera 4MP — wired
022 · 6 EA · unit price 9.00 · line 54.00 · tax 5.40 (01 — sales-tax, 10.00%)
Line 3 · ID 3 · E-commerce setup consultation
022 · 1 EA · unit price 46.00 · discount 46.00 (Trade discount — end of year) · line 0.00 · tax 0.00 (06 — not-applicable)
What is in this file / what is not
- Supplier TIN, BRN, SST, MSIC, address, phone, email: present
- Buyer name and TIN: present; Buyer BRN, SST and NRIC: not present in this file
- Tax total: present; tax subtotals: 2 present; payable: present; line items: 3 present
- Signature element: not present How it works
- Copy the XML from your accounting system and paste it into the Input box. The explorer below shows each value with the UBL path it came from.
- Press Run. The Output box holds a readable summary — header, supplier, buyer, tax breakdown, totals and every line item — plus a presence list that says what is in the file and what is not. Show UBL paths is ticked by default; untick it to hide the paths. Copy as switches between Plain text and Markdown table.
- Copy result if you want the summary elsewhere. The file itself is not changed and nothing is uploaded; open the Network tab and you will see zero requests.
FAQ
Does this tool check whether my invoice is valid or compliant?
No. It is a viewer: it reads the file and shows what is in it. It never says a document is valid, compliant, accepted or rejected, and it does not compute whether LHDN would accept it. The “what is in this file / what is not” list is presence only, so “Buyer BRN: not present” is a fact about the file, not a judgement.
Why do I need a viewer for an XML I already have?
An e-Invoice XML is a tree of namespaced elements that a person cannot scan: the number sits in <cbc:ID>, the payable in <cac:LegalMonetaryTotal/cbc:PayableAmount>, and one tax type per subtotal. The viewer prints those in the order a reader would expect and tags each value with its path, so you can tell at a glance which field is which before you open a spreadsheet.
Which element is the TIN and which is the BRN?
Both are <cbc:ID> elements inside <cac:PartyIdentification>. They are told apart by the schemeID attribute on the ID element: schemeID="TIN" is a tax identification number, schemeID="BRN" is a business registration number, schemeID="SST" is a sales and service tax number. The viewer lists the schemeID beside each value exactly as the document states it.
Why does the tool show an em dash where a number should be?
A missing optional element is absent, not zero. The viewer never invents a 0.00 for a value the document does not carry, because a fabricated zero looks like an amount. Money is shown exactly as the document states it; the only derived figure is the sum of the line extensions, and it is labelled as the viewer’s own addition.
Is my invoice or my buyer’s TIN uploaded anywhere?
No. The viewer is static JavaScript in your browser: open the Network tab and you will see zero requests. An invoice carries a real business registration number and a real TIN, and neither leaves the machine.