Screaming Snake Case Converter

code
Loading feedback…

Screaming Snake Case Converter: paste names in any style (camelCase, kebab-case, plain words) and get SCREAMING_SNAKE_CASE constants and env variable names. One name per line for bulk.

Last updated: October 5, 2026•Author: Mateo Díaz•Reviewed by: Riley Williams
Updates as you typePrivate: stays in your browser
Try an example:
Prefix
More options
Copy your constant

Your name appears here

apiBaseUrl → API_BASE_URL

This screaming snake case converter changes any name into SCREAMING_SNAKE_CASE. Type a phrase, a camelCase variable or a kebab-case key. The tool makes an uppercase name with an underscore between each word. Paste a list with one name on each line to convert all of the names at the same time.

Convert Names to SCREAMING_SNAKE_CASE

Type or paste names in the box. The tool shows the result immediately. Click Copy for one name or Copy all for a list.

Input:

userId
apiBaseUrl
max-retry-count
XMLHttpRequest
database url

Output:

USER_ID
API_BASE_URL
MAX_RETRY_COUNT
XML_HTTP_REQUEST
DATABASE_URL

What Is Screaming Snake Case?

Screaming snake case is a naming style for code. It has two rules:

  • All letters are uppercase.
  • An underscore (_) separates each word.

The name comes from snake_case. snake_case also uses underscores, but with lowercase letters. The uppercase letters look like "screaming" text. Other names for the same style are UPPER_SNAKE_CASE, CONSTANT_CASE and MACRO_CASE.

StyleExample
SCREAMING_SNAKE_CASEMAX_FILE_SIZE
snake_casemax_file_size
camelCasemaxFileSize
PascalCaseMaxFileSize
kebab-casemax-file-size

The Also as row under the result shows the first name in these other styles. Click a style to copy it.

When to Use SCREAMING_SNAKE_CASE

Constants

Many style guides use SCREAMING_SNAKE_CASE for values that do not change. Examples are JavaScript and TypeScript, Python (PEP 8), Java, C and C++.

const MAX_RETRY_COUNT = 3;

Environment variables

Shells, Docker, CI systems and .env files use SCREAMING_SNAKE_CASE for environment variable names.

DATABASE_URL=postgres://localhost/app
STRIPE_SECRET_KEY=sk_test_123

Feature flags and config keys

Teams use the same style for feature flags and configuration keys, for example ENABLE_NEW_CHECKOUT.

Make Environment Variable Names

Frameworks show only variables with a special prefix to the browser:

  • Next.js: NEXT_PUBLIC_
  • Vite: VITE_
  • Create React App: REACT_APP_

Click a Prefix chip to add the prefix to each name. To use a different prefix, type it in More options. If a name already has the prefix, the tool does not add it again.

To make .env lines, set .env lines to on in More options. The tool keeps each value after the = sign.

Input (prefix VITE_, .env lines on):

apiUrl=https://api.example.com
debugMode=true

Output:

VITE_API_URL=https://api.example.com
VITE_DEBUG_MODE=true

Click Download .env to save the result as a file.

How the Converter Splits Words

The converter starts a new word at:

  • a space, a hyphen (-), a dot (.) or an underscore (_)
  • an uppercase letter after a lowercase letter: userName becomes USER_NAME
  • the last capital of an acronym: XMLHttpRequest becomes XML_HTTP_REQUEST

Other rules:

  • Numbers stay with the word before them. base64Url becomes BASE64_URL.
  • Accents are removed. café becomes CAFE.
  • Apostrophes are removed. don't stop becomes DONT_STOP.
  • Symbols are removed. The tool never makes two underscores together or an underscore at the start or the end.
  • Correct names do not change. API_KEY stays API_KEY.

Common Mistakes

  • The name starts with a number. Most languages and shells do not accept 2FA_CODE. Add a word or a prefix first, for example APP_2FA_CODE. The tool shows a warning for these names.
  • The name has a space or a hyphen. API-KEY is not a valid constant or variable name in most languages. Use API_KEY.
  • The browser prefix is missing. Next.js and Vite do not show a variable to browser code without NEXT_PUBLIC_ or VITE_.
  • Secrets have a public prefix. A variable with NEXT_PUBLIC_ or VITE_ goes into the browser code. Do not put secret keys in these variables.

Explore More Free Developer Tools

Your names stay in your browser. The tool does not send them to a server.

Paste your names above and copy your SCREAMING_SNAKE_CASE constants now.

Frequently Asked Questions
Screaming snake case is a naming style. All letters are uppercase and an underscore separates each word, for example MAX_RETRY_COUNT. Other names for it are SCREAMING_SNAKE_CASE, UPPER_SNAKE_CASE, CONSTANT_CASE and MACRO_CASE.
Use it for constants and environment variables. JavaScript, TypeScript, Python, Java, C and C++ style guides use it for values that do not change. Shells, Docker and .env files use it for environment variable names such as DATABASE_URL.
The converter starts a new word at each uppercase letter that follows a lowercase letter. It keeps acronyms together, so XMLHttpRequest becomes XML_HTTP_REQUEST and userID becomes USER_ID. It also starts a new word at spaces, hyphens, dots and underscores.
A number stays with the word before it. So base64Url becomes BASE64_URL and sha256Hash becomes SHA256_HASH. Most languages do not let a constant start with a number. The tool shows a warning for these names.
Yes. Type or paste one name on each line. The tool converts each line. Click Copy all to copy the full list, or click the copy button next to one name.
Click a prefix chip under the box, or type your own prefix in More options. The tool adds the prefix to each name. If a name already starts with the prefix, the tool does not add it again.
Both styles put an underscore between words. snake_case uses lowercase letters, for example user_name. SCREAMING_SNAKE_CASE uses uppercase letters, for example USER_NAME. Many teams use snake_case for variables and SCREAMING_SNAKE_CASE for constants.