guide

What Is a Feature Flag? A Plain-English Guide for 2026

A feature flag is a switch in your code that turns a feature on or off without a deploy. Here's how flags actually work, the types you'll use, and when you need a tool for them.

Published:

If you’ve heard the term “feature flag” thrown around in standups and nodded along, this is the explainer I wish someone had handed me. No jargon, no sales pitch. Just what a feature flag is, how it works, and when you actually need one.

What a feature flag actually is

A feature flag is a switch in your code that turns a feature on or off without shipping new code. That’s the whole idea.

In practice it looks like an if-statement. Instead of writing code that always runs, you wrap the new feature in a check:

if (flags.isEnabled("new-checkout")) {
  showNewCheckout();
} else {
  showOldCheckout();
}

The flag new-checkout lives somewhere you can change it - a config file, an environment variable, or a dashboard - and you flip it without touching the code again. Deploying the code and releasing the feature become two separate actions. That separation is the entire point, and it’s why flags are worth learning.

You’ll hear other names for the same thing: feature toggle, feature switch, feature gate. They all mean this exact pattern. Don’t let the vocabulary confuse you.

How feature flags work under the hood

The flag’s on/off state is stored outside your code. Your app reads that state at runtime through a small piece of code called an SDK, or by reading a config value directly.

When the state lives in a dedicated flag service, the flow is roughly this:

  1. You create a flag in a dashboard and set it off.
  2. Your app’s SDK asks the service, “is new-checkout on for this user?”
  3. The service checks its rules and answers yes or no.
  4. Your code shows the right version based on the answer.

The clever part is step 3. A good flag service doesn’t just answer on or off for everyone - it can answer differently per user. That’s what turns a simple switch into a targeting tool. More on that next.

The types of flags you’ll actually use

Not all flags do the same job. In real codebases they fall into a few buckets:

  • Release flags hide unfinished work. You merge code behind an off flag so it ships to production without being visible, then flip it on when it’s ready.
  • Rollout flags release gradually. Turn a feature on for 1 percent of users, then 10 percent, then everyone - watching your metrics at each step.
  • Kill switches are the safety valve. If a feature misbehaves in production, you flip it off instantly instead of scrambling to redeploy.
  • Targeting flags show a feature to a specific group - beta users, one customer, a single country - and no one else.
  • Experiment flags split users into groups to A/B test which version performs better.

Most teams start with release flags and kill switches, then grow into rollouts and experiments. You don’t need all five on day one.

Why feature flags matter

Here’s the honest case for bothering with any of this. Without flags, deploying and releasing are the same scary event. You push code, and it’s live for everyone at once. If it breaks, you roll back the whole deploy under pressure.

Flags break that link. You can merge half-finished code to the main branch safely because it’s dark behind an off flag - which is what makes practices like trunk-based development work. You can release to a sliver of traffic first, the approach behind progressive delivery. And when something goes wrong, the kill switch means a bad release is a five-second fix, not a fire drill.

That’s the difference between shipping nervously once a week and shipping calmly many times a day.

When you need a dedicated tool

You do not need to buy anything to start. For a handful of flags, a config file or an environment variable is fine - I’ve covered flags versus config files if you want the honest comparison.

You outgrow the DIY approach when:

  • You have dozens of flags and can’t remember what each one does.
  • You want to target segments, not just flip global on/off.
  • You need an audit trail of who changed what.
  • Non-engineers - PMs, support, QA - need to flip flags without a deploy.

At that point a real tool earns its keep. Here are three good starting points, each with a free tier:

  • ConfigCat is the simplest on-ramp. It charges no per-seat and no per-MAU fees - its Forever Free tier gives you 10 flags with unlimited MAUs and flag reads, no credit card. Great for learning the pattern without cost anxiety.
  • Flagsmith is the open-source pick. It’s licensed BSD-3-Clause and genuinely self-hostable, with a free cloud tier of 50,000 requests a month and unlimited flags. Choose it if you want no vendor lock-in.
  • LaunchDarkly is the enterprise standard, with the deepest targeting and around 38 SDKs. Its free Developer tier has unlimited seats, though the paid model bills on client-side MAU, so price it carefully before you scale.

If you want a wider list, I keep a ranked roundup of the best feature flag tools and a separate one for the best free options.

The bottom line

A feature flag is just a switch - but the switch changes how you ship. It separates deploying code from releasing features, lets you roll out gradually, and hands you a kill switch for when things go wrong. Start small with a config value, learn the pattern, and reach for a real tool when the flag count and the targeting needs grow past what a text file can handle. When you’re ready to wire your first one in, my how to implement feature flags walkthrough picks up where this leaves off.

Frequently Asked Questions

What is a feature flag in simple terms?

A feature flag is a switch in your code that turns a piece of functionality on or off without shipping new code. You wrap a feature in an if-statement that checks the flag, then flip the flag from a dashboard to control who sees the feature. It lets you deploy code and release the feature as two separate steps.

What is the difference between a feature flag and a feature toggle?

Nothing - they're two names for the same thing. Feature flag, feature toggle, feature switch and feature gate all describe the same pattern - a runtime switch that controls whether a piece of code runs. Vendors and teams use the terms interchangeably, so don't read a difference into which word someone picks.

Why do teams use feature flags?

Three big reasons. They separate deploying code from releasing a feature, so you can merge unfinished work safely behind an off flag. They let you roll a feature out to 1 percent of users first and watch for problems. And they give you a kill switch - if something breaks, you flip the flag off instead of doing an emergency rollback.

Do I need a paid tool to use feature flags?

No. You can start with a simple config file or environment variable for a handful of flags. You need a dedicated tool once you have many flags, want to target specific user segments, need an audit trail, or want non-engineers to flip flags safely. Free tiers exist - ConfigCat, Flagsmith and LaunchDarkly all have a $0 plan to start on.

Explore More

Free Newsletter

Get the Feature Flags Newsletter

Platform benchmarks, real pricing data and progressive delivery practice. No spam.

Free. Unsubscribe any time. See our privacy policy.

Related Articles