True Take-HomeOpen data for UK payroll

UK tax rates, as JSON

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.

Use it

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
  })

Which URL to use

URLCORSTypeUse for
cdn.jsdelivr.net/gh/HadiDevLabx/uk-tax-rates@v1.0.1/data/…✅application/jsonPinned. Served immutable, cached a year. Reproducible calculations
cdn.jsdelivr.net/gh/HadiDevLabx/uk-tax-rates@main/data/…✅application/jsonFollows the repo. 12-hour edge cache
raw.githubusercontent.com/HadiDevLabx/uk-tax-rates/main/data/…✅text/plainNo CDN, no cache delay
hadidevlabx.github.io/uk-tax-rates/data/…❌application/jsonServer-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.

What is in each file

KeyContains
incomeTaxPersonal allowance, the £100,000 taper and its rate, bands by region, standard tax code, Blind Person's Allowance
nationalInsuranceEmployee thresholds and rates including the category B reduced rate, plus employer figures
studentLoansAll five plans — 1, 2, 4, 5 and Postgraduate — with thresholds and rates
dividends, selfEmployedDividend allowance and rates; Class 2 and Class 4 NI
statutoryPaymentsStatutory Maternity Pay and Statutory Sick Pay
childBenefit, marriageAllowance, taxFreeChildcare, redundancy, companyCarBikThe thresholds these each turn on

Each block, applied

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.

FieldWorked example
incomeTax.bandsIncome tax calculator
incomeTax.personalAllowanceTake-home pay calculator
incomeTax.paTaperStart100k tax trap calculator — the 60% marginal band
incomeTax.paTaperRateAdjusted net income calculator
incomeTax.bands.scotlandScottish income tax calculator — all six bands
incomeTax.standardTaxCodeTax code checker
nationalInsurance.employeeNational Insurance calculator
nationalInsurance.employerEmployer cost calculator
studentLoansStudent loan repayment calculator — all five plans
dividendsDividend tax calculator
selfEmployedSelf-employed tax calculator
childBenefitChild Benefit calculator — the HICBC taper
marriageAllowanceMarriage Allowance calculator
taxFreeChildcareTax-Free Childcare calculator
redundancyRedundancy pay calculator
statutoryPayments.maternityMaternity pay calculator
statutoryPayments.sickPayStatutory Sick Pay calculator
companyCarBikCompany 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 years

Tax yearFile
2026/27 (latest)data/2026-27.json
2025/26data/2025-26.json
2024/25data/2024-25.json
Index of all yearsdata/index.json

Where the figures come from

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.

Common questions

Is there an official HMRC API for tax rates?

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.

Where do I get UK income tax bands in code?

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.

Are the National Insurance thresholds in here too?

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.

Does it cover all five student loan plans?

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.

How often is it updated?

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.

Can I use it in a commercial product?

Yes. CC BY 4.0 — keep the attribution line and you are done.

Licence

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.