How to Generate a Dummy TFN for Testing (Australian Tax File Number)
If you're building anything that accepts an Australian Tax File Number — a payroll form, an onboarding flow, a tax-prep integration — you eventually need to type a TFN into it to see if the field works. Reaching for a real one is the wrong move: it's someone's actual government identifier, and under the Privacy Act 1988 and the Taxation Administration Act a TFN is one of the most tightly regulated pieces of personal information in the country. What you actually want is a dummy TFN — a number that passes validation but belongs to nobody.
A TFN isn't a random 9 digits
The reason you can't just mash the number row is that a TFN has a built-in check. It's 9 digits (an older 8-digit format also exists), and the digits are run through a weighted checksum: each position has a fixed weight, you multiply digit by weight, sum the lot, and the total must be divisible by 11.
The weights, left to right, are:
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| Weight | 1 | 4 | 3 | 7 | 5 | 8 | 6 | 9 | 10 |
So for a TFN d₁d₂…d₉, you compute 1·d₁ + 4·d₂ + 3·d₃ + 7·d₄ + 5·d₅ + 8·d₆ + 6·d₇ + 9·d₈ + 10·d₉, and a valid TFN is one where that sum mod 11 equals 0.
This is why a "random" 9-digit string almost always fails: only about one in eleven random numbers happens to land on a multiple of 11. Any validation worth its name will reject the other ten.
Generating one that passes
To produce a dummy TFN that clears the check, you don't guess — you fix the first eight digits freely, then solve for the ninth so the weighted sum comes out divisible by 11. Because the ninth weight is 10, and 10 is its own inverse modulo 11 (10 × 10 = 100 ≡ 1 mod 11), the last digit is determined by the first eight. If the math demands a check digit of 10 — which can't be a single digit — you discard that combination and pick new digits.
The result is a number that is structurally indistinguishable from a real TFN to any validator, while being tied to no actual taxpayer and never registered with the ATO.
What a dummy TFN is — and is not — for
A generated TFN passes the checksum. It does not mean the number is issued, registered, or safe to use anywhere real. Legitimate uses:
- Filling a payroll or HR form in a staging environment
- QA and automated test fixtures for anything that validates a TFN
- Demos and screenshots where a real TFN would leak personal data
- Seeding a development database with realistic-looking records
Illegitimate — and in Australia, unlawful — uses include lodging a tax return, misrepresenting your identity, or supplying a fabricated TFN to the ATO or an employer as if it were your own. Generating test data is fine; using it to deceive is not.
Why not just use 123 456 782?
People do pass around a handful of "known good" test TFNs, and 123 456 782 is a genuinely valid one. The problem with a single hardcoded value is that it tests exactly one path. Good test data varies: you want a fresh valid number per test run, a batch of them for load testing, and deliberately invalid ones to confirm your rejection path works too. A generator gives you all three on demand; a copied-and-pasted constant gives you one.
Try it
The Australian TFN Generator & Validator does both, entirely in your browser — generate as many valid-format dummy TFNs as you need for testing, or paste one in to check it against the official weighted checksum. Nothing you type is sent to a server, so even a real TFN you're debugging never leaves your device. If you work across other Australian identifiers, the ABN generator and Medicare number generator follow the same approach.
Hanuman Singh · built snaptxt.app · hanumansingh.dev