Income tax bands for England, Wales and Scotland, National Insurance thresholds and all five student loan plans — one file per tax year, free to use commercially with attribution.
Every UK payroll project starts by hard-coding the bands into a constants file, and every April that file is quietly wrong. This is that file, kept current and versioned, so you can fetch it instead.
curl https://hadidevlabx.github.io/uk-tax-rates/data/latest.json
Pin to a tax year when you need a calculation to stay reproducible:
fetch('https://cdn.jsdelivr.net/gh/HadiDevLabx/uk-tax-rates@v1.0.1/data/2026-27.json')
.then(r => r.json())
.then(d => {
d.incomeTax.personalAllowance // 12570
d.incomeTax.bands.scotland // 6 bands
d.studentLoans.find(p => p.key === 'plan5').threshold // 25000
})
| URL | CORS | Type | Use for |
|---|---|---|---|
cdn.jsdelivr.net/gh/HadiDevLabx/uk-tax-rates@v1.0.1/data/… | ✅ | application/json | Pinned. Served immutable, cached a year. Reproducible calculations |
cdn.jsdelivr.net/gh/HadiDevLabx/uk-tax-rates@main/data/… | ✅ | application/json | Follows the repo. 12-hour edge cache |
raw.githubusercontent.com/HadiDevLabx/uk-tax-rates/main/data/… | ✅ | text/plain | No CDN, no cache delay |
hadidevlabx.github.io/uk-tax-rates/data/… | ❌ | application/json | Server-side and curl only |
Fetching from a browser? Use one of the first three. This
Pages domain sends no Access-Control-Allow-Origin header, so a
cross-origin fetch() against hadidevlabx.github.io is
blocked. Server-side — Node, Python, curl, anything that is not a browser —
every row works, because CORS is a browser rule and not a server one.
Pin to a @tag if a calculation has to give the same answer next
year. A @main URL is fine for a live lookup but takes up to twelve
hours to pick up a change at the edge.
| Key | Contains |
|---|---|
incomeTax | Personal allowance, the £100,000 taper and its rate, bands by region, standard tax code, Blind Person's Allowance |
nationalInsurance | Employee thresholds and rates including the category B reduced rate, plus employer figures |
studentLoans | All five plans — 1, 2, 4, 5 and Postgraduate — with thresholds and rates |
dividends, selfEmployed | Dividend allowance and rates; Class 2 and Class 4 NI |
statutoryPayments | Statutory Maternity Pay and Statutory Sick Pay |
childBenefit, marriageAllowance, taxFreeChildcare, redundancy, companyCarBik | The thresholds these each turn on |
Reading a threshold is easy; knowing what it does to a real salary is the part that takes a while. Every row below is the same figure from this dataset worked through on a live calculator — useful for sanity-checking your own implementation against a reference, which is what most of the bug reports on payroll code turn out to need.
| Field | Worked example |
|---|---|
incomeTax.bands | Income tax calculator |
incomeTax.personalAllowance | Take-home pay calculator |
incomeTax.paTaperStart | 100k tax trap calculator — the 60% marginal band |
incomeTax.paTaperRate | Adjusted net income calculator |
incomeTax.bands.scotland | Scottish income tax calculator — all six bands |
incomeTax.standardTaxCode | Tax code checker |
nationalInsurance.employee | National Insurance calculator |
nationalInsurance.employer | Employer cost calculator |
studentLoans | Student loan repayment calculator — all five plans |
dividends | Dividend tax calculator |
selfEmployed | Self-employed tax calculator |
childBenefit | Child Benefit calculator — the HICBC taper |
marriageAllowance | Marriage Allowance calculator |
taxFreeChildcare | Tax-Free Childcare calculator |
redundancy | Redundancy pay calculator |
statutoryPayments.maternity | Maternity pay calculator |
statutoryPayments.sickPay | Statutory Sick Pay calculator |
companyCarBik | Company car tax calculator |
Scotland is not England with different numbers. Scotland has six income tax bands against England's three, starting with a 19% starter rate and topping out at 48%. National Insurance is reserved, so it does not change. Code that models the UK as one band set will be wrong for about 8% of UK taxpayers.
| Tax year | File |
|---|---|
| 2026/27 (latest) | data/2026-27.json |
| 2025/26 | data/2025-26.json |
| 2024/25 | data/2024-25.json |
| Index of all years | data/index.json |
Each file carries a meta.primarySource pointing at the gov.uk or
gov.scot page the figures were read from, and a meta.reviewedOn
date saying when that was last checked. They are generated from the rate tables
behind
True Take-Home, a free UK take-home pay
calculator, whose build fails rather than serve a stale tax year — so the data
here cannot silently drift past an April.
If you want the same figures applied to an actual salary rather than as raw constants, the calculator at truetakehome.co.uk does that, and truetakehome.co.uk/rates.json serves the current year live from the same source.
No. HMRC's developer hub covers submission — RTI, Making Tax Digital, PAYE returns — not the rate tables themselves. There is no official endpoint serving the personal allowance, the bands or the NI thresholds, which is why almost every UK payroll project hard-codes them. This dataset exists to fill that gap.
From data/latest.json for the current tax year, or a pinned file like data/2026-27.json when a calculation has to stay reproducible. Both carry England, Wales and Scotland.
Yes — employee thresholds and rates under
nationalInsurance.employee, including the category B reduced rate
for married women and widows, and employer figures under
nationalInsurance.employer.
Yes: Plans 1, 2, 4, 5 and Postgraduate, each with its threshold and rate. Plan 5 is the one most libraries are missing — repayments began in April 2026 and its £25,000 threshold is the lowest of all the plans, so a Plan 5 borrower repays more than a Plan 2 borrower on the same salary.
Each April, when the new tax year takes effect. The figures are generated
from tables whose build fails rather than serve a stale year, so the dataset
cannot silently drift. meta.reviewedOn in every file records when
it was last checked.
Yes. CC BY 4.0 — keep the attribution line and you are done.
CC BY 4.0. Free for commercial use. The attribution line is the only condition:
Data: True Take-Home (https://truetakehome.co.uk)
No warranty. These are published figures transcribed carefully and checked, not tax advice. If you are shipping payroll, verify against HMRC's own tables before you rely on them.