Convert identifiers and short phrases between common programming case styles: camelCase, snake_case, kebab-case, PascalCase, and CONSTANT_CASE.
How it works
The converter first splits the input into words. Boundaries come from spaces and punctuation, from underscores and hyphens, and from camelCase / PascalCase transitions (for example XMLHttpRequest becomes words that recombine cleanly). Each word is lowercased, then reassembled according to the selected style: camel joins with an initial lowercase word, pascal capitalizes every word, snake and kebab join with _ or -, and constant joins uppercase words with underscores.
When to use it
- Rename a database column style (
user_id) into a TypeScript property (userId) - Normalize CSS class names or URL segments to kebab-case
- Produce
SCREAMING_SNAKEconstants from multi-word labels - Quickly check how an API field would look after a style guide change
Limitations
This is a pragmatic identifier splitter, not a full Unicode word-break algorithm. Non-Latin scripts, emoji, and unusual acronyms may not split the way a human editor would. Empty input is rejected. Prefer reviewing generated names before committing them to public APIs.
Example
Input hello world example with style camel yields helloWorldExample. The same phrase as snake yields hello_world_example, and as constant yields HELLO_WORLD_EXAMPLE.