Why naming conventions exist
Every language ecosystem settled on a different default casing: camelCase in JavaScript and Java, snake_case in Python and Ruby, kebab-case in CSS classes and URLs, and PascalCase for C# types and React components. When data crosses a boundary — a JSON API consumed by a Python service, a database column rendered in a React form — you convert between these conventions constantly. Getting it wrong doesn't just look sloppy: two fields that differ only by casing can collide in case-insensitive contexts, silently overwriting each other.
The four conventions at a glance
| Style | Example | Typical home |
|---|---|---|
| camelCase | userName | JavaScript, Java, Swift |
| PascalCase | UserName | C#, TypeScript types, React components |
| snake_case | user_name | Python, Ruby, SQL columns, env vars |
| kebab-case | user-name | CSS, URLs, file names, HTML attributes |
The hard part: acronyms and digit boundaries
Mechanical conversion breaks on boundaries a human sees instantly. parseHTTPResponse should become parse_http_response — not parse_httpresponse or parse_h_t_t_p_response. The three ambiguous cases are:
- Acronyms:
userID→user_id(theIDis one word, noti_d) - Digits:
oauth2Token→oauth2_token, andsha256Hash→sha256_hash - Sequential capitals:
getHTTP2Clientrequires treatingHTTP2as a unit before splitting
A correct converter tokenises the input into words first — using upper-to-lower transitions as boundaries, keeping runs of capitals together — and only then re-joins with the target separator. Naive character-by-character splitting produces the wrong answer on every acronym.
Collisions and information loss
Note that conversion is not always reversible: already_http_response and alreadyHTTPResponse both map to already_http_response, and XMLParser vs XmlParser become identical in snake_case. If you're generating identifiers (database columns, API fields), run the conversion once, store the result, and never re-convert.
Practical workflow
Paste your identifiers into the Case Converter — it handles acronyms and digit boundaries correctly, shows all target styles at once, and processes whole lists (one identifier per line) for API-payload and schema migrations. Everything runs client-side, so propietary field names never leave your machine.