SAF‑T (PT) validator. Errors, IVA and corrections in the browser.
Upload the invoicing SAF‑T file: the validator shows the summary, the errors the AT rejects and the IVA by rate and region. Correct what the software exported wrongly, NIFs, exemptions, references and period, and download the corrected file.
Free and with no sign-up. For accountants, the self-employed and companies.
No sign‑up · The file stays on your computer
How the validator works
Choose the file
The invoicing SAF‑T (PT) the software exports, as XML or ZIP. The browser reads it on your computer; nothing is sent.
See the errors, the documents and the IVA
Each rule explains what the AT rejects and where the norm is. The summary shows the documents by type and month, the IVA by rate and region, the customers and the products.
Correct and download
Correct in the document itself what the software exported wrongly: the customer of a document and its data, the exemption code of a 0 % line, the reference of a credit note, the period, the ATCUD. The amounts of an issued document do not change: they are corrected with a credit note and a new document. The corrected file keeps everything else byte for byte, with the log of the changes.
What the validator checks
The rules of the data structure of Portaria 302/2016 and of the XSD 1.04_01 schema, the AT's SAF‑T (PT) FAQ, the ATCUD of Portaria 195/2020, the table of exemption reason codes and the IVA rates of the mainland, the Azores and Madeira.
- Structure and encoding
- Well-formed XML, structure 1.04_01, empty fields, unknown elements, declared and actual encoding, BOM.
- Header
- NIF and CompanyID, fiscal year and period, creation date, currency, software and certificate, address.
- Customers
- NIF check digit, final consumer with 999999990, ISO country, postal codes, «Desconhecido» addresses, customers without documents.
- Products and taxes
- Repeated codes, types, a tax table consistent with each region's legal rates, unused entries.
- Documents
- Number and series, ATCUD, signature, dates and period, gapless numbering, existing customer and products, rates and exemption codes from the AT table, credit note references, line amounts and totals.
- File totals
- Number of documents, debit and credit totals without the cancelled documents, receipts, working and transport documents, accounting entries.
From SAF‑T to e‑Fatura without rejections
The invoicing file is submitted on the e‑Fatura portal by the 5th of the following month. The portal checks the structure and the content on upload: a wrong NIF, a missing exemption code or a total that does not add up is enough for a rejection. Check the file first, correct in the validator what the software left wrong and submit it right the first time.
FIZ for accountantsWhoever invoices in FIZ needs no file
FIZ communicates each invoice to the AT when it is issued and, if the account holder turns this on, emails the month’s SAF‑T (PT) to the accountant. The validator is for files from other programs.
Certified invoicingChoose a plan for your business
Frequently asked questions about the SAF‑T validator
Is the file sent to FIZ?
It never leaves your computer. The browser reads the file, checks it, calculates the summaries and writes the corrected file, all locally. FIZ receives neither the file nor the data it holds; it only counts, anonymously, that the validator was used.
Which SAF‑T (PT) version is checked?
Structure 1.04_01 of Portaria 302/2016, the only one the AT has accepted since July 2017. On top of the structure, the validator applies the rules the AT published later: the ATCUD of Portaria 195/2020, the table of exemption reason codes in force and the IVA rates of each region.
Why does ATCUD «0» show as an error?
Since 1 January 2023 every document carries the ATCUD: the validation code the AT assigns to the series, a hyphen and the document number. The text of Portaria 302/2016, which said to fill in «0» until regulation, is outdated. Documents before 2023 with «0» raise no error.
Which exemption codes are accepted?
Those of the AT table «Códigos de Motivo de Isenção», version 4.0 of 18 June 2026: M01 to M99, with the dates each code came into or went out of force. M26 for the food basket only applies to documents up to 4 January 2024; M35 for housing construction contracts applies to documents from 1 July 2026. On a 0 % line, the reason (TaxExemptionReason) and the code (TaxExemptionCode) are both mandatory.
Can I correct a signed document without invalidating the signature?
Yes, in the fields outside the signature. The signature of a certified program covers the document date, the recording date, the number, the total with IVA and the previous signature. The validator changes neither those fields nor the amounts of the documents: the rate of a line is only corrected when the document’s IVA was already computed at the right rate and only the rate field was exported wrong. The amounts of an issued document are corrected with a credit note and a new document.
What to correct when the AT rejects the file for an invalid NIF?
The customer's NIF in the customer table: the validator checks the check digit and accepts the correction in the document panel. Without a known NIF, the generic customer carries 999999990 and the name «Consumidor final». NIF 999999999 is rejected. Correct the customer in the invoicing software too, so the next files come out right.
Does it work for the accounting SAF‑T?
For the summary and the check of the entries: the validator reads an accounting file (TaxAccountingBasis «C»), shows the totals and flags the entries whose debits and credits do not balance. Editing applies to invoicing documents.
What is the maximum file size?
250 MB, as XML or inside a ZIP. A monthly invoicing file is usually a few megabytes; yearly retail files with hundreds of thousands of documents can take a few seconds to read.
By when is the invoicing SAF‑T sent to the AT?
By the 5th of the month after the documents were issued, on the e‑Fatura portal or through the AT webservice. Whoever invoices in FIZ needs no file: FIZ reports each document to the AT as it is issued.