camelCase Converter

Convert any text to camelCase instantly. Ideal for JavaScript variables, JSON keys, and REST API field names.

0 words0 characters

What Is camelCase?

camelCase is a naming convention where multiple words are joined together with no spaces or punctuation, and each word after the first starts with a capital letter. The first word is entirely lowercase. For example, “user profile picture” becomes userProfilePicture. The name comes from the way the capital letters create humps, like a camel.

camelCase is distinct from PascalCase, which capitalises every word including the first. When developers say “camelCase” they almost always mean lower camelCase — starting with a lowercase letter.

Where camelCase Is Used

JavaScript and TypeScript

camelCase is the dominant naming convention for variables, function names, and object properties in JavaScript and TypeScript. Both the official ECMAScript specification and widely adopted style guides — including those from Google, Airbnb, and the TypeScript team — recommend camelCase for these identifiers. Examples:

  • Variables: firstName, isLoggedIn, totalItemCount
  • Functions: getUserById(), calculateTax(), handleSubmit()
  • Object keys: { userId: 1, createdAt: new Date() }
  • React hooks: useState, useEffect, useLocalStorage

JSON Keys and REST API Fields

Most REST APIs return JSON with camelCase keys, because JSON is primarily consumed by JavaScript clients where camelCase is idiomatic. When designing an API, using camelCase for field names means JavaScript consumers can destructure responses naturally:

  • { "userId": 42, "displayName": "Alice", "lastLoginAt": "2024-01-01" }

When you receive a specification document with field names written as plain English phrases, this converter lets you quickly transform them into properly formatted camelCase API keys.

Java

Java uses camelCase for variable names, method names, and parameter names, following the official Oracle Java naming conventions. Class names use PascalCase, but everything else — including getters and setters likegetUserName() and setFirstName() — uses camelCase.

Swift and Kotlin

Both Swift (Apple's language for iOS/macOS) and Kotlin (the preferred language for Android) use camelCase for variables and functions. The Swift API Design Guidelines explicitly state that names of variables, constants, and functions should be camelCase. This makes the convention nearly universal across mobile development.

GraphQL

GraphQL schemas and queries conventionally use camelCase for field names, mirroring JavaScript conventions. When writing queries or mutations, field names like createdAt, totalCount, andpageInfo are standard.

camelCase vs. snake_case: Which Should You Use?

The choice between camelCase and snake_case usually comes down to the ecosystem. JavaScript, Java, Swift, and Kotlin all prefer camelCase. Python, Ruby, and most SQL databases prefer snake_case. When you are building a system that bridges these ecosystems — for example, a Python backend that serves a JavaScript frontend — you may need to convert between the two conventions at your API boundary.

How to Use This camelCase Converter

Paste any text — plain English phrases, snake_case identifiers, kebab-case strings, or space-separated words — into the input box. The converter strips spaces and punctuation and produces properly formatted camelCase output. Copy the result with one click.