camelCase Converter Online
Convert any text to camelCase naming convention instantly in your browser. This free tool runs entirely client-side, so your text and code stay private.
Text Case Converter
Convert text between camelCase, snake_case, kebab-case, and more. Results update as you type.
About Case Conversion
- Automatically detects word boundaries from camelCase, separators (hyphens, underscores, dots, slashes), and whitespace.
- Supports 11 case styles commonly used in programming, CSS, file paths, and documentation.
- Everything runs in your browser — no data is sent over the network.
What is camelCase?
camelCase is a naming convention where multi-word identifiers are written without spaces or punctuation, with each word after the first capitalized. For example, "user first name" becomes "userFirstName". It is called camelCase because the capital letters in the middle of the compound word resemble the humps of a camel.
Where is camelCase used?
camelCase is the standard naming convention for variables and functions in JavaScript, TypeScript, Java, and Swift. It is also used for JSON property names, CSS-in-JS properties, and React component props. Most JavaScript style guides (including Airbnb and Google) mandate camelCase for local variables and function names.
// JavaScript — convert string to camelCase
function toCamelCase(str) {
return str
.replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ''));
}
toCamelCase('user_first_name'); // 'userFirstName'
toCamelCase('hello-world'); // 'helloWorld'
# Python — convert string to camelCase
def to_camel_case(s):
parts = s.replace('-', '_').split('_')
return parts[0].lower() + ''.join(w.capitalize() for w in parts[1:])
to_camel_case('user_first_name') # 'userFirstName'Frequently Asked Questions
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter (userFirstName), while PascalCase starts with an uppercase letter (UserFirstName). PascalCase is typically used for class names and React component names, while camelCase is used for variables and functions.
Should I use camelCase for API field names?
It depends on your language ecosystem. JavaScript/TypeScript APIs typically use camelCase, while Python APIs use snake_case and C# APIs use PascalCase. Pick one convention and apply it consistently across your API.
Related Convert Tools
OpenAPI to TypeScript
Convert OpenAPI 3.x and Swagger 2.0 specs to TypeScript interfaces and types with $ref resolution, allOf/oneOf/anyOf, enums, and API operation types
JSON to Zod Converter
Convert JSON or JSON Schema to Zod validation schemas with $ref resolution, allOf/oneOf/anyOf, enum, format constraints, and required/optional fields
GraphQL to TypeScript
Convert GraphQL SDL schemas to TypeScript interfaces, types, enums, unions, and operations
TypeScript to JavaScript
Convert TypeScript to JavaScript — strip types, interfaces, enums, generics, and access modifiers to get clean JS output