Constant Case Converter
Convert any text to CONSTANT_CASE (SCREAMING_SNAKE_CASE). The standard for constants, env vars, and configuration keys.
Options
What Is Constant Case (SCREAMING_SNAKE_CASE)?
Constant case, also known as SCREAMING_SNAKE_CASE or UPPER_SNAKE_CASE, uses uppercase letters with underscores between words: MAX_RETRY_COUNT, API_BASE_URL, DATABASE_HOST.
It is the universal convention for constants, configuration values, and environment variables across virtually all programming languages.
Where Constant Case Is Used
- Constants in Python, Java, C, C++, JavaScript, Go, Rust
- Environment variables (
NODE_ENV,DATABASE_URL) - Preprocessor macros in C/C++ (
#define MAX_BUFFER_SIZE) - Enum values in many languages
- Docker environment variables
- GitHub Actions and CI/CD secrets
- .env file keys
Constant Case by Language
| Language | Example | Used For |
|---|---|---|
| Python | MAX_CONNECTIONS = 100 | Module-level constants |
| JavaScript | const API_KEY = "..." | Constants, config |
| Java | static final int MAX_SIZE = 50 | Class constants |
| C/C++ | #define BUFFER_SIZE 1024 | Macros, constants |
| Rust | const MAX_THREADS: u32 = 8 | Constants |
| Go | MaxRetries = 3 | Exported constants (PascalCase in Go) |
Constant Case vs snake_case
Both use underscores as separators. The only difference is letter case: constant case is ALL UPPERCASE (MAX_VALUE), while snake_case is all lowercase (max_value). This visual distinction immediately tells developers whether a name is a constant or a variable.
FAQ
Why are constants uppercase?
The convention dates back to C programming, where preprocessor macros (which could not be changed at runtime) were written in uppercase to distinguish them from regular variables. The pattern became universal across languages.
Related Tools
Slug Generator
Convert text to URL slugs
URL Slug Generator
Create SEO-friendly URL slugs
Text to Slug
Transform any text into a slug
Kebab Case Converter
Convert text to kebab-case
Slugify Online
Slugify text instantly online
Permalink Generator
Create clean permanent URLs
Snake Case Converter
Convert text to snake_case
CamelCase Converter
Convert text to camelCase
Title Case Converter
Capitalize text in title case
Sentence Case Converter
Convert text to sentence case
Case Converter
Convert text to any case format
Alternating Case
Convert text to aLtErNaTiNg CaSe
PascalCase Converter
Convert text to PascalCase
Dot Case Converter
Convert text to dot.case
JSON Keys to camelCase
Convert JSON keys to camelCase
JSON Keys to snake_case
Convert JSON keys to snake_case
WordPress Slug Generator
Generate slugs for WordPress
Blog Slug Generator
Generate slugs for blog posts
Product Slug Generator
Generate slugs for product pages
Plain Text Converter
Strip formatting, clean text
Duplicate Line Remover
Remove duplicate lines from text
Remove Empty Lines
Remove blank lines from text
Sort Lines Alphabetically
Sort text lines A-Z or Z-A
Remove Line Breaks
Join lines into one paragraph