camelCase converter

Turn words, phrases and other naming styles into camelCase or PascalCase, the usual choice for variable and function names. The conversion runs in your browser and nothing is uploaded, so you can paste real column names and internal field names.

Style

How it works

  1. Paste your text

    Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.

  2. Instant result

    The result appears as you type. Change the options and see straight away what changes.

  3. Copy or download

    Copy the result with one click, save it as a file or use it as input for a next step.

Examples

Input camelCase PascalCase
customer name customerName CustomerName
Invoice Date invoiceDate InvoiceDate
vat_rate vatRate VatRate
total-amount incl vat totalAmountInclVat TotalAmountInclVat

How words are found

The tool splits on spaces, underscores and hyphens, and also where lower case meets upper case (invoiceDate becomes invoice and date). Accents are removed (café becomes cafe), apostrophes are dropped and & becomes and, so the result is a plain identifier.

Keep Convert each line separately ticked to convert a list of names in one go.

Where each style is used

camelCase is the convention for variables and functions in JavaScript, Java and Swift, and for JSON keys in many APIs. PascalCase names classes and types in C#, TypeScript and Java. When a database column such as invoice_date has to become a property of an object, this is the step that converts it.

Going the other way

To turn customerName back into separate words, convert it with snake case or kebab case; both split at the capital letter. Constants use screaming snake case.

Frequently asked questions

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase word, as in `customerName`, and PascalCase starts with a capital, as in `CustomerName`. The first is typical for variables and functions, the second for classes and types.

How are acronyms like XML handled?

As ordinary words. `XMLHttpRequest parser` becomes `xmlHttpRequestParser`: the acronym is split off where a capital letter is followed by lowercase, then lowercased like the rest.

What happens to digits and apostrophes?

Digits stay attached to their word, so `3d model-viewer v2` becomes `3dModelViewerV2`. Apostrophes are dropped (`I'm` becomes `im`) and `&` becomes `and`.

Can I convert a whole list of names?

Yes. Keep *Convert each line separately* ticked and every line becomes its own identifier. Untick it to join everything into one name.