KSeF invoice XML: size limits and a pre-send check
Before KSeF (Poland's national e-invoicing system) looks at the content of an invoice, the file itself has to pass a set of technical rules. Pick one or more XML files to check them against the rules that can be tested on the file alone.
Read in your browser. The file is not sent anywhere.
The rules, with the official wording
| Rule | Official wording (Polish) | Checked on this page |
|---|---|---|
| Well-formed XML | musi być przygotowana jako poprawny dokument XML, zgodny z regułami XML 1.0 | yes |
| UTF-8 without a byte order mark | musi być kodowana w UTF-8 bez znaku BOM (3 pierwsze bajty 0xEF 0xBB 0xBF) | yes |
| Conforms to the schema declared when the session was opened | musi być zgodna z zadeklarowanym schematem podanym przy otwarciu sesji | no |
| An XML prolog is allowed, but it must not name an encoding other than UTF-8 | może zawierać prolog XML, przy czym jeżeli jest on obecny, nie może wskazywać kodowania innego niż UTF-8 | yes |
| No XML processing instructions | nie może zawierać instrukcji przetwarzania XML (processing instructions) | yes |
| No Unicode characters that the XML specification discourages | nie może zawierać niezalecanych znaków Unicode określonych w specyfikacji XML W3C | yes |
| Invoice without attachments: at most 1,000,000 bytes | Maksymalny rozmiar faktury bez załączników: 1 MB * (1 000 000 bajtów). | yes |
| Invoice with attachments: at most 3,000,000 bytes | Maksymalny rozmiar faktury z załącznikami: 3 MB * (3 000 000 bajtów). | yes |
| Issue date P_1 not later than the day KSeF accepts the file | Data wystawienia faktury (P_1) nie może być późniejsza niż data przyjęcia dokumentu do systemu KSeF. | no |
| NIP checksum of the seller, buyer, third parties and authorised entity (production only) | Sprawdzenie sumy kontrolnej NIP dla: Podmiot1, Podmiot2, Podmiot3 oraz PodmiotUpowazniony (jeśli występuje). | no |
The documentation closes the XML rules with: Niespełnienie któregokolwiek z powyższych wymagań spowoduje odrzucenie faktury. (failing any of these requirements causes the invoice to be rejected). The asterisk in the size limits points to a note that an organisation can ask KSeF support for an individual review when the limits are too low.
Limits on a session and a batch
| What | Limit | Official wording (Polish) |
|---|---|---|
| Invoices in one session, interactive or batch | 10,000 | Maksymalna liczba faktur w jednej sesji (zarówno interaktywnej, jak i wsadowej) wynosi 10 000 *. |
| ZIP files in one batch upload | 50, each at most 100,000,000 bytes before encryption; 5,000,000,000 bytes in all | W ramach wysyłki wsadowej można przesłać maksymalnie 50 plików ZIP; rozmiar każdego pliku przed zaszyfrowaniem nie może przekroczyć 100 MB (100 000 000 bajtów), a łączny rozmiar paczki ZIP - 5 GB (5 000 000 000 bajtów). |
| Invoices with attachments | Batch mode only, apart from the exception in the next row | Wysyłka faktur z załącznikami jest dozwolona tylko w trybie wsadowym. |
| Exception for invoices with attachments | A technical correction of an offline invoice may be sent in an interactive session | Wyjątek: W przypadku przesyłania korekty technicznej faktury offline dopuszczalne jest użycie sesji interaktywnej. |
| Before any invoice with attachments is sent | The option has to be registered beforehand in the e-Urząd Skarbowy service | Możliwość wysyłki faktur z załącznikami wymaga uprzedniego zgłoszenia tej opcji w usłudze e-Urząd Skarbowy. |
Zalacznik element, and applies the 3,000,000-byte limit to it. It does not validate against the FA(3) schema.Have a ZIP of KSeF XML invoices?
Turn it into an Excel workbook and PDFs. Free up to 5 files, nothing uploaded.
Questions
What is the maximum size of a KSeF invoice?
1,000,000 bytes for an invoice without attachments and 3,000,000 bytes for an invoice with attachments. The documentation adds that an organisation for which the limits are too low can ask KSeF support for an individual review.
Does KSeF accept a UTF-8 file with a byte order mark (BOM)?
No. The documentation requires UTF-8 without a BOM and says that failing any of the XML requirements causes the invoice to be rejected.
Does this page validate my invoice against the FA(3) schema?
No. It checks the size, the encoding, the prolog, processing instructions, discouraged characters and whether the XML is well-formed. Schema validation and the checks KSeF runs against its own data are not done here.
Can the converter on this site read a file that fails these checks?
Often yes. The rules above are the ones KSeF applies when a file is sent to it. The converter only reads files, and it reads a file with a byte order mark, for example.
Source: Weryfikacja faktury (KSeF documentation, dated 09.04.2026); Limity (KSeF documentation, dated 26.08.2026). Read 2026-11-10.