Free · No sign-up · Runs in your browser

CONSTANT_CASE Converter

CONSTANT_CASE — also known as SCREAMING_SNAKE_CASE, upper snake case, or macro case — joins uppercase words with underscores: MAX_RETRY_COUNT. Paste your text below and click CONSTANT_CASE.

0 chars0 words0 lines

Example

Inputthe quick brown fox jumps over the lazy dog
OutputTHE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG

Where it is used

  • Environment variablesDATABASE_URL, NEXT_PUBLIC_API_KEY. This is near-universal across every operating system and deployment platform.
  • Compile-time constants in Java, C, C++, C#, and Go.
  • Module-level constants in Python and Ruby, where the all-caps name signals "do not reassign this".
  • C and C++ preprocessor macros, which is where the alternative name "macro case" comes from.
  • Enum members in many languages and style guides.

Generating .env variable names

Paste a list of plain-English setting names — one per line — and convert the whole list in one click. "database url", "stripe secret key", and "max upload size" become DATABASE_URL, STRIPE_SECRET_KEY, and MAX_UPLOAD_SIZE, ready to paste straight into a .env file or a deployment dashboard.

Why all-caps for constants?

The convention long predates modern editors: before syntax highlighting could distinguish a constant from a variable, capitals were the only visual cue that a value was fixed. It stuck because it still works — an all-caps identifier in the middle of a function immediately tells a reader that the value comes from configuration rather than local state, without needing to trace where it was defined.


Frequently asked questions