Skip to main content
Skip to main content

Polish KSeF ID Validator (e-Invoice)

Validate structural compliance, date, NIP and checksum of Polish KSeF identifiers.

About Polish KSeF Validation

Validation sanitizes input, accepts hyphenated or continuous formats, and verifies the embedded NIP via Modulo 11.

Ensures full compliance with the technical specifications of the Polish Ministry of Finance.

Anatomy & Structure of Polish KSeF Number

The KSeF identifier consists of 32 structured alphanumeric characters:

PositionFieldLengthMeaning & RuleExample
1 to 10Issuer NIP10 digitsTax Identification Number of the issuer verified via Modulo 111234567890
11 to 18Issue Date8 digitsInvoice date formatted as YYYYMMDD20260827
19 to 30Hex Technical ID12 hexTwo 6-character hexadecimal technical blocks1A2B3C4D5E6F
31 to 32Hex Checksum2 hexInternal hexadecimal check bytes of the KSeF systemA1

KSeF Assembly & Validation Algorithm

KSeF validation inspects the mathematical integrity of the 4 composite elements:

KSeF = NIP(10) + YYYYMMDD(8) + Hex(12) + Checksum(2)
  1. 1. Remove hyphens and validate the 32-character alphanumeric length.
  2. 2. Validate the embedded NIP in the first 10 digits using Modulo 11.
  3. 3. Validate the issue date in digits 11 to 18 ensuring valid day, month, and year.
  4. 4. Validate that the last 14 characters contain only hexadecimal digits (0-9, A-F).

Frequently Asked Questions (FAQ)