Feature Flag Config Generator

Generate feature flag configuration templates with targeting rules, percentage rollouts, and user segments. Export to LaunchDarkly, Unleash, JSON, or YAML.

About This Tool

The Feature Flag Config Generator is a free browser-based tool that helps you create feature flag configuration files for popular feature management platforms. Instead of writing JSON or YAML config by hand, you can visually define flags with names, keys, types, default values, and targeting rules, then export the configuration in your preferred format.

The tool supports four output formats: LaunchDarkly JSON (with variations, targets, and rules), Unleash JSON (with strategies and variants), Plain JSON (a minimal schema-agnostic format), and YAML (for Kubernetes ConfigMaps or general config files). Each format follows the conventions of its respective platform, so you can paste the output directly into your project.

Targeting rules let you control who sees a feature. You can set up percentage rollouts (gradually expose a feature to N% of users), user ID targeting (enable for specific users), user segments (target groups like beta testers), and environment-based rules (enable only in staging or production). Multiple flags can be defined simultaneously to build a complete configuration file.

If you need to validate the generated JSON, try the JSON Formatter. For YAML validation, the YAML Formatter can help ensure your config is well-formed. If you are converting between JSON and YAML formats, the JSON to YAML Converter handles that in one click.

All processing runs entirely in your browser. No flag configurations, feature names, user IDs, or targeting rules are ever sent to any server. This makes the tool safe to use with production flag definitions and real user identifiers.

How to Use

  1. Click Add Flag to create a new feature flag definition. Each flag starts collapsed; click the flag name to expand it.
  2. Enter a Flag Name (human-readable) and a Flag Key (the identifier used in code, e.g., dark-mode).
  3. Add a Description explaining what the flag controls.
  4. Select a Value Type: boolean (on/off), string, number, or JSON for complex payloads.
  5. Set the Default Value that will be served when no targeting rules match.
  6. Toggle the flag ON/OFF using the status button in the flag header.
  7. Click Add Rule to define targeting rules like percentage rollouts, specific user IDs, user segments, or environment filters.
  8. Choose an Output Format from the dropdown: Plain JSON, LaunchDarkly JSON, Unleash JSON, or YAML.
  9. Review the Generated Config in the output panel. Click Copy or press Ctrl+Shift+C to copy. Click Download to save as a file.

Popular Feature Flag Examples

View all feature flag examples →

FAQ

Which feature flag platforms are supported?

The tool generates configuration in four formats: LaunchDarkly JSON (following their flag representation schema), Unleash JSON (with strategies and variants), a generic Plain JSON format that works with any custom implementation, and YAML for Kubernetes ConfigMaps or general configuration files.

Can I define multiple flags at once?

Yes. Click the 'Add Flag' button to create as many flags as you need. All flags are included in the generated output. You can expand and collapse individual flags to manage large configurations easily.

What targeting rule types are available?

Four targeting rule types are supported: Percentage Rollout (expose a feature to a percentage of users), Specific User IDs (target individual users by ID), User Segment (target named groups like beta-testers), and Environment (enable only in specific environments like production or staging).

What flag value types can I use?

Flags support four value types: Boolean (true/false toggle, the most common), String (for text values like color themes or banner messages), Number (for numeric configuration like rate limits), and JSON (for complex structured payloads like feature configuration objects).

Can I use this output directly in LaunchDarkly or Unleash?

The generated configuration follows the schema conventions of each platform and can serve as a starting template. For LaunchDarkly, the output matches their flag representation format. For Unleash, it follows the features API schema. You may need to adjust some fields depending on your specific project setup and SDK version.

Is my data safe?

Yes. All configuration generation runs entirely in your browser using JavaScript. No data -- including flag names, user IDs, segment names, or any targeting rules -- is ever sent to any server. You can verify this by checking the Network tab in your browser's developer tools while using the tool.

How do I implement a gradual rollout?

Add a Percentage Rollout targeting rule to your flag. Use the slider to set the percentage of users who should see the feature. Start with a low percentage (e.g., 5%) and gradually increase it. The generated config includes the rollout percentage in the appropriate format for your chosen platform.

Related Tools