Safely roll out features to specific users or groups
Feature Flags is one of the tools that makes your product self-driving: the control layer agents use to roll a change out and roll it back. Built to work natively with product analytics, session replay, experiments, and surveys.
Install with AI in a single prompt
Paste into your terminal or code editor and make AI do the work.
What does it do?
Feature Flags let you turn features on or off for specific users, groups, or percentages of traffic without redeploying code. Create a flag, check it in your app, then control who sees what from PostHog – phased rollouts, kill switches, multivariate variants, JSON payloads, and beta opt-ins. When something breaks, flip it off. When it works, roll it out wider and measure the impact in analytics and session replay.
Who is it for?
Feature Flags is used across teams depending on your role.
How do I use it?
There are a few ways to explore Feature Flags.
Manage flags from your editor
Create flags, configure targeting rules, and check rollout status from Cursor, Claude Code, VS Code, or any MCP-compatible agent.
Top features
Boolean & multivariate feature flags
Test or release different versions of a feature with as many variants as you need.
AI prompts
Ask PostHog AI to create flags, explain targeting, and clean up stale ones. Works in PostHog AI (in-app chat), PostHog Desktop (our AI code editor), and in your product editor (using the MCP). Already signed in? Click a prompt to try it.
Createcreate-feature-flag
Updateupdate-feature-flag
Inspectfeature-flag-get-definition
Test evaluationfeature-flags-test-evaluation-create
Blast radiusfeature-flags-user-blast-radius-create
Clean upfeature-flags-status-retrieve
Schedule changesscheduled-changes-create
Works with other PostHog tools
Use Feature Flags with these other PostHog apps to maximize shareholder value.
Works with...
Product Analytics
Run any insight filtered by a flag's value, or group by flag to see usage across a flag's variants
Experiments
Run A/B tests on top of the same flags, with statistical significance tracking for each variant
Session Replay
Filter recordings down to only when a feature flag was called, or to a specific value of a flag
Changelog
Recent updates from the Feature Flags Team.
July 2026(4)
- Jul 24
More resilient flag dependencies
Feature Flag payloads keep evaluating when an older dependency uses a numeric key. One malformed flag no longer prevents the rest of your…
- Jul 24
Cohort flags handle unsupported filters
Feature Flags using cohorts with unsupported filter leaves no longer fall straight back to their default value. Unsupported conditions…
- Jul 24
Find Feature Flags by key in MCP
Ask MCP for a Feature Flag definition using its readable flag key, without looking up the numeric ID first.
- Jul 10
Add getAllFeatureFlags() to read all loaded flags
Feature Flags now exposes getAllFeatureFlags() in JavaScript Web and React Native SDKs. It returns all currently loaded flags as structured…
June 2026(2)
- Jun 20
Disable remote feature flags and update flags at runtime
Feature Flags in posthog-react-native and posthog-js-lite now support two new runtime options: - disableRemoteFeatureFlags – stops the SDK…
- Jun 16
Person & group properties for feature flag evaluation in Flutter SDK
The Flutter SDK now supports setPersonPropertiesForFlags and setGroupPropertiesForFlags (plus reset variants), matching our iOS, Android,…
May 2026(3)
- May 28
Test feature flag evaluation
Feature Flags now has a dedicated testing tab where you can enter a person or distinct ID and see real-time evaluation results with a full…
- May 15
Cohort edit history and activity log
Cohorts now have an activity log. On any saved cohort, a History section shows what changed, who changed it, and when. Track field updates,…
- May 15
Test feature flag evaluation with MCP
A new feature-flags-test-evaluation-create MCP tool lets you test Feature Flags evaluation against specific users directly from a coding…
March 2026(2)
- Mar 27
Sub-1% rollout percentages
Sometimes 1% is too many people. Feature Flags now support decimal rollout percentages, so you can roll out to 0.5%, 0.1%, or wherever you…
- Mar 21
Override early access opt-outs
Early access opt-outs can now be overridden when promoting a feature to general availability. Previously, users who opted out of early…
February 2026(1)
- Feb 12
Bulk delete Feature Flags
It’s like spring cleaning for Feature Flags. Select multiple flags and delete them in one go. We’ll even give you PostHog AI-powered…
Questions?
Answers
There are a few ways you can get answers to specific questions about Feature Flags.
- Check the docs
We have an entire docs-wizard dedicated to docs gardening.
- Search the community forums
With over 100 discussions about Feature Flags, there's a good chance your answer is already answered!
- Ask PostHog AI
It's an incredibly useful AI chat that understands the product, docs, community questions, our codebase, GitHub issues, and industry knowledge.
- Talk to a human
Dedicated humans are standing by and ready to assist. Best for questions about volume pricing, terms, and sexy legal stuff.
Feature comparison
Install
SDKs for web, mobile, and backend – or evaluate flags over the API.
Web frameworks
Popular
All
Get started – free
No credit card required. You get the first 1,000,000 requests free every month, then pricing starts at $0.0001/request and reduces with volume.
