Mandatory salary in job ads: what the UK change means for devs
You've gone through four interview rounds. You did a weekend take-home test. Then, in the final conversation, you found out the job paid half of what you earn today. The UK has decided this needs to stop. The British government will make salaries mandatory in job ads, according to Reuters. Every ad will have to show what it pays. It sounds like an HR detail. For devs, it touches negotiation, wasted time and even code, if you maintain any system that publishes job listings.
What the UK decided
The idea is simple. Anyone posting a job has to state the salary or a salary range. No more "competitive salary". No more "to be discussed".
I won't make up details the report hasn't settled yet. The exact start date, penalties and rules for small businesses usually show up in the regulations after the political announcement. So read it this way: the direction is set, the details are still coming.
And the UK isn't alone. The European Union approved its pay transparency directive, giving member states until June 2026 to adapt their laws. Several US states, like Colorado, California and New York, have required salary ranges in job ads for a few years now. The UK, outside the EU, was falling behind in this conversation. Now it's in.
Why mandatory salaries in job ads matter if you write code
Tech is one of the markets with the widest salary spread for the same role. Here in Brazil, "senior developer" can mean R$8,000 or R$30,000 a month. It depends on the company, the state and whether the job pays in dollars. Abroad, the spread is similar.
When nobody shows the number, whoever knows more has the edge. And the one who knows more is always the company. It has everyone's spreadsheet. You have your payslip and a rumor from the group chat.
Hiding the salary was never a negotiation strategy. It was just information asymmetry with a fancy name.
With the range in the ad, three things change in practice:
- You filter before spending time. A 6-hour take-home test only for jobs that pay what you want.
- Negotiation starts from a known point. You don't have to guess a number and hope you didn't guess low.
- Paying differently for the same role gets harder. If two people join in the same role with the same published range, a big gap becomes an awkward question.
Does this affect people working in Brazil?
Directly, no. It's a British law. Indirectly, quite a lot.
Many Brazilian devs work remotely for foreign companies, hired as contractors or through EOR platforms. If a job is posted in the UK, even when open to international hiring, the range will likely show up. Global companies also tend to standardize their job ad template. One format is cheaper than one per country. That's what happened after the Colorado law. Some companies chose to exclude candidates from there rather than publish the number. It looked bad. Most ended up publishing it for everyone.
In Brazil we have Law 14.611, from 2023, on equal pay between men and women. It requires large companies to publish transparency reports. It doesn't require a range in job ads, but it points the same way. I wouldn't be surprised to see this debate land here hard in the next few years.
What changes in the code if you maintain a job board
Here's the part almost nobody talks about. Someone has to implement this. Maybe you maintain an ATS, a job board, a careers widget on a company site, or an integration that reposts jobs to LinkedIn and other portals. Then the salary field will stop being optional for part of your traffic.
The classic mistake is solving it on the frontend. Add an asterisk to the form and call it done. But jobs come in through APIs, CSV imports and integrations with tools like Greenhouse or Gupy. The rule has to live on the backend, at the entry boundary.
A lean example with Bun.serve, no dependencies at all:
type Job = {
title: string;
country: string;
salaryMin?: number;
salaryMax?: number;
currency?: string;
};
const TRANSPARENCY_REGIONS = new Set(["GB", "US-CO", "US-CA", "US-NY"]);
function validate(j: Job): string | null {
if (!TRANSPARENCY_REGIONS.has(j.country)) return null;
if (j.salaryMin == null || j.salaryMax == null || !j.currency)
return "Salary range and currency are required for this region";
if (j.salaryMin <= 0 || j.salaryMin > j.salaryMax)
return "Invalid salary range";
return null;
}
Bun.serve({
port: 3000,
routes: {
"/jobs": {
POST: async (req) => {
const job = (await req.json()) as Job;
const error = validate(job);
if (error) return Response.json({ error }, { status: 422 });
// save to the database...
return Response.json({ ok: true }, { status: 201 });
},
},
},
});
Notice three details. Validation is per region, because the rule doesn't apply worldwide. The range has to make sense (min <= max, no "0 to 999999" just to tick a box). And currency is required, because "5000" without a currency tells you nothing.
That last point deserves attention. Transparency laws often come with the absurd-range loophole. If a company posts "from £30,000 to £300,000", it technically gave a number and in practice gave nothing. Some jurisdictions require the range to be in "good faith". You can't solve good faith with code, but you can flag it:
const spread = job.salaryMax! / job.salaryMin!;
if (spread > 2) warnings.push("Range is very wide, review before publishing");
In the database, if you use PostgreSQL, it's worth pushing the basic rule into a constraint too. That way no bulk import slips through:
ALTER TABLE jobs
ADD CONSTRAINT valid_range
CHECK (salary_min IS NULL OR salary_min <= salary_max);
I'd keep the per-country requirement in the application. The list of regions changes, and nobody wants a migration every time a new state passes a law.
How to use this to your advantage, today
Even if you never apply for a British job, this wave gives you data. And data is exactly what you're missing when you negotiate.
A ten-line Bun script already helps. If you export jobs from an aggregator as JSON, you can see the real range for your role in minutes:
const jobs = await Bun.file("jobs.json").json();
const seniors = jobs.filter(
(j: any) => j.title.match(/senior|sênior/i) && j.salaryMin
);
const midpoints = seniors.map((j: any) => (j.salaryMin + j.salaryMax) / 2);
midpoints.sort((a: number, b: number) => a - b);
console.log("Jobs with a range:", seniors.length);
console.log("Median:", midpoints[Math.floor(midpoints.length / 2)]);
It's not a statistical study. It's a thermometer. But it's a better thermometer than the "I think the market pays around 15k" everyone says over coffee.
And in the interview, when they ask for your salary expectations, you can politely flip it: "what's the approved range for this position?". In markets with mandatory transparency, that question becomes normal. In markets without it, it's still legitimate. If someone gets offended by it, they're telling you something about the company culture.
My take
I think the measure is good and overdue. The usual objection is that "publishing salaries makes negotiation rigid" or "creates friction with people already at the company earning less". The second objection is actually an argument in favor. If the friction exists, it's because the gap already existed and was just hidden.
The real risk is the decorative range, too wide to mean anything. That depends on regulation and enforcement, not goodwill. Let's see how the UK writes the details.
Meanwhile, if you maintain a job system, put the validation on the backend before legal asks for it with a deadline of yesterday. And if you're on the other side, job hunting, start treating a job ad without a salary as a job ad missing a piece of information. Because that's exactly what it is.
If you want to see how I usually structure validation and APIs in my projects, take a look at what I've been building.
LinkedIn summary
I went through four interview rounds and only found out at the end that the job paid half of what I was earning. The UK has decided that's over: every job ad will have to show the salary or the salary range. Hiding the salary was never a negotiation strategy. It was just information asymmetry with a fancy name. The company has everyone's spreadsheet. You have your payslip and a rumor from the group chat. Even if you work from Brazil, this reaches us. Global companies standardize their job ad templates, and whoever maintains an ATS or job board will need to validate range and currency on the backend, not just with an asterisk on a form. From today on, I treat a job ad without a salary as a job ad missing a piece of information. Because that's exactly what it is. I wrote on my blog about what this changes for devs, with sample code. The link is in the comments if you want to read it. #PayTransparency #TechCareers #SoftwareDevelopment #JobMarket #Programming