gettoolz.app

camelCase to SCREAMING_SNAKE_CASE

Convert camelCase to SCREAMING_SNAKE_CASE in your browser: databaseUrl becomes DATABASE_URL. With 6 examples, acronyms and digits included — one of them does not convert back unchanged, and the page shows why. Free, nothing uploaded.

Part of writing tools and developer tools.

Your text

camelCase

databaseUrl

PascalCase

DatabaseUrl

snake_case

database_url

SCREAMING_SNAKE_CASE

DATABASE_URL

kebab-case

database-url

Title Case

Database Url

Sentence case

Database url

lower case

database url

UPPER CASE

DATABASE URL

camelCase to SCREAMING_SNAKE_CASE examples

camelCase to SCREAMING_SNAKE_CASE examples
camelCaseSCREAMING_SNAKE_CASECopy
databaseUrlDATABASE_URL
maxRetriesMAX_RETRIES
apiBaseURLAPI_BASE_URL
defaultTimeoutMsDEFAULT_TIMEOUT_MS
enableNewCheckoutENABLE_NEW_CHECKOUT
jwtSecretJWT_SECRET

One row does not survive the round trip back to camelCase: API_BASE_URL comes back as apiBaseUrl, not apiBaseURL. The converter keeps only the words, lowercased, so the capitals of an acronym and the place of a separator before a digit are gone once the text is converted.

Where you convert camelCase to SCREAMING_SNAKE_CASE

Constants and environment variables. A setting read in code as databaseUrl is usually supplied as DATABASE_URL in the environment or a .env file, and a value like maxRetries is written MAX_RETRIES once it is frozen as a module-level constant — the convention of Java, C, Python and most JavaScript style guides alike. Redux action types and feature-flag names are spelled the same way.

How the conversion works

The converter first reads apiBaseURL as the words api / base / url — splitting on spaces, underscores and hyphens, before every capital that follows a lowercase letter or a digit, and before the last capital of a run that starts a new word (HTTPResponse is HTTP / Response). Then it uppercases every word and joins them with underscores: API_BASE_URL. Since it starts from the words and not from the camelCase spelling, text already in any other case gives the same result.

Other conversions

Or open the full case converter and see your text in all nine cases at once.