Australian Tax File Number Generator (TFN)
Updated Tool Available
There’s now an easier to access version of this tool available at the following link: Australian Tax File Number (TFN) Generator
Along with a few other widgets that have been added more recently:
- Australian Tax File Number (TFN) Validator
- Australian Company Number (ACN) Generator
- Australian Company Number (ACN) Validator
- New Zealand IRD Number Generator
- New Zealand IRD Number Validator
Original Post
Sample Australian Tax File Numbers/Test Australian Tax File Numbers:
| 865414088 | 459599230 | 125486619 |
| 656077298 | 796801997 | 754601340 |
| 243494429 | 953615761 | 551953801 |
| 946489031 | 996506823 | 615315318 |
| 412042562 | 907974668 | 565051603 |
I came across an old VB Script used to generate random TFNs for testing. I’ve just done up a quick JavaScript bookmarklet to replace it. Just drag the button on the page below to your bookmarks bar and you’ll be able to generate random TFNs.
Get the generator: TFN Generator
A bookmarklet to generate random TFNs
For info on how it all works, checkout the Wikipedia page: Australian Tax File Number
UPDATE:
If you’re using IE, right click on the link and press add to favourites. Once you’ve added it, click the link in your favourites sidebar. The generator will appear in the top right hand corner of the page.
Let me know if you have any trouble. If you’d like to a custom or corporate copy please contact me.

how would i calculate the algorithm myself?
Hey Victoria,
It's actually a pretty basic one surprisingly, you can grab it all of of the wikipedia page or just copy the code I've used for the generator here.
Wikipedia: http://en.wikipedia.org/wiki/Tax_File_Number
Let me know if you have any trouble.
Cheers,
Chris
Just wanted to post a quick thanks - this is amazingly useful.
No worries Matt, thanks for the feedback!
this is great, do you have a similar generator for NZ IRD numbers?
Hey Anna,
Not currently, but I might have a look if I get a bit of time. The formula seems pretty similar:
http://www.ird.govt.nz/resources/b/9/b9369180451ef8e19355bb7747109566/rwt-nrwt-spec-2011-v1.pdf (original file unavailable)
Hey @anna,
Just to let you know I've added a NZ IRD number generator and validator to another site:
- Validator: https://testerwidgets.com/widgets/6/new-zealand-ird-number-validator
- Generator: https://testerwidgets.com/widgets/5/new-zealand-ird-number-generator
Please let me know if you hit any issues!
Came across your TFN generator today. Thanks for sharing it, it's great!
No worries Kevin, thanks for the feedback!
Hi Chris, the generator is really useful for development team working in finance or insurance industry. Have you consider to open source the implementation somewhere like github so that people could utilize it better?
Anyway, nice job and thanks for sharing!
Hi Chris
This is really helpful for testers and BA's too.
Its superb.
Thanks for the feedback M, appreciate it!
Chris. You're wonderful for sharing this. Thank you so much. Extremely useful especially where you have applications that validate TFNs. Awesome work.
Thanks Kim! Glad it came in handy.
Sorry this stopped working for a while - had moved to a new host and didn't realise that they'd stripped all of the code. It's back up now so please let me know if you have any issues.
Cheers,
Chris
[…] been trying out Bicep as a replacement for ARM templates for a mini side project to replace the TFN generator people are currently using on this […]
Hi Chris, any chance on an IRD Generator?
Hi Walter,
I'm a little tied up for the next few weeks sorry mate. If I get a few hours spare after that I'll see if I can put something together for you!
Cheers,
Chris
Hey @Walter,
Just a heads up that I've added a NZ IRD number generator and validator to another site:
- Validator: https://testerwidgets.com/widgets/6/new-zealand-ird-number-validator
- Generator: https://testerwidgets.com/widgets/5/new-zealand-ird-number-generator
Let me know if there are any issues!
One thing that seems to be missing when searching google for TFN generators is something that generates invalid numbers. For demo systems and some testing it would be good to be able to generate TFNs that look OK but fail the validation (so you know they aren't real by accident).
Hey @adelaidetech,
I've moved this out to a small standalone site and have included a TFN validator if that helps to address this? https://testerwidgets.com/widgets/4/australian-company-number-validator
Cheers,
Chris