‹

Constant Case Converter

Format constant names and environment keys as uppercase words separated by underscores.

Your text stays in your browser. Privacy ↗
DetectedWaiting for text
CONSTANT_CASE result

Your CONSTANT_CASE result will appear here.

Paste or type text; conversion happens automatically.
Paste or type text to see the result.

What is CONSTANT_CASE?

CONSTANT_CASE uses the same word boundaries as snake_case, but converts every detected word to uppercase.

The converter runs entirely in your browser. Your input is not uploaded or stored, and Unicode characters remain Unicode rather than being transliterated.

How this conversion works

  1. Split input at separators, punctuation, camel-case changes, and acronym boundaries.
  2. Uppercase every detected word and join the words with one underscore.
  3. Keep numbers, Unicode letters, blank lines, and multiline structure.

Constant Case Converter examples

InputOutput
maximum retry countMAXIMUM_RETRY_COUNT
apiBaseURLAPI_BASE_URL
error code 404ERROR_CODE_404
café modeCAFÉ_MODE

Common uses

  • Program constants
  • Environment variable names
  • Build and configuration flags

Constant Case Converter FAQ

Is CONSTANT_CASE the same as uppercase?

No. CONSTANT_CASE tokenizes the input and inserts underscores; uppercase only changes letter case and preserves punctuation and spacing.

Can the result include numbers?

Yes. Numbers are preserved as tokens, such as error code 404 becoming ERROR_CODE_404.