camelCase Converter

Convert text to camelCase for JavaScript variables and JSON keys. Free online camelCase converter, no signup required.

🔒 Your text stays in your browser - nothing is sent to our servers
Input
0Characters
0No spaces
0Words
0Sentences
0Lines
< 1 minRead time
Result
How to Use

Three steps to get started

1

Paste your text

Enter text separated by spaces, underscores, hyphens, or any delimiter.

2

Converts to camelCase

First word lowercased, each subsequent word capitalized, all separators removed.

3

Copy the identifier

Click Copy and paste directly into your code editor.

About This Tool

camelCase: the standard for JavaScript and JSON

camelCase is a naming convention in which a multi-word identifier is written with no separators, the first word entirely lowercase and every subsequent word beginning with a capital letter - maxRetryCount, getUserById. It is also called lower camel case or dromedary case, to distinguish it from PascalCase (upper camel case). The convention predates modern languages: it appears in Smalltalk-80 in the early 1980s and was carried into Java, and from there into most of the C-family ecosystem.

Where it is the documented house style:

  • JavaScript / TypeScript - variables, functions, object keys, and React props; enforced by ESLint's camelcase rule and by the Airbnb and Google style guides
  • Java - fields and methods per the Oracle Code Conventions (classes stay PascalCase, constants stay SCREAMING_SNAKE)
  • Swift and Kotlin - properties and functions, per the official API design guidelines of both languages
  • JSON APIs - the dominant key style in JavaScript-first APIs (Stripe, GitHub REST v3 mixes both; Google's JSON style guide mandates camelCase)
  • CSS-in-JS and the DOM - backgroundColor, zIndex, onClick, because hyphens are not valid JS identifiers

The acronym problem

The one genuinely ambiguous case is initialisms. Should an HTTP URL parser beparseHTTPURL or parseHttpUrl? Google's Java style guide and the Swift API design guidelines both say to treat an acronym as an ordinary word:parseHttpUrl, userId, xmlHttpRequest. The reason is mechanical - parseHTTPURL has no recoverable word boundary between HTTP and URL, so any tool that splits identifiers back into words (search, autocomplete, code generators, a converter like this one) will guess wrong. The historical counterexample is the browser's own XMLHttpRequest, which is inconsistent with itself and is regularly cited as a mistake. This converter follows the treat-as-a-word rule, soHTML Parser yields htmlParser.

Feed it any format. It splits on spaces, hyphens, underscores, dots, and the lowercase-to-uppercase transition, so hello world, hello-world,hello_world, Hello World, and HelloWorld all converge on helloWorld. That makes it useful for bulk-renamingsnake_case database columns into JSON response keys, or turning a plain English requirement line into a function name. If you need the capitalized first letter, use the PascalCase converter; for snake_case or kebab-case output, those converters live alongside this one.

FAQ

Frequently Asked Questions

Related Tools