This converter turns any text into CONSTANT_CASE — also called SCREAMING_SNAKE_CASE — where every word is uppercase and joined by underscores, like MAX_RETRY_COUNT. It is the conventional format for environment variables and named constants across many languages, so this tool is handy for normalising config keys and defining constants.
How it works
The converter detects word boundaries in your input regardless of its original style. It inserts a split before each uppercase letter (keeping acronyms intact), then splits on any non-alphanumeric separator such as spaces, hyphens and underscores. Each resulting word is uppercased, and the words are joined with _. This means plain text, camelCase, PascalCase, snake_case and kebab-case all convert cleanly.
Example
| Input | Output |
|---|---|
max retry count | MAX_RETRY_COUNT |
myVariableName | MY_VARIABLE_NAME |
api-base-url | API_BASE_URL |
parseHTMLString | PARSE_HTML_STRING |
So api-base-url becomes API_BASE_URL, ready to drop into a .env file. Everything runs in your browser, so your code never leaves your machine.