Feature Flag
A feature flag is a conditional switch in code that turns functionality on or off at runtime without a new deploy. It lets teams control who sees a feature and when.
What it means
A feature flag (also called a feature toggle) is a piece of logic that wraps a block of code and decides at runtime whether it runs. Instead of shipping a feature to everyone the moment it merges, you deploy it behind a flag that is off by default, then flip it on for specific users, environments, or percentages of traffic. The evaluation happens in your application through an SDK that reads flag state from a management service or a local config, so changing behavior is a configuration change rather than a code change.
Why it matters
Flags decouple deploy from release. Code can sit in production, dark, until you decide the feature is ready, which means smaller and more frequent merges instead of long-lived branches. They also give you a safety valve - if a new feature misbehaves, you turn its flag off in seconds rather than rolling back a deployment. That same mechanism powers canary releases, A/B tests, entitlement gating for paid tiers, and gradual rollouts. The tradeoff is flag debt - every flag is a branch in your code that someone has to remember to remove once the feature is fully live.
In practice
A typical rollout starts a flag at 0 percent, enables it for internal users, then ramps traffic to 1, 10, 50, and 100 percent while watching error and latency metrics. Platforms like LaunchDarkly and Flagsmith store flag state centrally, stream updates to SDKs, and log who changed what. Well-run teams name flags with a clear convention, tag them with an owner, and schedule cleanup so temporary release flags do not linger for months. See our guide to feature flag management for the full lifecycle.
Related Terms
Learn More
Tool Reviews
Free Newsletter
Get the Feature Flags Newsletter
Platform benchmarks, real pricing data and progressive delivery practice. No spam.
LaunchDarkly
Flagsmith