Skip to main content
CaseSwitch

Developer

What Is camelCase? A Developer's Guide

CaseSwitch Team · 2026-01-22 · 6 min

camelCase joins words without spaces or underscores. See how it works in JavaScript, JSON, and API fields — and how it differs from PascalCase and snake_case.

camelCase is a naming convention for compound identifiers: the first word is lowercase, each following word starts with an uppercase letter, and there are no spaces, hyphens, or underscores between words. Examples: userProfile, totalAmount, isActive.

Where you will see camelCase

  • JavaScript and TypeScript variables and functions
  • JSON property names in many web APIs
  • Java bean properties and Kotlin identifiers (with conventions similar to JS)
  • Configuration keys in some libraries and frameworks

JavaScript examples

const userProfile = getUserProfile();
function calculateTotalAmount(items) {
  return items.reduce((sum, item) => sum + item.unitPrice, 0);
}

The variable and function names use camelCase. Class names in JavaScript typically use PascalCase instead (see below).

JSON and API fields

{
  "firstName": "Ada",
  "lastName": "Lovelace",
  "isActive": true
}

Many REST APIs return camelCase keys. If you are mapping database columns in snake_case to a JSON response, a converter can save manual renaming during prototyping.

camelCase vs other naming styles

  • camelCase — userProfile: variables and JSON keys in JS ecosystems.
  • PascalCase — UserProfile: classes, React components, and some type names.
  • snake_case — user_profile: Python, Ruby, SQL columns, and many config files.
  • kebab-case — user-profile: URLs, CSS classes, and HTML attributes.

Tricky inputs

Multiple input formats

Good converters accept plain phrases (user profile), snake_case (user_profile), kebab-case (user-profile), and spaced Title Case (User Profile). They split on spaces, underscores, hyphens, and case boundaries, then join in the target style.

Acronyms and numbers

The phrase HTML parser typically becomes htmlParser: each word is lowercased, then word boundaries are capitalized. That may not match your team's style guide if you prefer HTMLParser. Numbers are usually kept as-is (user2fa, v2Api). When in doubt, fix acronyms manually after converting.

Convert a phrase to camelCase

Paste any phrase into the camelCase Converter. Processing stays in your browser.

Related naming tools: PascalCase, snake_case, and kebab-case converters are on the same site if you need a different output style.

Related tools

camelCase Converter

Migrating SQL columns to a Node API, turning spreadsheet headers into TypeScript property names, renaming CSS modules that a linter wants in camelCase, and converting a design-doc phrase into a variable name. Paste a list, one identifier per line, for bulk work, then review acronyms before you commit.

PascalCase Converter

Naming React components and matching file names to their default export, generating TypeScript interfaces from a design-doc phrase list, turning SQL or API field labels into C# or Java class names, and converting a kebab-case or snake_case token into a type name. Paste one identifier per line for bulk work, then review acronyms before you commit.

snake_case Converter

Aligning a Node or TypeScript mapper with PostgreSQL column names, generating Python method names from a product spec, turning spreadsheet headers into database fields, and preparing keys that will later become environment-style constants (then uppercasing). Paste one identifier per line for bulk work.

kebab-case Converter

CSS class names and BEM blocks, REST path segments, data-testid values, design-token names that a style guide wants dashed, and a first-pass convert from camelCase props into a URL-ish token. Paste one name per line for bulk work.

dot.case Converter

Building i18n keys, namespacing telemetry events, matching a config schema that already uses dotted paths, and turning spreadsheet headers into lodash-style accessor strings. Paste one identifier per line for bulk work, then shorten overly deep keys by hand.

Related guides