Open tools · 0

About

camelCase Converter

Paste a phrase, a snake_case or kebab-case name, or a column of them one a line, and each comes back in camelCase: user first name becomes userFirstName. The words are found at spaces, underscores, hyphens and changes of case, so XMLHttpRequest splits into XML, Http and Request before it is put back together.

What it does

  • Acronyms are split where the capitals change and lowered: XMLHttpRequest becomes xmlHttpRequest, and userID becomes userId.
  • Numbers stay in place, and two in a row keep an underscore between them, so version 1.2 release becomes version1_2Release.
  • An apostrophe inside a word is dropped, so don’t stop becomes dontStop.
  • Accented letters are kept, as JavaScript, Java and Python allow them: café menu becomes caféMenu.
  • With the Turkish switch on, istanbul ili becomes istanbulİli, its capital spelled as Turkish spells it.
  • PascalCase, the same with a capital first, is one choice away, for classes and components.

How to use it

  1. Paste the names, one a line.
  2. Pick camelCase, or PascalCase for a class name.
  3. Copy the result, or press Use as text to convert it again.

What it does not do

  • An acronym kept in capitals: userID comes out userId, the form Google’s Java and JavaScript style guides ask for.
  • Emoji and symbols in a name: they are dropped, since most languages refuse them in one.

Questions

What is the difference between camelCase and PascalCase?

In camelCase the first letter is lower case, as in firstName, the form for variables and functions in JavaScript and Java. PascalCase starts with a capital, as in FirstName, for classes, types and React components.

How do I convert snake_case to camelCase?

Paste the snake_case names, one a line, and pick camelCase: total_price_usd becomes totalPriceUsd. The underscores mark the words, and each word after the first gets a capital.

Can it convert a whole column?

Yes. Each line is converted on its own, so a list of database columns or JSON keys pasted from a spreadsheet comes back as a list of camelCase names, line for line.

Everything here runs in your browser. Nothing you type, paste or open is uploaded, and there is no account and no queue. How that works.

Often used with

  • Regex Tester: a pattern that finds the snake_case names left in code
  • JSON Formatter: the JSON whose keys were renamed, checked and tidied

More in Text Tools

  • Word Counter: Count words, characters, sentences and paragraphs as you type, with reading time, keyword density and readability.
  • Text Compare: Compare two texts or files and see every difference, side by side or inline, word by word, with case and spaces ignored if you like.
  • Notepad: Notes kept in your browser and nowhere else, written in Markdown with a preview, locked with a password if you like, saved as .md, .html or .txt.
  • DOCX Viewer: Open a Word document in your browser, read it on its pages with its tracked changes and comments, and save it as a PDF.

All toolsAbout utilbrewPrivacy