Naming a variable from a plain phrase means joining the words and fixing the capitals by hand.
This converter does it for you: it strips separators, joins the words and lower-cases the first one to produce camelCase.
How to use Camel Case Converter
- Paste the phrase you want as an identifier.
- Camel Case Converter joins the words into camelCase with a lower-case first word.
- Copy the camelCase name into your variable or function.
Use cases
- Naming a JavaScript variable from a label.
- Creating a function name from a description.
- Turning a column heading into a camelCase key.
Good to know
Camel Case Converter keeps only real words: punctuation and spaces are dropped and the tokens are joined, with the first word lower-case and the rest capitalised. So Hello, world! Nice day? becomes helloWorldNiceDay. It also splits text that is already camelCase or PascalCase on its case boundaries before rejoining, so re-running stays consistent.
Frequently asked questions
How are spaces and punctuation handled?
They are removed. Only letters and numbers are kept and joined together.
Does it split existing camelCase?
Yes. It breaks on case boundaries first, so myValue and my value both become myValue.
Should an acronym become URLParser or UrlParser?
The tool treats acronym runs as one word, so URL becomes Url; adjust by hand if you prefer URLParser.