Convert to Camel Case

code
Loading feedback…

Convert phrases, snake_case, kebab-case, dot.case, and PascalCase into camelCase for variables, functions, object properties, JSON keys, and design tokens. The first word stays lowercase while each later word begins with a capital letter.

Last updated: August 1, 2026Author: Mateo DíazReviewed by: Riley Williams
Convert to Camel Case
In-browser
Turn words and existing case styles into clean camelCase identifiers
Characters: 0Words: 0Sentences: 0Lines: 0
Characters: 0Words: 0Sentences: 0Lines: 0

customer_account_id looks harmless until a JavaScript object expects customerAccountId and the lookup comes back undefined. Paste the label here when you need to convert to camel case without hand-editing every word.

The result appears as you type. No account, no setup, and no trip to a server with a half-finished environment variable sitting in your clipboard.

Convert text in a few seconds

Drop a phrase into the Input box. Spaces, line breaks, underscores, hyphens, and periods become word boundaries, then the converter joins those pieces into one identifier.

  1. Paste a label such as billing address line 2.
  2. Check the Output box for billingAddressLine2.
  3. Use Copy when it looks right. Download saves the result as a text file, which is handy for a long identifier or a naming review.

Try an example if you're staring at an empty box. The sample buttons include ordinary words, an uppercase API label, and a hyphenated UI name (the kind that turns up in a design-token export at 4:17 on a Friday).

What the converter changes

The first word becomes lowercase. Each later word gets an uppercase first letter, and the separators disappear.

Simple.

The converter also finds boundaries inside PascalCase and existing camelCase text. ShippingAddressForm becomes shippingAddressForm, while shippingAddressForm stays the same. Acronyms are lowered so API response URL becomes apiResponseUrl.

  • Spaces become a new word.
  • Underscores and hyphens work as seperators, so order_total and order-total both become orderTotal.
  • Dots. A source key such as user.profile.name turns into userProfileName.
  • Multiple line breaks are treated like whitespace. Paste a whole list only when you want one long identifier, because every line will be joined together.

Punctuation outside those supported separators can remain in the output. If a pasted label contains /, :, @, or brackets, inspect the result before dropping it into source code.

Camel case examples

The smallest test is two words.

Input first name
Output firstName

A database-style field takes one extra step under the hood, splitting at each underscore before the words are joined.

Input preferred_shipping_method
Output preferredShippingMethod

And an uppercase API constant gets normalized rather than carried over as a block of capitals.

Input HTTP_RESPONSE_STATUS
Output httpResponseStatus

Numbers stay attached to the word around them. address line 2 becomes addressLine2, and oauth 2 token becomes oauth2Token. That output can still need a human check because a team may prefer oauth2Token, oAuth2Token, or another house style.

Where camelCase shows up

JavaScript and TypeScript projects use camelCase heavily for variables, functions, method names, and object properties. You will also see it in Java, Swift, and C# code, although each language and codebase carries its own naming rules.

JSON keys are a common reason to use the tool. A spreadsheet column named Customer Lifetime Value can become customerLifetimeValue before it is mapped into an API payload. One overlooked capital is enough to produce undefined, and the error message rarely points back to the column label..

Other practical spots include:

  • Design tokens exported from Figma. A token such as button primary background becomes buttonPrimaryBackground, though your token pipeline may expect dots or nested groups instead.
  • Form field names for shippingStreetAddress and emergencyContactPhone.
  • Analytics events sometimes use camelCase, sometimes snake_case. Follow the existing event schema before changing a live event name, since a tidy rename can split a dashboard into two data streams.
  • Temporary scripts. They're where naming standards tend to wander first.

Acronyms need a quick look

API, URL, HTML, and ID don't have one universal treatment inside camelCase. Many teams use apiResponseUrl and userId. Others keep a leading acronym uppercase in some places, which produces names such as URLParser or HTMLDocument.

This converter lowers acronyms consistently. So XML HTTP request becomes xmlHttpRequest.

I could be wrong here, but lowercase acronyms are easier to scan in most variable names. Consistency with the repository matters more than that preference. If the surrounding file uses userID, edit the copied result to match it rather than starting a second convention ten lines below.

Is the output a valid variable name?

Camel casing controls capitalization and word boundaries. Programming languages add more rules.

An identifier that begins with a number may still fail. 2 factor method becomes 2FactorMethod, which cannot be declared as a normal JavaScript variable because JavaScript identifiers cannot start with a digit. Prefix it with a meaningful word such as twoFactorMethod or auth2FactorMethod, depending on what the value represents.

Reserved words deserve the same pause. class is perfectly shaped camel case, yet it has a special meaning in JavaScript. And punctuation left from unusual input can create invalid code even when the capitals look tidy.

Before using generated output in code:

  • Read it once.
  • Check the first character. Letters, _, and $ can begin a JavaScript identifier; digits cannot.
  • Compare it with nearby names. Two seconds here prevents customerID, customerId, and CustomerId from living in the same module.
  • If the result too long, shorten the source phrase before converting. customerPreferredInternationalShippingMethodSelection communicates plenty, perhaps more than the next person wanted.

camelCase compared with other naming styles

PascalCase raises the first letter too, producing CustomerAccountStatus. It is often used for classes, React components, and type names. The Pascal Case Converter handles that shift directly.

Snake case keeps every letter lowercase and joins words with underscores, as in customer_account_status. Python code and database columns use it often, though conventions vary. Use the Snake Case Converter when underscores belong in the final value.

Kebab case produces customer-account-status. It reads cleanly in URL slugs, CSS class names, and file names. The Kebab Case Converter is built for that output.

Constants frequently appear as CUSTOMER_ACCOUNT_STATUS. The SCREAMING SNAKE CASE Converter supplies the capitals and underscores in one pass.

Existing camelCase and messy pasted text

Running an existing identifier through the tool is useful when you're unsure whether a capital wandered into the wrong place. invoicePaymentStatus remains invoicePaymentStatus. InvoicePaymentStatus drops its first capital.

But mixed punctuation needs care. A copied ticket title such as [WEB-142] Fix checkout URL contains brackets and a colon that this converter does not promise to clean. Remove the ticket prefix first, then convert Fix checkout URL to fixCheckoutUrl.

The tool accepts up to one million characters, though that ceiling is for convenience rather than a suggestion. For bulk schema migrations, use a script with a reviewed mapping file. Renaming 600 production keys through a text box would be brave in a way I don't recommend (especially when userID has been public since 2019).

Privacy

Conversion happens in your browser. The input does not need to be uploaded to Textavia, and closing or clearing the page removes the working text from the tool.

Avoid pasting live secrets into any naming utility anyway. An API key does not become safer because its capitalization changed.

Frequently Asked Questions
Camel case joins words without spaces. The first word starts lowercase, and every later word starts with a capital letter, as in "customerAccountStatus".
You can convert ordinary phrases, snake_case, kebab-case, dot.case, PascalCase, and existing camelCase. Whitespace, underscores, hyphens, and periods are treated as word boundaries.
Acronyms are normalized to lowercase within the identifier. For example, "API response URL" becomes "apiResponseUrl".
The output follows camelCase capitalization, but it does not validate every identifier rule. Check leading numbers, punctuation, reserved words, and any naming rules required by your language or framework.
No. Conversion runs in your browser, so the text you paste does not need to be sent to Textavia's servers.