Skip to content

camelCase Converter

Turn any phrase or identifier into a clean camelCase (or PascalCase) variable name, one per line.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is camelCase Converter?

camelCase writes several words as one identifier: the first word is lowercase and each following word starts with a capital, as in userFirstName. It is the standard for variables and functions in JavaScript, Java, Swift and JSON keys. PascalCase starts with a capital too and is used for classes and types.

The converter accepts any source: "user_first_name", "get-http-response", "Parse HTML string" or "XMLHttpRequest". It splits on separators, camelCase boundaries and acronyms, drops apostrophes, and can either keep acronyms in capitals (HTMLParser) or normalize them (HtmlParser). You can convert each line separately or merge all lines into a single name.

How does it work?

  1. Paste one name or phrase per line.
  2. Choose camelCase or PascalCase.
  3. Decide whether to keep acronyms in capitals, treat numbers as separate words, and convert per line or merge everything into one identifier.

Common use cases

  • Converting database columns (user_first_name) into JavaScript or JSON property names.
  • Turning a spoken feature name into a function or variable name.
  • Renaming CSS or HTML attribute names such as data-user-id to a dataset key (userId).
  • Bulk-converting a list of API field names to PascalCase for class properties.

Examples

Try this input in the tool above:

Input
user_first_name
get-http-response
Parse HTML string
XMLHttpRequest
order 2 items
Output
userFirstName
getHttpResponse
parseHtmlString
xmlHttpRequest
order2Items

Privacy

camelCase Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

The converter cannot know which uppercase runs are real acronyms in your codebase. Check names such as ID, URL or API against your naming convention.

Frequently asked questions

How does it treat acronyms like HTML or XML?

By default they are normalized (parseHtmlString). Tick "keep acronyms" to preserve them as parseHTMLString, which some style guides prefer.

What happens to numbers?

Numbers are treated as separate words, so "order 2 items" becomes order2Items and "2fa" becomes 2Fa. Turn the option off to keep them attached to the letters.

More tools in Text Tools →