Constant Case Converter — Free Online Tool
Last updated: January 2025
What is Constant Case Converter?
CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) converts text to ALL_UPPERCASE_WITH_UNDERSCORES.
When to use Constant Case Converter?
Use CONSTANT_CASE for environment variables (.env files), PHP constants, Python constants, and configuration keys.
How to use this tool
- 1Paste your text
- 2Click 'Convert' to get CONSTANT_CASE
- 3Copy for your constants and environment variables
Examples
| Input | Output |
|---|---|
| database host | DATABASE_HOST |
| apiKey | API_KEY |
| max retry count | MAX_RETRY_COUNT |
| background-color | BACKGROUND_COLOR |
| Hello World | HELLO_WORLD |
Rules & Behavior
- All words are UPPERCASE
- Words are separated by underscores (_)
- This is essentially snake_case in all caps
Related Tools
Frequently Asked Questions
What is CONSTANT_CASE?
CONSTANT_CASE (also called SCREAMING_SNAKE_CASE or UPPER_SNAKE_CASE) uses all uppercase letters with underscores between words. Example: MAX_RETRY_COUNT.
When should I use CONSTANT_CASE?
Use it for constants in Python (MAX_VALUE), PHP (define('MAX_VALUE', 100)), environment variables (DATABASE_URL), and configuration keys.
Why is it called SCREAMING_SNAKE_CASE?
Regular snake_case is quiet (lowercase). SCREAMING_SNAKE_CASE shouts (uppercase). The 'screaming' metaphor comes from all-caps text appearing like shouting in text communication.
Is it the same as snake_case?
They use the same structure (underscores between words) but CONSTANT_CASE is all uppercase while snake_case is all lowercase.
Can I convert from camelCase to CONSTANT_CASE?
Yes, the tool detects camelCase boundaries and converts them correctly.