Skip to content
Case Converter Online

CONSTANT_CASE Converter

CONSTANT_CASE (sometimes called SCREAMING_SNAKE_CASE) uppercases every word and joins them with underscores—the classic look for environment variables, build flags, and enum-style constants that should stand out from ordinary variables.

0 words0 characters0 lines
Convert to

Example

Input

max upload size megabytes

Output

MAX_UPLOAD_SIZE_MEGABYTES

How the conversion works

Words are split with the same identifier rules as snake_case, then each piece is uppercased. “max retry count” becomes MAX_RETRY_COUNT. Acronyms split cleanly so XMLHttpRequest becomes XML_HTTP_REQUEST instead of a single jammed token that is hard to read in logs. Reviewers can read MAX_RETRY_COUNT aloud without decoding a compressed camelCase blob. The result is easier to spot in logs than a compressed camelCase token of the same words.

When CONSTANT_CASE helps

Reach for it in `.env` keys, CI configuration, feature flags, and shared constants. Prefer camelCase or snake_case for values that change often or for public API fields aimed at JavaScript clients. Consistency matters more than the specific convention—pick one and stick to it inside a repo. Infrastructure-as-code templates often expect screaming snake keys; convert phrases before committing. Shared constants and feature flags are typical homes; mutable values usually are not.

Keep secrets local

Even though this page never uploads text, avoid pasting live production secrets into any web tool. Use placeholder names when drafting (API_KEY_PLACEHOLDER), convert them, then replace values in your secret manager. Convert names only—keep real secret values in a vault or local environment file.

Common use cases

Frequently asked questions

Is CONSTANT_CASE the same as SCREAMING_SNAKE_CASE?

Yes. Both mean uppercase words separated by underscores.

How do I get snake_case instead?

Choose the snake_case button for lowercase words with underscores.

Are hyphens kept?

Hyphens act as separators. “max-upload” becomes MAX_UPLOAD.

Can I undo if I convert the wrong block?

Yes. Hit Undo to restore the previous snapshot without reloading the page.