Getting started

Feature flags

Toggle features for cohorts or individuals to test the impact before rolling out to everyone.

Overview

Feature flags let you toggle features on or off for specific users, groups, or percentages of traffic without redeploying code. They're the foundation for safe rollouts, A/B testing, and remote configuration.

Common use cases include:

  • Phased rollouts — Ship to 5% of users, monitor, then gradually increase
  • Kill switches — Instantly disable a broken feature without redeploying
  • Targeting — Show features to specific users, teams, or organizations
  • A/B testing — Run experiments with multivariate flags and track results
  • Remote config — Send JSON payloads to configure behavior server-side
  • Beta programs — Let users opt in to early access features

SDKs and frameworks

All the features you expect

Even better in the PostHog ecosystem

Next steps

Questions? Ask PostHog AI.

It's easier than reading through 1072 pages of documentation.

Community questions

Questions about this page? or post a community question.