Case Converter
Paste your text, click a style, copy the result.
When to use each case
- Title Case for headlines and book titles.
- Sentence case to fix text typed in all caps.
- camelCase and PascalCase for variable and class names in many programming languages.
- snake_case for Python and database columns, kebab-case for URLs and CSS classes.
FAQ
Is my text uploaded?
No. All conversion happens in your browser.
Does Title Case follow style guides?
It capitalizes every word except small words like “a”, “of” and “the” in the middle of a title. Check your style guide for edge cases.
How to convert text
- Type or paste your text into the large box. Line breaks are kept, so you can convert a whole paragraph or a list of names in one go.
- Click one of the ten style buttons. The text in the box is replaced right away; the buttons act on whatever is currently in the box, not on your original.
- Not happy with the result? Click another style, or fix the text by hand and convert again. Use Copy text to put the result on the clipboard, or Clear to start over.
Because each click overwrites the box, the order matters. Title Case treats only spaces as word breaks, so after converting to snake_case, "hello_world" becomes "Hello_world" with Title Case, not "Hello World". If you want to keep a copy of the original, copy it somewhere first.
What each style actually does
- UPPERCASE and lowercase simply apply the browser's built-in case mapping to every letter, including accented ones.
- Title Case lowercases everything first, then capitalizes the first letter of each space-separated word. The words a, an, and, as, at, but, by, for, in, nor, of, on, or, so, the, to, up, via and yet stay lowercase, except when they are the very first word. The last word of a title is not given special treatment, so "what are you waiting for" becomes "What Are You Waiting for".
- Sentence case lowercases everything, then capitalizes the first letter of the text and the first letter after a full stop, exclamation mark or question mark followed by a space, or at the start of a new line.
- camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE first split the text into words, then join them with the right separator and capitalization.
- aLtErNaTiNg flips the case of each letter in turn, starting with lowercase. Spaces and punctuation are skipped when counting, so "hello world" becomes "hElLo WoRlD".
How words are detected for programming cases
Any run of characters that is not a letter or digit counts as a separator, so spaces, hyphens, underscores, dots and slashes all work as word breaks. In addition, the converter looks for places where a lowercase letter or digit is followed by a capital, and for an acronym followed by a capitalized word. This means you can convert existing identifiers as well as plain sentences.
Examples of what comes out:
- "user account id" becomes
userAccountIdin camelCase andUserAccountIdin PascalCase. getHTTPResponseis split into get, HTTP and Response, so snake_case givesget_http_response.XMLHttpRequestbecomesxml-http-requestin kebab-case.- "max retry count" becomes
MAX_RETRY_COUNTin CONSTANT_CASE.
Punctuation is dropped in these five styles, so "it's a test!" turns into it_s_a_test in snake_case: the apostrophe acts as a separator. Digits are kept and stay attached to the letters next to them.
Common uses
- Rescuing text typed with Caps Lock on. Paste it, click Sentence case, then fix the proper nouns by hand.
- Renaming variables between languages. A JavaScript field in camelCase can become a snake_case database column in one click, and back again.
- Making URL slugs and CSS class names. Kebab-case turns a headline into a lowercase, hyphen-separated string; remove any leftover words you do not want in the slug.
- Cleaning spreadsheet lists. Paste a column of names written in mixed capitals and normalize them with Title Case.
Tips and limits
- Proper nouns and acronyms are not remembered. Title Case and Sentence case lowercase the whole text before capitalizing, so "NASA" becomes "Nasa" and the pronoun "I" becomes "i" mid-sentence. Re-check these after converting.
- Hyphenated words are treated as one word in Title Case, so "well-known" becomes "Well-known", not "Well-Known".
- Sentence detection looks for punctuation followed by a space, so abbreviations such as "e.g. this" will capitalize the next word.
- Capitalization rules apply to Latin letters. Scripts without upper and lower case, such as Korean, Chinese or Japanese, pass through unchanged in the case styles, though they are still treated as word characters by the programming styles.
- Style guides disagree about which small words to lowercase. The built-in list is a common short one; adjust the result by hand if a publisher requires something different.
More questions
Why did my text lose its punctuation?
You probably used one of the programming styles (camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE). These produce identifiers, which cannot contain spaces or punctuation, so every non-alphanumeric character is treated as a break and removed. Use UPPERCASE, lowercase, Title Case or Sentence case to keep punctuation.
Can I undo a conversion?
There is no undo button. Information such as the original capitalization is lost once the text is lowercased, so keep a copy of anything you cannot easily retype. Your browser's own undo (Ctrl+Z or Cmd+Z inside the box) may also work, depending on the browser.
Does it handle accented letters?
Yes for upper and lower case, which use the browser's standard mapping. Sentence case only recognises accented lowercase letters in the Latin-1 range (such as é or ü) when looking for the first letter of a sentence, so check the first letter of sentences that begin with less common characters.