CONSTANT_CASE to camelCase converter
Paste all-caps names with underscores and get them back in camelCase.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter constant_case names (one per line or inside text).
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Each CONSTANT_CASE name is split into words at the underscores. The first word is then lowercased and each following word starts with a capital, with no separator. Symbols and spaces around the names are left as they are. Example: MAX_RETRY_COUNT becomes maxRetryCount.
Example
Result: camelCase result: maxRetryCount apiBaseUrl defaultTimeout; Names processed: 3.
MAX_RETRY_COUNT API_BASE_URL DEFAULT_TIMEOUT
maxRetryCount apiBaseUrl defaultTimeout
Limits and caveats
- Every word in the pasted text is converted, including keywords and library names, so review the result before pasting it into code.
- Arabic and other scripts without capital letters lose their word breaks in this style, so the words run together.
Questions about this tool
When do I need this conversion?
When moving environment variables such as DATABASE_URL into a config object whose keys are camelCase, like databaseUrl.
Why does API become api and not API?
Every word in CONSTANT_CASE is in capitals, so an acronym cannot be told apart and all words are treated as normal words.
What about digits, as in HTTP2_PORT?
The digit stays with the word before it, so HTTP2_PORT becomes http2Port.
