Skip to content
Glossary · Hosting and delivery

Feature flag

Also called feature toggle, feature switch.

Definition

A switch in the code that turns a feature on or off for chosen users at runtime, without deploying new code.

Last updated

What it is.

The code for a new feature ships to production hidden behind a flag. A flag service or config then decides who sees it: nobody, staff only, one customer, ten percent of users or everyone. Turning it off is instant.

Flags separate deploying code from releasing a feature. They power canary releases, A/B tests, beta programmes and kill switches for risky parts of a system.

Why it matters

Flags let teams merge and ship small changes every day, even when a feature is not finished, and let product teams choose release timing. A kill switch turns an incident into a click rather than an emergency deploy.

In a product build

We evaluate flags on the server for anything that affects security or data, give each flag an owner and a removal date, and log flag changes in the audit log. Old flags are deleted once a feature is fully released.

Watch out

Common mistakes.

  1. 01

    Never removing flags, until the code is full of dead branches.

  2. 02

    Hiding a feature only in the front end while the API still serves it.

  3. 03

    Testing only the flag-on path, so turning it off breaks something.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab