Open a SAF-T (PT) file as tables
SAF-T (PT) is the audit file that certified invoicing and accounting software in Portugal exports for the tax authority (Autoridade Tributária). Accountants ask for it, auditors receive it, and anyone checking a client's sales ends up with a single XML file of several megabytes holding a dozen different tables. Here is how to read it as tables rather than a tree.
Free to use. The file is parsed in your browser and never uploaded. Windows version — 4.9 MB, no installation: details. Pro — $29 once: price.
What is inside
The root is AuditFile with the namespace urn:OECD:StandardAuditFile-Tax:PT_1.04_01. Under it:
Header— the company, tax number, fiscal year and period, and the file type (TaxAccountingBasis: F for invoicing, C for accounting, I for both);MasterFiles— customers, suppliers, products, the tax table and, in accounting files, the chart of accounts;GeneralLedgerEntries— journals, transactions and their debit and credit lines;SourceDocuments— sales invoices with their lines and totals, and other documents.
The tables you get
The file is recognised by its namespace and opens like a database with several tables; only the sections present in the file are listed:
| Table | One row per |
|---|---|
| Invoices | invoice: InvoiceNo, ATCUD, date, type (FT, FS, FR, NC…), status, customer, number of lines, NetTotal, TaxPayable, GrossTotal |
| Invoice lines | line, with the invoice number, date, type and customer next to it: product, quantity, unit price, amount, VAT rate |
| Customers, Suppliers, Products and services, Taxes, Chart of accounts | record of that master file, with the field names of the schema |
| Journal entries | debit or credit line in document order: transaction, date, period, account, DebitAmount, CreditAmount |
Invoices open first. Switch tables in File parsing, or open all of them as tabs at once.
Typical checks
- Sales per month or per customer: a pivot over Invoices by period and
CustomerID(pivot table without Excel). - Cancelled documents: filter
InvoiceStatus= A. - Credit notes: filter
InvoiceType= NC. - VAT by rate: group Invoice lines by the tax percentage column.
- Journal balance: the totals of
DebitAmountandCreditAmountin Journal entries must be equal.
Limits
Template tables are read-only: a SAF-T file is signed document by document (Hash), and it should be corrected in the software that produced it. Template → Plain XML in File parsing gives the ordinary XML view of any element. Files of a few hundred megabytes are read as a stream (large XML files).
Other countries' SAF-T variants (Norway, Lithuania, Poland's JPK, Romania) use different namespaces and are not recognised by this template: they open as plain XML, where you choose the repeating element yourself.
FAQ
Does it validate the file against the AT schema?
Not automatically. For a structural check, use XSD with the official schema file; the template itself does not validate.
Can I export the tables to Excel?
Yes: each table exports to Excel or CSV on its own.
Is the file uploaded?
No. A SAF-T file holds every customer and invoice of the company; it is parsed in your browser and stays on your computer.
Free to use. Your file is not uploaded to a server. Windows version — 4.9 MB, no installation: details. Pro — $29 once: price.