Skip to content
Jellykit

Constant Case Converter

Write constant and environment variable names in CONSTANT_CASE: capital letters with underscores between words.

  • Runs on your device
Loading tool

About Constant Case Converter

Constants, enum members and environment variables are usually written as capital words joined by underscores. Paste "max retry count", maxRetryCount or max-retry-count and get MAX_RETRY_COUNT.

Each line becomes one name, so a list of settings turns into a block of variable names ready for an .env file or a constants module. Spaces, punctuation and existing case changes all mark where one word ends and the next begins.

How it works

  1. For writing styles, the text is recased in place: spacing, punctuation and line breaks are untouched.
  2. For programming styles, each line is split into words at spaces, punctuation and existing capital-letter boundaries, then rejoined in the chosen convention.
  3. Title Case keeps short joining words such as "of", "and" and "the" lowercase unless they start or end the line.

Questions

Is this the same as SCREAMING_SNAKE_CASE?

Yes. The names describe the same style: every letter in capitals and an underscore between words. It is also called upper snake case or macro case.

Will the names be valid environment variables?

For plain English input, yes. Accented and non-Latin letters are kept, and a line that starts with a digit gives a name that starts with one, and many shells reject both. Check such lines before using them.

How are the words found in camelCase input?

A new word starts at each step from a small letter or digit to a capital, and an acronym stays together, so "apiBaseURL" becomes API_BASE_URL.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.