camelCase Converter

Turn phrases, snake_case, kebab-case or PascalCase into camelCase, one name per line. Ideal for JavaScript, Java and JSON keys. Free and instant.

camelCase joins words into one with no gap, starting with a lowercase letter and capitalising every later word: firstName, getUserById, isLoggedIn. The capitals show where the word boundaries are, a bit like the humps on a camel’s back, which is where the name comes from.

You will see it in JavaScript and TypeScript variables and functions, Java and Kotlin methods, Swift, and the keys of most JSON APIs. If you are naming things in those worlds, it is the convention that other developers expect.

Using the tool

Type or paste one name per line, and the converted versions come out on matching lines. Because every line is converted on its own, you can paste a whole list of database column names or spreadsheet headings and get a list of variable names back in a single step.

The input can be in any form. Spaces, hyphens, underscores and existing humps are all treated as word breaks, so these inputs all give userFirstName:

user first name, user_first_name, user-first-name, UserFirstName.

Where it can surprise you

Acronyms are the tricky part. The tool splits a word where a lowercase letter or digit is followed by a capital, so HTMLParser has no such boundary inside it and is treated as a single word, becoming htmlparser. That can be the opposite of what you want. Write it as html parser with a space and you get htmlParser, which is the form most style guides recommend: treat acronyms as ordinary words, so userId and parseUrl, not userID and parseURL.

Digits stay attached to the word before them. version2 final gives version2Final. An apostrophe counts as a separator, so “don’t stop” becomes donTStop. Remove apostrophes first if your text has contractions; remove special characters does that.

Names that start with a capital, like class names, are PascalCase. Python, Ruby and SQL columns usually prefer snake_case, CSS classes and URLs prefer kebab-case, and constants are CONSTANT_CASE. If you are not sure which you need, the case converter displays every one at once.

A last practical point. Pick one convention per project and stick to it, because the compiler will not care but the next person reading your code will.

Naming advice that goes with the style

The case is only half of a good name. In JavaScript and Java, start function names with a verb (getUser, parseDate) and give booleans a question-like prefix such as is, has or can, so isLoggedIn reads naturally inside an if. Avoid abbreviations that only you understand, since usrAcctNm saves four keystrokes and costs everyone else a minute. JSON from web APIs is usually camelCase too, which is why converting a column list such as “created at, updated at, first name” into createdAt, updatedAt, firstName is a common first step when you map a spreadsheet or a database onto an API.

Frequently asked questions

Why did HTMLParser become htmlparser?

The tool looks for a lowercase letter followed by a capital to find word breaks, and HTMLParser has none inside it. Write it with spaces, as "html parser", to get htmlParser.

Is it userId or userID?

Most style guides, including Google's, say userId: treat an acronym as one ordinary word. Older Java code often uses userID. Use whichever your project already does.

Can I convert a whole list at once?

Yes. Put one name on each line. Every line is converted separately and the output keeps the same order.