Case Converter Switch text between UPPER, lower, Title, camelCase and more — free, instant, private.

CONSTANT_CASE Converter

Turn any phrase into CONSTANT_CASE — free, instant, runs in your browser.

0 words, 0 characters

What is CONSTANT_CASE?

CONSTANT_CASE writes every word in uppercase and joins them with underscores. It is also known as SCREAMING_SNAKE_CASE, MACRO_CASE or simply upper snake case.

CONSTANT_CASE examples

Where is CONSTANT_CASE used?

CONSTANT_CASE is the convention for constants in C, C++, Java, JavaScript and Python, for preprocessor macros, and above all for environment variables and configuration keys: DATABASE_URL, MAX_RETRY_COUNT, NODE_ENV. Files like .env and CI pipeline configs are full of it.

Why a special case for constants?

The loud style is deliberate: a fully capitalized name stands out in a file and signals "this value is fixed — do not reassign it". The convention goes back to C macros and has been kept by style guides ever since.

Common mistakes when converting case

Pro tips

Frequently asked questions

What other names does CONSTANT_CASE have?

It is most often called SCREAMING_SNAKE_CASE because it looks like snake_case shouting in all caps. Some communities also say MACRO_CASE or upper snake case.

What is the difference between CONSTANT_CASE and snake_case?

Both join words with underscores, but snake_case is all lowercase (max_retry_count) while CONSTANT_CASE is all uppercase (MAX_RETRY_COUNT). snake_case names variables; CONSTANT_CASE names values that never change.

Why are environment variables written in CONSTANT_CASE?

The habit comes from Unix shell and C conventions, where capitals marked macros and exported variables. The style stuck because it makes configuration values instantly recognizable in code and config files.

Other case converters

Or switch between every style in one place on the Case Converter homepage.