Case Converter
Convert text to UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE. Unicode-aware, in your browser, nothing uploaded.
Worked examples
- Title Case a headline
Every word gets a capital first letter and lowercase rest, apostrophes stay inside the word, and accented capitals like É are handled. It does not skip small words such as "of" or "the" the way style guides do.
- Sentence case after shouting
Everything is lowercased first, then the first letter of the text, of each line and of each sentence is capitalized, including after a closing quote.
- Identifier with acronyms and digits to snake_case
The acronym HTTP is kept together as one word and the digit stays attached to the word before it, giving parse_http_response2_beta.
What this tool does
This tool changes the capitalization or naming style of any text. Nine modes are available: UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. It is Unicode-aware, so accented letters and non-Latin alphabets with case (Greek, Cyrillic) convert correctly, and everything runs in your browser.
When you need it
- Fixing a heading or paragraph typed in all caps, or turning a title into sentence case.
- Renaming variables, columns or JSON keys between conventions, one name per line.
- Turning a phrase into an identifier or CONSTANT for code, a config key or an environment variable.
- Normalizing a list of labels before comparing or sorting them.
Two kinds of modes
Text modes (UPPER, lower, Title, Sentence) keep your punctuation, spacing and line breaks and only change letter case. Identifier modes (camel, Pascal, snake, kebab, CONSTANT) first split the text into words, then rejoin them in the new style, so punctuation and spaces are removed. Identifier modes work line by line, so you can paste a column of names and convert them all; indentation at the start of each line is preserved.
How words are found
An identifier-mode word boundary appears at any character that is not a letter or digit (spaces, hyphens, underscores, dots), and also inside a run of letters at these points:
- a lowercase letter or digit followed by an uppercase letter:
fooBarbecomesfooandBar; - the end of a capital run, where a capital is followed by a lowercase letter:
HTTPServerbecomesHTTPandServer, andXMLHttpRequestbecomesXML,Http,Request.
Acronyms are therefore kept together while splitting, but not preserved afterwards. In camelCase and PascalCase every word after splitting is lowercased and then capitalized, so parseHTTPResponse becomes parseHttpResponse, the style Google's Java guide prescribes. In snake_case and kebab-case, HTTPServer is http_server and http-server. A known quirk: iOS is split as i and OS because a lowercase letter is followed by an uppercase one, giving i_os.
Digits stay attached to the letters before them: ipv4Address becomes ipv4_address, and parseHTTPResponse2Beta becomes parse_http_response2_beta. A capital letter after a digit does start a new word (v2Beta is v2 and Beta). If you want every digit run separated, such as ipv_4_address, use the snake case to camel case converter, which has that option.
Leading and trailing underscores are kept, so _privateValue becomes _private_value and __init__ stays __init__. Those underscores are a naming convention rather than separators.
Title Case and Sentence case details
Title Case lowercases everything, then capitalizes the first letter of every word. It does not know style-guide rules such as leaving "a", "of" and "the" lowercase, and it does not preserve names like iPhone or NASA, so treat it as a fast first pass for headlines. Apostrophes stay inside a word, so fox's becomes Fox's, not Fox'S.
Sentence case lowercases everything, then capitalizes the first letter of the text, of every line, and of each sentence after ., !, ? or … (including through closing quotes or brackets). It cannot tell abbreviations from sentence ends, so e.g. this becomes E.g. This, and it does not restore proper nouns or the pronoun "I".
Unicode behavior worth knowing
Case mapping uses the JavaScript engine's locale-independent Unicode rules. The German ß uppercases to SS, so converting to UPPER and back gives ss, not ß. A Greek capital sigma at the end of a word lowercases to the final form ς, so ΟΔΟΣ becomes οδος. Scripts without case, such as Chinese or Japanese, pass through unchanged and count as ordinary letters when splitting words. The Turkish dotted and dotless I are not special-cased, because that depends on language, which the tool does not assume.
Input is limited to 100,000 characters.
Frequently asked questions
- Does it work with accented and non-Latin letters?
- Yes. Case mapping uses Unicode rules via the browser, so é becomes É, and Greek and Cyrillic letters convert too. Scripts without upper and lower case, such as Chinese or Japanese, pass through unchanged. Two Unicode quirks apply: German ß uppercases to SS (so UPPER then lower does not return the original), and a Greek capital sigma at the end of a word lowercases to the final form ς.
- How are acronyms like HTTP or XML treated?
- In the identifier cases (camel, Pascal, snake, kebab, CONSTANT), a run of capitals is one word until a capital followed by a lowercase letter begins the next one, so HTTPServer is split into HTTP and Server. Acronyms are not preserved as capitals in camelCase or PascalCase: parseHTTP becomes parseHttp, which is the convention Google's Java style guide prescribes, for example.
- What happens to digits?
- Digits stay attached to the word before them, so ipv4Address becomes ipv4_address and not ipv_4_address. A capital letter after a digit starts a new word: v2Beta is split into v2 and Beta. If you need digits split into their own words, use the snake case to camel case converter, which has that option.
- Does Title Case follow AP or Chicago style?
- No. It capitalizes the first letter of every word and lowercases the rest, including short words such as a, of and the, and it does not know to keep names like iPhone or NASA intact. For editorial headlines, run it and then fix the small words by hand.