camelCase Converter
Converts phrases or identifiers into camelCase, with the first word in lower case and each later word starting with a capital. Developers use it to turn plain-language field names into variable names. Each line is converted separately, so you can handle a whole list at once.
How to use the camelCase Converter
- Enter one phrase or identifier per line. Each line becomes one camelCase identifier.
- Copy the result into your code.
Rules applied
- Words are split at spaces, punctuation, underscores and hyphens, and at existing camelCase and acronym boundaries: XMLHttpRequest gives xml, Http, Request.
- The first word is lowercase; later words start with a capital and the rest is lowercase.
- Apostrophes are removed: don’t stop becomes dontStop. Empty lines are kept.
Limitations
- Accented and non-Latin letters are kept; some programming languages do not allow them in identifiers. Use Remove Accents first if needed.
- Identifiers that start with a digit are not valid in most languages and are not changed.
Worked examples
Input
user first name shipping_address_id XMLHttpRequest
Result
userFirstName shippingAddressId xmlHttpRequest
Input
order total (net) user-id Don't stop
Result
orderTotalNet userId dontStop
Practical uses
-
Name variables from plain phrases
A developer has a list of field names written as phrases, such as user first name. They paste the list with one phrase per line. Each line becomes a camelCase name, so the whole list can be copied into the code.
-
Convert snake_case column names
An analyst has database columns written in snake_case and needs camelCase keys for a JSON file. They paste the column names with one per line. The whole list is converted at once, which saves renaming each key by hand.
Related tools
Privacy: this tool runs entirely in your browser. Your text is not uploaded, logged or saved, and it is never sent to analytics. Maximum input: 1 MiB.