Home / Tools / Coding Tools / Constant Case Converter

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
Your text or variable names
0 lines
Treat each line as a separate name (turn off to convert the whole block as one phrase)
CONSTANT_CASEEnv vars / config constants / enums

    
Also generated

Features

🔠

CONSTANT_CASE front and center

The CONSTANT_CASE result is featured prominently with its own one-click copy button — no digging through a list of formats to find it.

🧩

Five extra formats included

Also get camelCase, PascalCase, snake_case, kebab-case, and dot.case generated from the same input, free.

📋

Bulk list conversion

Paste a whole list of names, one per line, and convert every one of them to CONSTANT_CASE at once instead of doing it name by name.

🔍

Smart word detection

Recognizes existing camelCase, PascalCase, kebab-case, and spaced text as input, and splits it back into words correctly before converting.

Instant, live conversion

Results update the moment you type or paste — no button to click, no page reload.

🔢

Handles numbers and acronyms

Keeps digits attached sensibly and treats runs of capital letters (like "ID" or "URL") as their own word when splitting.

🧪

Example input to try

No text handy? Load a sample list of mixed-format names with one click to see the conversion in action.

🔒

100% private

Every conversion happens locally in your browser. Nothing you type is ever uploaded, logged, or sent to a server.

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

  1. Paste your text into the box — a single phrase, an existing variable name, or a list of names (one per line).
  2. 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.
  3. Your CONSTANT_CASE result appears instantly in the highlighted box, with a dedicated copy button.
  4. Scroll down for camelCase, PascalCase, snake_case, kebab-case, and dot.case versions of the same input, each with its own copy button.

Examples

InputCONSTANT_CASEsnake_case
max retry countMAX_RETRY_COUNTmax_retry_count
api-base-urlAPI_BASE_URLapi_base_url
orderTotalPriceORDER_TOTAL_PRICEorder_total_price
DatabaseConnectionTimeoutDATABASE_CONNECTION_TIMEOUTdatabase_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.

Related tools