Constant Case Converter
Convert text and identifiers to uppercase CONSTANT_CASE online for constants, environment variables, macros, and configuration names. Read more
Convert text to CONSTANT_CASE
Constant case converts recognized words to uppercase and separates them with underscores. Hello world example becomes HELLO_WORLD_EXAMPLE.
Also called screaming snake case or MACRO_CASE, it is frequently used for constants, environment variables, preprocessor macros, feature flags, and configuration names.
How to create constant case
- Enter a phrase, camelCase value, or another identifier.
- Convert its word boundaries to uppercase underscore-separated words.
- Check the result against the target platform’s naming requirements.
The convention suggests that a value is constant but does not enforce immutability. Programming-language semantics and application behavior determine whether it can actually change.
Constant case FAQ
How is it different from uppercase text?
Upper Case preserves spaces and punctuation. Constant case normalizes word separators to underscores.
Is CONSTANT_CASE required for constants?
No. It is a convention whose use varies by language and project style guide.
Are environment variable names portable?
Not automatically. Shells and operating systems may impose additional character, case-sensitivity, and length rules.