Coding Tools
Constant Case Converter — Convert Text to CONSTANT_CASE Online Free
Paste a phrase, an existing variable name, or a whole list of names and instantly convert it to CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) — the naming style used for environment variables, config constants, and enum members. camelCase, PascalCase, snake_case, kebab-case, and dot.case are generated at the same time.
100% Private
No Signup
Updates As You Type
Nothing Uploaded
What is CONSTANT_CASE?
Constant case (also called SCREAMING_SNAKE_CASE) is a naming convention where every word in a phrase is written in uppercase and joined together with underscores, like MAX_RETRY_COUNT or API_BASE_URL. The all-caps style makes constants visually distinct from regular variables at a glance, which is exactly why it's used so widely for values that never change during a program's execution.
CONSTANT_CASE is the standard convention for constants in Python, Java, and C/C++, for enum members in many languages, and for environment variable names almost universally — you'll see it in .env files, Docker configs, and CI/CD pipeline variables. This tool also generates camelCase, PascalCase, snake_case, kebab-case, and dot.case from the same input, so you can move a name between conventions as it moves between contexts (say, from a JSON API field to an environment variable).
How to use the Constant Case Converter
- Paste your text into the box — a single phrase, an existing variable name, or a list of names (one per line).
- Leave "Treat each line as a separate name" on to convert a list in bulk, or turn it off to treat the whole block as one phrase.
- Your CONSTANT_CASE result appears instantly in the highlighted box, with a dedicated copy button.
- Scroll down for camelCase, PascalCase, snake_case, kebab-case, and dot.case versions of the same input, each with its own copy button.
Examples
| Input | CONSTANT_CASE | snake_case |
| max retry count | MAX_RETRY_COUNT | max_retry_count |
| api-base-url | API_BASE_URL | api_base_url |
| orderTotalPrice | ORDER_TOTAL_PRICE | order_total_price |
| DatabaseConnectionTimeout | DATABASE_CONNECTION_TIMEOUT | database_connection_timeout |
Common ways people use this tool
Environment variablesGenerate correctly-formatted names for .env files, Docker, and CI/CD pipeline configs.
Python & Java constantsName module-level constants and static final fields following standard style guide rules.
Enum membersConvert a list of plain-English option names into properly formatted enum values.
Feature flagsGenerate consistent CONSTANT_CASE names for feature flag keys across a codebase.
Config & settings keysStandardize configuration constants pulled from a spec, spreadsheet, or ticket description.
Refactoring legacy codeConvert a batch of camelCase or PascalCase names to CONSTANT_CASE when extracting magic values into constants.
Cross-format API workMove a field name from a camelCase JSON API into a CONSTANT_CASE environment variable or config key.
SQL & database defaultsGenerate uppercase constant names for default values or lookup keys referenced in application code.
Frequently asked questions
What's the difference between CONSTANT_CASE and snake_case?
Both join words with underscores, but CONSTANT_CASE uppercases every letter (MAX_RETRY_COUNT) while snake_case keeps everything lowercase (max_retry_count). CONSTANT_CASE is reserved for values that don't change — constants, enums, environment variables — while snake_case is used for regular variables and functions in languages like Python.
Is CONSTANT_CASE the same as SCREAMING_SNAKE_CASE?
Yes, they're two names for the same convention: all-uppercase words joined by underscores. "SCREAMING_SNAKE_CASE" is a more playful name that plays on "snake_case", referring to how the all-caps version looks like it's shouting.
Can I convert a whole list of names at once?
Yes. Paste one name per line and keep "Treat each line as a separate name" turned on — each line is converted independently and the results are shown stacked in the same order.
Can I convert an existing camelCase or PascalCase name to CONSTANT_CASE?
Yes. The tool detects underscores, hyphens, spaces, and existing capital-letter word boundaries in your input, splits it back into individual words, and rebuilds it as CONSTANT_CASE (or any of the other five formats).
How does it handle acronyms like "ID" or "URL"?
Runs of capital letters are treated as their own word during splitting, so "apiBaseURL" is read as "api" + "Base" + "URL" and rebuilt as "API_BASE_URL" in CONSTANT_CASE.
Is my text uploaded anywhere?
No. All splitting and conversion happens locally in your browser. Nothing you type or paste is sent to a server, logged, or stored anywhere outside your own device.
Does it support languages other than English?
Word-splitting on separators (spaces, underscores, hyphens, capital letters) works the same regardless of language, and accented Latin characters are supported. Non-Latin scripts are passed through but won't be split into separate words the way Latin-alphabet text is.