How the Case Converter works
The converter changes the case of your text as you type or pick a style. Upper and lower case use the standard Unicode
case mappings without a locale, so the result is the same on every device: accented letters, Greek and Cyrillic are
converted too, and the German ß becomes SS in upper case.
Title Case capitalizes each word, but keeps short articles, conjunctions and prepositions (a, an, the, and, but, or, for, nor, on, at, to, by, of, in, as, so, yet, via, vs, per) in lower case unless they are the first or last word of a line or follow a colon. Each part of a hyphenated word is capitalized. Sentence case lower-cases the text and capitalizes the first letter of each sentence and line, and the word "I".
For the code styles (camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case and dot.case) the text is first split
into words. Spaces, hyphens, underscores, dots and other punctuation separate words, and so do changes of case inside
a word: XMLHttpRequest becomes XML, Http, Request, and userID2 becomes user, ID2. Apostrophes
are removed, so don't stays one word. With "convert each line separately" ticked, every line becomes its
own identifier; untick it to join the whole text into one.
How to use the Case Converter
- Type or paste your text into the Text box, open a text file, or select Load example.
- Pick a style under Convert to, such as Title Case, snake_case or camelCase. The converted text appears straight away.
- For the code styles, keep Code cases: convert each line separately ticked to turn every line into its own identifier, or untick it to join the whole text into one.
- Copy the converted text or download it as a .txt file.
Example
The input:
the lord of the rings: the return of the king
XMLHttpRequest userID2
converted to Title Case:
The Lord of the Rings: The Return of the King
Xmlhttprequest Userid2
and to snake_case (each line separately):
the_lord_of_the_rings_the_return_of_the_king
xml_http_request_user_id2
Common use cases
- Fixing text that was typed with Caps Lock on.
- Formatting headlines and document titles in title case.
- Turning a list of column names or labels into snake_case database fields or camelCase JSON properties.
- Creating CONSTANT_CASE names for environment variables and kebab-case names for URLs and CSS classes.
Frequently asked questions
Which words stay lower case in Title Case?
Short articles, conjunctions and prepositions: a, an, the, and, but, or, for, nor, on, at, to, by, of, in, as, so, yet, via, vs and per. They are capitalized when they are the first or last word of a line or follow a colon, full stop, question mark or exclamation mark. All other words, and each part of a hyphenated word, start with a capital letter and the rest of the word is lower case.
How are words split for camelCase and snake_case?
Spaces, hyphens, underscores, dots and other punctuation separate words, and a change from lower case to upper case starts a new word. An acronym stays together until the last capital that starts a new word, so XMLHttpRequest becomes xml_http_request. Digits stay with the letters before them, so userID2 becomes user_id2. Apostrophes are removed, so don't becomes dont.
Does it work with accented letters and other alphabets?
Yes. Upper and lower case use the standard Unicode case rules, so é, ß, Greek and Cyrillic letters are converted, and letters from any alphabet can be part of an identifier. The conversion does not depend on your device's language settings, so everyone gets the same result.
What does Sentence case do?
It changes the text to lower case and then capitalizes the first letter of the text, of each line and of each sentence after a full stop, question mark or exclamation mark followed by a space. Common abbreviations such as e.g. and Dr. do not start a new sentence, and the word "i" on its own becomes "I". Names and other proper nouns are not detected, so capitalize them again if needed.
Is my text sent to a server?
No. The conversion runs in your browser and your text is not uploaded.