Validate feature flag names
Paste a flag name and see at once whether it follows the convention: enable-checkout-express passes, with the prefix enable and three lowercase segments. Capitals, mixed separators or a bare word fail with a list of reasons. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Name
- enable-checkout-express
- Style
- kebab
- Prefix
- enable
- Segments
- enable, checkout, express
- Segment count
- 3
Feature flags (also called feature toggles, gates, or kill switches) only stay manageable when every name follows one shared convention. Mixed case, camelCase leftovers, random acronyms, and flags without a verb or area prefix make search hard, break dashboards, and cause collisions between teams.
Why one naming convention keeps flags manageable
Feature flags, also called toggles, gates or kill switches, only stay manageable when every name follows the same rules. Mixed capitals, camelCase leftovers, random acronyms and flags without a verb or area prefix make searching hard, break dashboards and cause clashes between teams. This checker treats a flag name as a short machine identifier, not a sentence: lowercase letters and digits with a single separator style. The first segment must be a known descriptive prefix such as enable, disable, show, hide, rollout, beta, experiment or kill, so anyone reading the name knows what kind of switch it is.
What fails, and how to clean up old flags
A name fails when it is empty, holds an uppercase letter, a space, a slash or punctuation, mixes hyphens with underscores, has fewer than two segments, starts with an unknown prefix or runs past 64 characters. Separators at the edges or doubled in the middle are rejected too, which keeps generated code and search filters simple. Every miss comes back as an ordered list of issues, so you can check a batch of legacy camelCase or all-caps flags and plan the renames one by one.
What the naming convention requires
A feature flag name under this convention is a short machine identifier, not free prose. Mixing hyphens and underscores in the same name is a hard fail, as is any uppercase letter, space, slash, or punctuation. Third, the name must split into at least two non-empty segments so that a bare word like checkout never ships as a flag; teams need a prefix plus a descriptive body.
Fourth, the first segment must be a known descriptive prefix drawn from common catalogues: enable, disable, show, hide, allow, deny, use, is, has, can, feature, ff, exp, experiment, rollout, beta, alpha, new, legacy, dark, light, ops, ui, api, web, mobile, backend, frontend, gate, toggle, flag, release, kill, killswitch, perm, or temp. Fifth, length is capped at sixty-four characters to stay friendly to config stores, environment variables, and URL query parameters. Leading, trailing, or doubled separators are rejected so generated code and regex filters stay simple.
What you can do with it
Migration and cleanup scripts
Batch-check legacy camelCase or UPPER_SNAKE flags and emit a machine-readable issues list for each rename candidate.
FAQ
What happens if the name is empty?
Empty or whitespace-only names cannot be evaluated against the convention.
Which descriptive prefixes are allowed?
Common catalogue prefixes such as enable, disable, show, hide, feature, ff, exp, experiment, rollout, beta, api, ui, gate, toggle, release, kill, and similar area or intent markers listed by the checker.
Can I mix hyphens and underscores in one flag name?
No. A name must use one separator style from start to end, hyphens or underscores, never both. Mixing them is a hard fail, just like an uppercase letter, a space, a slash or any punctuation mark.
Why is a single word like checkout rejected as a flag name?
The convention needs at least two non-empty segments: a known prefix such as enable or rollout, then a descriptive body. A bare word says nothing about what kind of switch it is or which area of the product owns it.
How long can a feature flag name be?
Up to 64 characters. The limit keeps names easy to handle in configuration files, environment variables and web addresses. Separators at the start or end of a name, or two in a row, are rejected as well.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/feature-flag-name-validate \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"enable-checkout-express"}'const res = await fetch("https://api.kit.forhosting.com/dev/feature-flag-name-validate", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "enable-checkout-express"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/feature-flag-name-validate",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"name": "enable-checkout-express"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/feature-flag-name-validate", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"name":"enable-checkout-express"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"name":"enable-checkout-express"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/feature-flag-name-validate", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"name": "enable-checkout-express"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.feature_flag_name_validate",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This capability validates a candidate name against a practical industry pattern: the name must be non-empty, entirely lowercase, written either as hyphenated kebab-case or as snake_case (never both separators in one string), contain at least two segments, start with a descriptive prefix such as enable, feature, ff, rollout, or beta, stay within sixty-four characters, and avoid edge or consecutive separators. Empty input fails with invalid_input and is not billed. Convention misses return a structured success payload with valid set to false and an ordered issues list so continuous integration can fail the build with a clear report.
What the naming convention requires
First, it must not be empty or whitespace-only: an empty name is rejected immediately as invalid_input because there is nothing useful to evaluate. Second, every character must be lowercase ASCII letters, digits, and exactly one style of separator—either hyphens for kebab-case or underscores for snake_case. Together these rules map cleanly onto LaunchDarkly-style keys, Unleash toggles, and most in-house JSON or YAML flag files without inventing a vendor-specific dialect.
Input contract, response shape, and error behaviour
The example value enable-checkout-express is a valid kebab-case flag with the enable prefix. When the name meets every rule, valid is true, issues is an empty array, and style is kebab or snake. Numbers are coerced to strings; objects and arrays are rejected. On success the response always includes valid (boolean), the echoed name after trim, style (kebab, snake, or null when the pattern could not be classified), prefix (first segment or null), segments as an ordered string array, segment_count, has_descriptive_prefix, issues as a stable ordered list of machine-readable codes, and a short convention sentence suitable for UI display. When the name is present but breaks the convention, valid is false and issues lists codes such as not_lowercase, mixed_separators, missing_descriptive_prefix, too_few_segments, invalid_characters, consecutive_separators, leading_or_trailing_separator, too_long, missing_separator_segments, or invalid_pattern—without throwing—so linters and pull-request bots can print every problem at once. Only empty, missing, or non-string names throw invalid_input; those failures do not consume prepaid balance.
Where feature flag name validation earns its keep
Platform and developer-experience teams wire this check into scaffolding generators so new flags cannot land without a prefix and separator style. Continuous integration jobs scan pull requests that touch flag catalogues or environment sample files and fail the build when a name would confuse operators six months later. Product analytics and experiment tooling use the same rules when registering rollout keys so dashboards group by prefix consistently across mobile, web, and backend. Code review bots call the API with a candidate string and paste the issues list into the review thread instead of arguing style by taste. Because every successful call costs the published $0.002 base price with no model tokens, you can validate thousands of names in a migration script without surprising spend; empty submissions stay free of charge as client errors. Keep the prefix table aligned with your org’s house style by mapping internal verbs onto the supported set, or wrap this endpoint and reject any prefix your policy forbids even when the base convention passes.
Integration use cases
CI lint for flag catalogues
Scan YAML or JSON flag files in pull requests and fail the build when any name is empty, mixed-case, or missing a descriptive prefix.
Scaffolding and CLI generators
Validate the name a developer types before writing enable-foo-bar into config, SDK stubs, or feature toggle dashboards.
Technical questions
What is a valid feature flag name?
A non-empty lowercase string in kebab-case or snake_case, at least two segments, first segment a descriptive prefix (for example enable, feature, or ff), max 64 characters, no mixed separators.
Are camelCase or PascalCase names accepted?
No. Uppercase letters produce not_lowercase in the issues list and valid is false. Convert to kebab-case or snake_case first.
What does the feature flag name validator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid empty input is not billed.