# Feature flags in plain words

> A feature flag is a switch that turns a feature on or off without a new release. What flags make possible, the four kinds you will meet, and why old flags have to be removed.

Source: https://hintvo.com/blog/feature-flags-in-plain-words | Last updated: November 20, 2026 | Reviewed: 2026-11-20

A feature flag is a switch in the code that turns a feature on or off without shipping a new version. It separates two things that used to happen together: putting code into production, and letting users see it.

## What it makes possible

- **Turning something off in seconds** when it misbehaves, instead of rolling back a release.
- **Releasing to a few users first:** staff, then one percent, then everyone.
- **Merging unfinished work** safely, hidden behind a switch that is off.
- **Different behavior per customer or plan.**

## What it looks like

```ts
if (flags.isOn("retry-failed-payments", { user })) {
  await retryWithBackoff(job);
} else {
  await markFailed(job);
}
```

## Four kinds, with different lifetimes

| Kind | Purpose | Should live for |
| --- | --- | --- |
| Release flag | Hide unfinished work, roll out gradually | Days or weeks |
| Kill switch | Turn off a risky part in an emergency | As long as the risk exists |
| Experiment | Compare two versions | Until the result is in |
| Plan or permission flag | Give a feature to some customers | Permanently |

## The cost

Every flag doubles the number of ways that piece of code can run. Ten flags is about a thousand combinations, and nobody tests a thousand combinations. Flags that are fully rolled out and never removed are one of the most common kinds of clutter in a codebase.

- Give every release flag an owner and a removal date.
- Remove the flag and the dead branch once the rollout is finished.
- Keep the list of flags somewhere people can read it.

## Questions you will hear in a meeting

- Is this behind a flag, and who can flip it?
- What is the default if the flag service cannot be reached?
- When does this flag get removed?
- Did we test it with the flag off as well?

## In an interview

When asked how you would release something risky, a flag with a gradual rollout and a way to turn it off is the expected answer. Add how you would know that it is going wrong, and you have covered the whole question.

> **Where Hintvo fits:** when a term like this comes up in a call, the In plain words card explains it in one sentence, in the context of your project. When someone asks how your own code handles it, the answer names the file and line.

## Related

- [Design reviews: ten questions worth asking](https://hintvo.com/blog/design-review-questions-worth-asking.md): What questions should I ask in a design review?
- [How to walk a team through your pull request](https://hintvo.com/blog/walk-a-team-through-your-pull-request.md): How do I present a pull request or a code change to my team?
- [Database migrations in plain words](https://hintvo.com/blog/database-migrations-in-plain-words.md): What is a database migration, in plain words?
