piapia123
en

Case & Naming Convention Converter

Text

Everything runs locally in your browser — nothing is uploaded

Input
Output

Turning one identifier into another is easy; splitting it into words correctly is the hard part. Given fooBarBaz, foo_bar_baz or FOO_BAR, the tool first has to recognise the same three words. Runs of capitals are where naive implementations fail: HTTPServer should become HTTP plus Server, not four single letters and not one long word. Words are split with that rule and then reassembled in any of eight styles.

Features

  • Eight styles: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, UPPER and lower
  • Recognises fooBarBaz, foo_bar_baz, foo-bar-baz and FOO_BAR, including inputs that mix all four
  • Splits acronyms into words: HTTPServer becomes HTTP + Server, XMLHttpRequest becomes XML + Http + Request
  • Splits letter and digit boundaries too: utf8String becomes utf8 + String, MP3Player becomes MP3 + Player
  • Converts each line independently, so a pasted column of identifiers keeps its shape
  • Results update as you type — no button to press

How to use

  1. Pick the target style
  2. Paste your identifiers, one per line if you like
  3. The result appears instantly; click Copy to take it

FAQ

How are runs of capitals split?
A run of capitals followed by a capital-plus-lowercase pair breaks before the last capital: HTTPServer splits into HTTP and Server, XMLHttpRequest into XML, Http and Request. Without that rule many implementations produce XMLHttp + Request.
What happens to non-Latin text?
It is left as it is and stays part of the word, so an identifier mixing scripts keeps its characters instead of being cut in half.
Why did __init__ become init?
Underscores are separators and the empty words beside them are dropped, leaving init as the only word, which is then lowercased for camelCase. If that loses meaning, the identifier depends on its underscores — check before converting.
Why do UPPER and lower keep my extra spaces?
They operate on the characters of each line without splitting words. Splitting and rejoining would also flatten indentation and inner spacing, which is not what those two styles should do.

Related tools