Case Converter and Cleaner
Convert text to camelCase, snake_case, kebab-case, slugs, Title Case and more at once. Runs in your browser.
Runs entirely in your browser. Nothing you type is sent to a server.
0 characters · 0 words · 0 lines
Applies to camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case and dot.case. The slug always does.
camelCase
Words joined, first word lower, others capitalised.
PascalCase
Words joined, every word capitalised.
snake_case
Lower case, words joined with _.
CONSTANT_CASE
Upper case, words joined with _.
kebab-case
Lower case, words joined with -. Letters of any script are kept.
slug
kebab-case after turning accents, Greek and Cyrillic into ASCII.
dot.case
Lower case, words joined with a dot.
Title Case
Chicago style: small words stay lower case. Acronyms and words like iPhone keep their letters. Spacing and punctuation stay.
Sentence case
Capital at the start of each line and sentence, and for "I"; the rest lower case. Acronyms and words like iPhone keep their letters.
lower case
The input in lower case. Nothing else changes.
UPPER CASE
The input in upper case. Nothing else changes.
How the conversions work
How words are split
A word is a run of letters, digits and combining marks. Spaces, punctuation, symbols, underscores, hyphens and emoji separate words and are dropped from the code cases. A capital after a lower-case letter or a digit starts a new word, so fooBar gives foo and Bar. An acronym followed by a capitalised word splits before its last capital, so getHTTPResponse gives get, HTTP and Response. Letters and digits stay together (utf8Encode gives utf8 and Encode, HTML5 stays one word) and apostrophes inside a word are dropped (it's becomes its). A letter and its accent typed as two characters count as one letter. The tool cannot know brand names, so iOS splits into i and OS in the code cases. A plural acronym at the end of a word stays whole: APIs gives apis, listAPIs gives list_apis, and Title Case keeps APIs. Before a capital the s starts the next word (URLIsValid gives url_is_valid). camelCase and PascalCase set a number off with an underscore when it follows a word that ends in a digit (x86_64 stays x86_64, v1.2.3 gives v1_2_3). An apostrophe after a digit joins the word too (90's becomes 90s).
Title Case and Sentence case
Title Case follows Chicago style. These small words stay lower case unless they open or close the line or follow a colon, dash, question mark, exclamation mark or full stop that ends a clause: a, an, and, as, at, but, by, for, from, in, into, nor, of, off, on, onto, or, over, per, so, than, the, to, up, upon, via, vs, with and yet. A full stop after a single letter or an abbreviation such as vs, etc, Mr or Dr does not end a clause. Acronyms such as HTTP, words with a capital inside, such as iPhone or eBay, and words of digits and capitals, such as 3D or 5G, keep their letters. The first word of a hyphenated compound is capitalised even when it is a small word (By-Product, Up-to-Date). A word with a full stop between letters, such as node.js or example.com, keeps the letters after the stop as typed (Node.js, Example.com), and single letters joined by stops or symbols, such as U.S.A. or R&D, are initials. A web address (anything with ://), an e-mail address or a www. address is kept as typed. A full stop, question mark or exclamation mark followed by an ellipsis still ends a sentence. A line of three or more words typed entirely in capitals is treated as shouted and is converted word by word; so is every line of a text that has no lower-case letter and at least one such line. Shorter all-capitals lines in other texts keep their capitals. Sentence case capitalises the start of each line and sentence and the word I. It does not start a sentence after a single letter or one of those abbreviations (cats vs. dogs stays one sentence) and leaves initials as typed.
Both keep your spacing and punctuation. When a line is a single word with no spaces, it is split into words first: camelCase such as getHTTPResponse2xx, snake_case such as user_first_name and CONSTANT_CASE such as MAX_SIZE (which gives Max Size) all split. Hyphens stay on every line (max-size gives Max-Size, USB-C and up-to-date keep theirs). A lone PascalCase word such as UserName is kept whole because it cannot be told apart from a name like YouTube, and a lone word in capitals such as NASA or TIMEOUT keeps its capitals. A dotted lone word such as max.size is read as a file name or domain. Georgian letters keep their form and are not turned into the capitals that Unicode has for them.
Accents and the slug
The code cases keep accents and letters of any script as you typed them. The slug turns accents, Greek and Cyrillic into plain ASCII (Crème Brûlée gives creme-brulee, Привет мир gives privet-mir). Letters from scripts with no mapping, such as Chinese, Arabic or Hebrew, stay in the slug rather than disappearing. Tick Convert accents to ASCII to apply the same transliteration to the other code cases.
Several lines
Every line is converted on its own and line breaks are kept. lower case and UPPER CASE change nothing but the letters.
Privacy and large texts
Runs entirely in your browser. Nothing you type is sent to a server. Your text is not stored; only the accents setting is saved on this device. A large text is converted in the background so the page stays responsive (the converter's own worker file may load from this site for a large text; nothing you typed is sent anywhere), each box shows a preview of a long result, and Copy always takes the whole result.