In short
Feature flags let you ship code switched off, turn it on for just 1% of users, and kill it in seconds if something breaks. Almost every modern release plan uses them.
A technical mechanism to turn a feature on or off (or for specific user segments) without a new deployment — the infrastructure that makes staged rollouts and A/B tests possible.

Think of it like this
The switchboard
The wiring in your house is already done. To light one room, you just flip its switch. No electrician, no new wiring. A feature flag is that switch: the code is already deployed, and you choose who gets the light.
Watch it happen
Checking a flag at runtime
new_checkout: 10%
1/5The PM sets the flag to on for 10% of users, with no new deployment.
The big ideas
What you need to know
Separate deploy from release
Engineers merge and deploy any time. The business decides when users see it.
Target segments
Turn features on for staff, a city, a percentage or beta testers.
Kill switch
A bad feature can be switched off in seconds, not after a new app store release.
Clean up old flags
Old flags clutter code and cause bugs. Remove them once a feature is fully launched.
See it in code
Walk through the code
1const showNewCheckout = await flags.isEnabled(2 "new_checkout",3 { userId: user.id, city: user.city }4);5 6if (showNewCheckout) {7 renderNewCheckout();8} else {9 renderOldCheckout();10}1/3Ask the flag service about this flag, passing details it can use to target users.
A typical flag check. The flag service decides per user; the code just asks and follows the answer.
Save yourself the pain
Common mistakes
Oops
Leaving dozens of fully launched flags in the code for years.
Do this instead
Add a cleanup task when you create the flag, and remove it after full rollout.
Oops
Using flags with no record of who changed what.
Do this instead
Use a tool with change history, so you can see who flipped a flag and when.
Your mission
Plan a flag rollout
Quick check
What's the main advantage of a feature flag during a risky launch?
Go deeper
- 1Learn the basic concept of a feature flag and how it differs from a config file.
- 2Understand why flags let you roll back instantly without an emergency deploy.
- 3Explore a feature-flagging tool's docs (LaunchDarkly, Split, or similar) at a high level.
More topics at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.