Mikrorachunek Generator
Generate structurally valid Polish tax account numbers for software testing, built from the official NRB format with synthetic PESEL or NIP identifiers.
Caution
Looking for your real tax account number?
This tool generates random test numbers for software development. They are structurally valid but do not correspond to real taxpayers.
To find your actual mikrorachunek podatkowy, use the official generator at podatki.gov.pl 1, the only authorised source. Never use a third-party tool to generate the account number you pay taxes to. Your mikrorachunek is tied to your PESEL or NIP and should only be retrieved from the Ministry of Finance or your e-Urząd Skarbowy account.
To learn how the mikrorachunek works, see our Mikrorachunek Checker & Guide.
For testing only. Do not use for tax payments.
How a Mikrorachunek Number Is Built
A mikrorachunek follows the 26-digit Polish NRB (Numer Rachunku Bankowego) format 2:
PL + check digits + 10100071222 + Y + PESEL or NIP + zeros
| Position | Length | Content | Notes |
|---|---|---|---|
| 1–2 | 2 | Check digits | MOD 97-10, per ISO 7064 |
| 3–10 | 8 | NBP settlement number | Always 10100071 |
| 11–13 | 3 | NBP supplementary number | Always 222 |
| 14 | 1 | Identifier type (Y) |
1 = PESEL, 2 = NIP |
| 15–26 | 12 | Tax identifier + trailing zeros | PESEL (11 digits) + 0, or NIP (10 digits) + 00 |
The Ministry of Finance publishes this layout as LK10100071222YXXXXXXXXXXXX 3.
Positions 1–26 are the NRB. The full IBAN form prepends the country code: PL + the 26-digit NRB = 28 characters total.
The Check Digit Algorithm
The two check digits use the ISO 7064 MOD 97-10 scheme, the same algorithm IBAN uses worldwide:
- Take the 24-digit body:
10100071+222+ the type digitY+ the identifier + its trailing zeros. - Append the country code as digits (
P→ 25,L→ 21, giving2521) and a00placeholder for the check digits. - Compute the remainder of that number modulo 97.
- The check digits are
98 − remainder, left-padded to two digits.
Worked example with the synthetic PESEL 02070803628:
type digit (PESEL): 1
identifier + zeros (12): 020708036280
body (24 digits): 101000712221020708036280
+ country code + "00": 101000712221020708036280252100
mod 97: 64
check digits = 98 − 64: 34
final NRB (26 digits): 34101000712221020708036280
IBAN form: PL34101000712221020708036280
Code Examples
Copy-pasteable implementations. Both add the type digit and trailing zeros to the identifier, build the body, and compute the check digits with MOD 97-10.
Python:
def generate_mikrorachunek(identifier: str) -> str:
"""
Build a valid mikrorachunek from a PESEL (11 digits) or NIP (10 digits).
For testing only — use podatki.gov.pl for real tax payments.
"""
if len(identifier) == 11:
tail = "1" + identifier + "0" # PESEL: type 1, one trailing zero
else:
tail = "2" + identifier + "00" # NIP: type 2, two trailing zeros
body = "10100071222" + tail # NBP numbers + type + id + zeros
check_digits = 98 - (int(body + "252100") % 97) # PL -> 2521, 00 placeholder
return f"{check_digits:02d}{body}"
JavaScript / TypeScript:
function generateMikrorachunek(identifier: string): string {
// PESEL (11 digits): type 1 + one trailing zero. NIP (10 digits): type 2 + two.
const tail = identifier.length === 11 ? `1${identifier}0` : `2${identifier}00`;
const body = `10100071222${tail}`;
// BigInt required — the 30-digit intermediate exceeds Number.MAX_SAFE_INTEGER
const checkDigits = 98n - (BigInt(`${body}252100`) % 97n);
return `${checkDigits.toString().padStart(2, "0")}${body}`;
}
Format check (regex):
^\d{2}10100071222(1\d{11}0|2\d{10}00)$
This matches the 26-digit NRB structure. It does not verify the check digits or the embedded identifier. Run the full calculation (or our Mikrorachunek Checker) for real validation.
Testing Scenarios
When you need synthetic mikrorachunek numbers:
- Automated test suites: populate test databases with account numbers that pass format and check-digit validation, without using real taxpayer data.
- Payment form development: test przelew podatkowy (tax transfer) fields that validate mikrorachunek structure.
- Accounting software integration: build or test integrations with Polish tax systems (JPK, e-Deklaracje) where payment-routing fields need valid sample data.
- Data anonymization: replace real mikrorachunek numbers in production database copies with structurally valid synthetic ones.
PESEL or NIP: Identifier Rules
Position 14 says which identifier follows, and zeros fill the positions after it:
| Identifier | Type digit (position 14) | Digits | Trailing zeros | Used by |
|---|---|---|---|---|
| PESEL | 1 |
11 | 1 | Individuals without VAT registration |
| NIP | 2 |
10 | 2 | Companies and VAT-registered sole traders |
To generate the embedded identifiers themselves, use our PESEL Generator or NIP Generator. To validate an extracted identifier, use the PESEL Checker or NIP Checker. For other Polish identifiers, see the REGON Generator.
Detecting which type is embedded:
- Position 14 =
1→ a PESEL in positions 15–25, then one0. - Position 14 =
2→ a NIP in positions 15–24, then00. - Confirm by running the identifier through its own checksum.
Common Questions
Is this the same as the government generator?
No. The official tool at podatki.gov.pl 4 retrieves your real mikrorachunek from the tax database. This tool generates random valid numbers for testing. Never use this tool’s output for an actual tax payment.
Can I use these numbers in production?
No. They are for development and testing only. The embedded PESELs and NIPs are synthetic and do not belong to real taxpayers.
How do I validate a mikrorachunek number?
Use our Mikrorachunek Checker, which runs structure validation, check-digit verification, and identifier extraction.
What’s the difference between NRB and IBAN format?
NRB is the 26-digit domestic format. IBAN prepends PL for international use (28 characters). The check digits are identical in both. The same NRB/IBAN standard governs every Polish bank account. See our IBAN Generator for the general format.
References
-
Official Mikrorachunek Information Page - Ministry of Finance - podatki.gov.pl ↩
-
Tax Ordinance Act - Art. 61b (Consolidated Text, Dz.U. 2025 poz. 111) - isap.sejm.gov.pl ↩
-
Mikrorachunek Podatkowy: Questions and Answers - Ministry of Finance - podatki-arch.mf.gov.pl ↩
-
Official Mikrorachunek Generator Tool - Ministry of Finance - podatki.gov.pl ↩
Polish Statistics
Official data on demographics, economy, and society.
Poland's Tourism
Foreign tourist arrivals, nights spent, and visitors by country of origin.
- Foreign Tourists
- 8,857,567
- Nights Spent
- 20,217,607
Last Updated May 12, 2026
Poland's Unemployment
Unemployment rate and unemployed by education level.
- Unemployment Rate
- 5.7%
- Rate vs Poland Average
- 100.0%
Last Updated Feb 5, 2026
Poland's Housing Market
Housing stock, dwellings completed, building permits, average dwelling size, utilities coverage, and construction trends.
- Total Dwellings
- 16,162,234
- Dwellings per 1,000 Population
- 432.9
Last Updated Aug 4, 2026
Poland's Crime
Crime rates, crime categories, and police detection rates.
- Crime Rate
- 20.6 per 1000
- Detection Rate
- 69.8%
Last Updated Feb 5, 2026