A feature flag, also called a feature toggle, is a conditional in application code that determines at runtime whether a particular piece of functionality is active for a given user or request. Rather than a feature being present or absent depending on which version of the code is deployed, it is present in the code but switched on or off by configuration. This decouples deployment from release: code can ship to production continuously while the features it contains remain invisible until someone decides to expose them.
For experimentation, feature flags are the underlying mechanism of server-side testing. Assigning a user to a flag variant is functionally the same as assigning them to an experiment arm, and because the decision happens in the application rather than in the browser, the variant can affect anything the application controls: pricing logic, search ranking, recommendation algorithms, email triggers, checkout rules, and backend behavior that no client-side testing tool can reach. It also eliminates the visual flicker that client-side manipulation produces, and it is invisible to ad blockers and script-blocking browser settings.
Flags serve several distinct purposes that are worth separating, because they have very different lifespans. Release flags hide unfinished work and are removed once the feature is fully launched. Experiment flags control variant assignment and are removed when the test concludes. Operational flags, sometimes called kill switches, allow a feature to be disabled instantly if it causes problems in production, and may live indefinitely. Permission flags gate functionality by customer tier or contract and are effectively permanent. Treating all four as the same thing is how organizations end up with hundreds of stale conditionals nobody dares remove.
That accumulation is the principal risk. Every flag is a branch, and the number of possible code paths grows multiplicatively as flags accumulate. Testing every combination becomes impossible, unexpected interactions between flags cause defects that are hard to reproduce, and the code becomes progressively harder to reason about. Disciplined teams treat flag removal as part of the definition of done, keep an inventory with an owner and an expiry date for each flag, and periodically audit for flags that have been at a fixed value for months.
Feature flags also enable release strategies that reduce risk independently of experimentation. Progressive rollout exposes a feature to one percent of traffic, then five, then twenty, watching error rates and business metrics at each step. Ring-based deployment exposes internal users first, then a beta cohort, then everyone. Canary releases run a new version alongside the old and compare operational metrics before proceeding. All of these are variations on the same capability: the ability to change who sees what without deploying code.
Flags also provide the mechanism for controlled regional and segment rollout, which matters for organizations operating across several markets. A change can be exposed first in a single country, monitored for market-specific issues involving language, payment methods, tax display, or regulatory requirements, and then extended once it is proven. This is considerably safer than a global release, and it produces evidence about whether an improvement transfers between markets, which is frequently assumed and rarely tested. The tooling question follows from scale: small teams can manage flags with configuration files and a simple administrative interface, while organizations running many concurrent flags across multiple services generally need a dedicated management platform providing targeting rules, audit logs, and consistent evaluation across backend and frontend, since inconsistent evaluation between layers produces users who see half of a feature.
Introducing flags is often a prerequisite before a serious experimentation practice can exist at all, particularly for functionality that lives in the application layer rather than the presentation layer. In product development work, the flag infrastructure is normally built alongside the delivery pipeline, so that experimentation, progressive rollout, and emergency rollback all use the same mechanism. Once it exists, a CRO service program is no longer limited to what can be changed in the browser, which typically opens up the highest-value test ideas in the backlog: the ones involving pricing, personalization logic, and the mechanics of the purchase flow itself.