Convert text to camelCase firstWordLower Free Online Secure
Paste a line and read it back in camelCase. The whole of it happens in your browser — nothing you type is sent anywhere, and the rules follow the language of this page rather than English.
Write it differently
Nothing uploaded
The same line in all seven writings
| Writing | The same line, written that way |
|---|---|
| uppercase | CRÈME BRÛLÉE FOR 2 — STRASSE 17, FOOBAR |
| lowercase | crème brûlée for 2 — straße 17, foobar |
| Title Case | Crème Brûlée For 2 — Straße 17, Foobar |
| snake_case | crème_brûlée_for_2_straße_17_foo_bar |
| kebab-case | crème-brûlée-for-2-straße-17-foo-bar |
| camelCase | crèmeBrûléeFor2Straße17FooBar |
| a URL slug | creme-brulee-for-2-strasse-17-foobar |
Where these forms come from
Capital and small letters were once two different alphabets. The capitals are Roman, cut into stone with a chisel; the small letters descend from the Carolingian minuscule, shaped by a pen moving quickly across parchment. Printers kept the two in separate trays — the upper case and the lower case — and the names stuck long after the trays were gone. The programming forms are much younger and were invented to solve one problem: a name cannot contain a space. snake_case came out of early C, camelCase out of Smalltalk, kebab-case out of Lisp, and the URL slug out of the need to put a human title into an address where spaces and accents are not allowed.
Where you meet them
Title case belongs to headings and book titles; sentence case to almost everything else, and increasingly to interfaces, because it reads faster. snake_case names database columns and Python variables; camelCase names JavaScript variables and Java methods; kebab-case names CSS classes and file names in web projects. The slug is what turns an article's headline into the last part of its address, and it is the one conversion here that search engines read.
Questions people ask
Why does uppercasing sometimes change the number of letters?
Because case is a property of a language, not of a character. German ß becomes SS in capitals, so one letter becomes two. Turkish has a dotted and a dotless i, and uppercasing i gives İ rather than I — getting this wrong turns a Turkish word into a different one. The conversions here follow the rules of the page's own language, which is why the same input can give different results on the Turkish page than on the English one.
Why does the slug remove accents and punctuation?
Because an address has to survive being copied into a message, printed on paper and typed back in by hand. Accented letters are legal in a modern URL but get percent-encoded when copied, turning a readable address into a line of symbols. Stripping them down to plain letters, digits and hyphens keeps the address readable, shareable and identical everywhere it appears.
Is the answer exact?
Where both units are defined in terms of one another by whole numbers, yes — the page says so above the figure, and the only rounding is in how many digits are shown. Where the ratio has no finite decimal, the page shows twelve significant digits and says the relation is approximate rather than pretending otherwise.
Does anything I type leave my device?
No. The arithmetic runs in your browser; nothing is uploaded and there is no server to upload it to. Load the page once and it keeps working with the network switched off.
Why you convert text to camelCase
Open almost any JavaScript file, any Java class, any Swift or Kotlin source, and the names look the same: userName, totalPrice, getCustomerById, isLoggedIn. The words are run together with no space and no separator, the first one small and each one after it starting with a capital, so that the humps in the middle of the word give the style its name. This is camelCase, and it is the form that most of the C-family languages settled on for variables and functions. To convert text to camelCase is to turn a phrase as a human writes it into a name that a program will accept and a programmer will recognise.
Paste a line and read it back in camelCase. The conversion happens in your browser, nothing you type is sent anywhere, and the rules follow the language of this page and not English. It cuts the line into words, leaves the first one small, raises the first letter of each one after it and joins them with nothing between. Below you will find what exactly the page does and does not do, how it treats the awkward letters of different languages, the difference between camelCase and its upper sibling, where the form is the convention and where it is not, and the traps that catch people who convert text to camelCase in a hurry.
What the conversion does
Cut, small first, capital after, join
The page first cuts the line into words. The first word stays small. Each word after it gets a capital letter at the start, with the rest in small letters. Then the words are joined with nothing between them. The line Crème brûlée for 2 — straße 17, fooBar comes back as crèmeBrûléeFor2Straße17FooBar. The accents are kept, the numbers stand as words of their own, the dash and the comma are gone, and fooBar, which the page cuts at its capital, has been put back together as FooBar at the end.
Where the cuts fall
A word boundary is a space, a punctuation mark, a dash, a symbol or the step from a small letter to a capital inside a word. So customer first name, customer-first-name, customer_first_name and customerFirstName all become customerFirstName. The conversion accepts almost any starting point and always arrives at the same form, which makes it a reliable last step before a name goes into code.
Copying the result
A button beside the result copies it to the clipboard. Paste it into the editor or the file where the name is needed.
What the conversion does not do
It does not keep punctuation
Commas, dots and dashes are boundaries between words, not characters to carry over. That is what you want for a variable name and not what you want for prose. A sentence run through the page comes back as a name, and its punctuation is gone.
It does not remove accents
The line keeps its accented letters: crèmeBrûlée. Many languages allow them in names, but plenty of tools and style guides do not. If you need plain letters, first run the phrase through the URL slug page, which takes the marks off Latin letters, and then convert text to camelCase.
It does not check that the name is legal
Programming languages have their own rules. A name may not start with a digit, and it may not be a reserved word. A phrase such as 2 for 1 becomes 2For1, which most languages reject at the first character. The page makes the shape; you check the validity.
camelCase and PascalCase
Same idea, different first letter
When the first word also starts with a capital, as in CustomerFirstName, the style is called PascalCase, UpperCamelCase or StudlyCaps. The convention in most languages is to use PascalCase for types and classes and camelCase for variables, functions and methods. This page produces the lowercase-first form. To get PascalCase, convert the phrase and raise the first letter by hand.
Why the first letter matters
The capital at the start tells a reader that a name is a class, and the small letter that it is an instance or a function. In languages where the convention is enforced by tools, such as Go, where a capital means public, the difference is part of the meaning.
The language matters
Scripts written without spaces
Cutting into words needs boundaries. Chinese and Japanese are written without spaces, so a line in those scripts comes back as a single word. The page would rather say so than cut at a place it guessed, since a wrong cut would produce a name that looks plausible and means the wrong thing.
Turkish and the dotted i
Raising the first letter of each word follows the rules of the page's language. In Turkish, the capital of i is İ and the capital of ı is I. A converter that applies English rules changes the words. This page follows the language it is written in.
German and the sharp s
German ß in the middle of a word stays as it is, as in straße. Capital STRASSE comes back as strasse, with a double s.
Scripts without capitals
Arabic, Hebrew and the Indian scripts have no capitals, so the words are simply joined together. Whether the result is readable in such a script is a matter for the tool you use it in.
Where camelCase is the convention
JavaScript and TypeScript
Variables, functions and object properties are written in camelCase, and so are the properties of JSON objects in most web interfaces. A phrase you convert text to camelCase for is probably headed for one of these.
Java, Kotlin, Swift, C# and Dart
The same habit holds for local variables and methods, with PascalCase used for classes and, in C#, for methods and properties too. A team's style guide settles the details.
JSON from web services
Many APIs send keys such as firstName and orderTotal. If your data starts as a table, CSV to JSON turns the header row into keys, and headers that have been converted to camelCase become keys that code can read without brackets and quotes. Going the other way, JSON to CSV writes the keys back as a header.
Hashtags and handles
Outside programming, camel case is used for hashtags such as #SpringGardenTips, because capitals mark the word boundaries for the eye. It is also better for accessibility: screen readers read a capitalised hashtag as separate words, and a lowercase run of letters as a single odd one.
Where it is not the convention
Python, Ruby and databases
These prefer underscores. For them, snake_case is the tool.
CSS and web addresses
Class names, custom properties and addresses use hyphens. See kebab-case.
Prose and titles
camelCase is for names, not for reading. A title or a sentence in it is hard on the eye. For a heading, consider Title Case.
How to convert text to camelCase here
Paste or type your text
Enter the phrase in the first field. The result appears at once in the second, so you can watch it change as you type.
Check the cuts and the acronyms
Look at where the words were divided, and at how acronyms were treated. A name such as parseHtmlString and one such as parseHTMLString are different conventions, and the page applies one rule throughout.
Copy it
Press the copy button and paste the result where you need it. For other forms of the same line, see below.
The same line in all seven writings
A table of forms
Below the converter, a table shows the example line in all seven forms the site offers: uppercase, lowercase, Title Case, snake_case, kebab-case, camelCase and a URL slug. It is a quick way to see how the same words look in each.
Where these forms come from
Two alphabets
Capital and small letters were once two different alphabets. The capitals are Roman, cut into stone with a chisel; the small letters descend from the Carolingian minuscule, shaped by a pen moving quickly across parchment. Printers kept the two in separate trays, the upper case and the lower case, and the names stuck long after the trays were gone.
Names without spaces
The programming forms are much younger and were invented to solve one problem: a name cannot contain a space. snake_case came out of early C, camelCase out of Smalltalk, kebab-case out of Lisp, and the URL slug out of the need to put a human title into an address where spaces and accents are not allowed. In camelCase the capitals do the work that the underscore or the hyphen does elsewhere, marking where one word ends and the next begins.
camelCase in the wider workflow
From a spec to code
Requirements documents are written in sentences, and code is written in names. Between them, someone has to translate each noun and verb into an identifier. Doing it by hand is slow and invites inconsistency: one developer writes customerName, another clientName for the same thing. If the team agrees to convert text to camelCase from the exact wording of the spec, the names follow the words, and anyone can find the code that a requirement refers to by searching for the phrase.
From a table header to an object key
Spreadsheets have headers such as First Name, Order Total and Date Of Birth. Once the data becomes records in a program, those headers become keys. Converting each header to camelCase gives firstName, orderTotal and dateOfBirth, which code can read as properties without quotes or brackets. If the data then has to go back to a spreadsheet, JSON to XLSX writes the keys as the first row, and the loop is closed.
From a design file to a component
Design tools name layers in plain words: Primary Button, Card Title. When developers build the components, those names become identifiers such as primaryButton and cardTitle, or the class names primary-button and card-title. Keeping the mapping obvious makes the handoff smoother. For the sizes and colours that come with the layers, px to rem and HEX to RGB convert the values that sit behind the names.
Searching for what you named
A consistent style makes search effective. If every property is camelCase, a search for orderTotal finds all uses, and a search for ordertotal or order_total finds none, which is itself informative. Mixed styles scatter the same idea across spellings and hide it from the search.
Renaming safely
When a name changes, a rename tool in your editor should do the work, not find and replace. Before you rename, convert text to camelCase for the new name from its new wording, so that the new identifier follows the convention from the start. Then let the tool update every reference.
Test a few names in the place they will live
Before you adopt a batch of names, try three or four in the editor, inside the lines of code where they will appear. If each reads naturally next to the others, the batch is good. If one jars, reword the phrase and convert text to camelCase again. A short trial costs a minute and avoids a rename across the codebase.
Names that read well
Start with a verb for functions
A function is an action, and its name should say so: getUserName, calculateTotal, isValid. When you convert text to camelCase for a function, begin the phrase with the verb.
Use nouns for values
A variable holds a thing: userName, totalPrice, orderList. Booleans read best as questions: isActive, hasAccess, canEdit.
Be consistent about acronyms
Some teams write parseHTML, some parseHtml. Both are fine; the mix is not. Pick one and apply it to every name, and your code will be easier to search.
Keep names pronounceable
A name you can read aloud is a name you can discuss. custFnDt is not one, and customerFirstDate is. The conversion preserves what you write, so write something worth keeping.
Traps when you convert text to camelCase
A name that begins with a digit
Most languages refuse it. Put a word or a letter in front.
Reserved words
A phrase such as class, new or default is a keyword in many languages. The page does not know which. Check before you use the name.
Acronyms and runs of capitals
The cuts around a run of capitals can surprise you. Read the result and compare it with your convention.
Accents in names
Allowed in some languages and not others. If the name must travel through older tools, remove the accents first.
Questions people ask before converting
What happens to punctuation?
It is treated as a boundary between words and is not carried over.
Are numbers kept?
Yes, as words of their own, joined to the rest.
Does it handle input already in snake_case or kebab-case?
Yes. Underscores and hyphens are boundaries, so my_variable_name becomes myVariableName.
How do I get PascalCase?
Convert, then raise the first letter by hand.
Is my text uploaded?
No. What you type here is never sent anywhere, so a draft, a password or a client's name is as safe here as in a text editor.
How do I get underscores or hyphens instead?
With convert text to snake_case or convert text to kebab-case.
A worked example
Say you are writing a small script to calculate a delivery fee, and the spec calls the values delivery fee per kilometre, free delivery threshold and is express order. You convert each in turn and read deliveryFeePerKilometre, freeDeliveryThreshold and isExpressOrder. The first begins with a noun, which is right for a value; the last begins with is, which marks a yes-or-no flag. You paste the three into the script as variable names, and the spec and the code now use the same words in the same order, which makes the review easy.
A short checklist
Before converting
Write the phrase in plain words. Start functions with a verb and flags with is or has. Check the target language for reserved words.
While converting
Paste the phrase, look at the cuts and make sure the name begins with a letter.
After converting
Check the length and the acronyms, and use the same name everywhere it is needed.
Common mistakes
Using camelCase for text people will read
It is for names, not for prose.
Mixing conventions in one project
Choose camelCase, snake_case or kebab-case for each layer, and keep to it.
Forgetting what the target allows
Digits at the start, accents and reserved words differ between languages.
Your text stays on your device
The conversion happens locally. Your text is handled by your own browser and nothing is sent anywhere. There is nothing to delete afterwards and no account to create. That is the plain way to convert text to camelCase.
Summary
To convert text to camelCase here, paste a line and read it back with the words cut, the first one small, the first letter of each later one raised and everything joined with nothing between. A line already written in snake_case or kebab-case is cut at its separators. The page does not keep punctuation: commas, dots and dashes are boundaries between words, not characters to carry over, which is what you want for a variable name and not for prose. Cutting into words needs boundaries, so Chinese and Japanese, written without spaces, come back as a single word. Raising the first letter follows the language of the page, so Turkish i becomes İ. Nothing is uploaded.