getwordcount.com

CONSTANT_CASE Converter

Convert text to SCREAMING_SNAKE_CASE.

Copied to clipboard

This CONSTANT_CASE converter uppercases your text and joins the words with underscores — turning max retry count into MAX_RETRY_COUNT. It is the convention for constants and environment variables.

How to use the CONSTANT_CASE converter

  1. Paste a phrase or an existing identifier.
  2. The CONSTANT_CASE (SCREAMING_SNAKE_CASE) version appears instantly.
  3. Copy it into your config, enum or .env file.

When to use CONSTANT_CASE

Also called SCREAMING_SNAKE_CASE, this style flags values that never change: fixed configuration keys, enum members and environment variables such as DATABASE_URL or MAX_RETRY_COUNT. The all-caps form makes constants stand out from ordinary variables at a glance.

Environment variables and .env files

The place you meet CONSTANT_CASE most often is environment configuration. Shell variables such as PATH and HOME have been uppercase since the earliest Unix systems, and .env files inherited the habit — DATABASE_URL, API_KEY, NODE_ENV. Following the convention matters in practice: libraries look variables up by exact name, so a variable saved as database url in the wrong style simply will not be found where DATABASE_URL is expected. Paste each setting name here to get the canonical uppercase form.

Examples

InputCONSTANT_CASE
max retry countMAX_RETRY_COUNT
databaseUrlDATABASE_URL
api-base-pathAPI_BASE_PATH

Frequently asked questions

What is the difference from snake_case?

CONSTANT_CASE is simply snake_case in all capitals — same underscores, uppercase letters. The snake_case converter produces the lowercase twin.

Where is CONSTANT_CASE used?

For constants and enum members in most languages, and for environment variable names in .env files and shell scripts.

Is SCREAMING_SNAKE_CASE the same thing?

Yes — SCREAMING_SNAKE_CASE and CONSTANT_CASE are two names for the identical style.

What input does it accept?

Phrases with spaces, hyphens or underscores, and camelCase identifiers — max retry count, max-retry-count, max_retry_count and maxRetryCount all become MAX_RETRY_COUNT.

Why are constants written in capitals?

It is a signal to readers: anything in full caps is fixed and should not be reassigned. Few compilers enforce it, but the convention is near-universal.

Related tools