Case Converter

Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title Case and Sentence case, one line at a time or all at once.

About this tool

Renaming a variable from user_account_id to userAccountId, turning a heading into a URL slug, or normalising a list of database columns into CONSTANT_CASE is tedious by hand and easy to get subtly wrong. This converter turns text into camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title Case, Sentence case, lower case or UPPER CASE as you type. It understands existing word boundaries - separators, camelCase humps and acronyms - so it can convert from any style to any other. Everything runs in your browser.

How to use it

  1. Paste or type your text into the Input box. It can be one identifier or a whole list with one per line.
  2. Click the case style you want. The output updates immediately, and the selected style is highlighted.
  3. Leave "Convert each line separately" on to treat every line as its own identifier, or turn it off to join the whole text into one value (useful for turning a sentence into a slug or a camelCase name).
  4. Click Copy to put the result on your clipboard.

FAQ

How does it find the words in my input?

It splits on anything that is not a letter or digit (spaces, underscores, hyphens, dots, slashes), on lower-to-upper transitions (userId becomes user, Id), and between an acronym and the next word (XMLHttpRequest becomes XML, Http, Request). Digits are split from letters, so version2Beta becomes version, 2, Beta.

What happens to acronyms like API or URL?

The words are re-cased as a whole, so getAPIKey becomes get_api_key in snake_case and getApiKey in camelCase. Style guides differ on whether an acronym should stay uppercase in camelCase (getAPIKey versus getApiKey); this tool uses the capitalise-only-the-first-letter form.

What is the difference between camelCase and PascalCase?

Both join words without separators and capitalise each word. camelCase starts with a lowercase first word (userAccountId) and is common for variables and functions in JavaScript and Java. PascalCase capitalises the first word too (UserAccountId) and is the usual choice for class, type and component names.

Can I convert many lines at once?

Yes. With "Convert each line separately" on, every line is converted on its own and blank lines are kept, so you can paste a column of names and get a column back. Upper and lower case always apply to the whole text.

Does it handle non-English letters?

Yes. Words are detected using Unicode letters and digits, so accented and non-Latin letters are kept. Punctuation and emoji are treated as separators and dropped in the identifier styles.

Is my text sent anywhere?

No. The conversion is a few lines of JavaScript running in your browser tab, so source code, column names and internal identifiers never leave your device.

Related tools

Guides & comparisons

← All tools · Blog · Cheat sheets · FAQ