Case Converter: Title Case, Sentence Case, camelCase and More
Part of Text tools: See all Text tools.
What is Case Converter?
A text case converter with 18 modes: UPPERCASE, lowercase, Title Case (short words kept lowercase), Sentence case, Capitalize Each Word, invert case and alternating case; the code-name styles camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Train-Case and path/case; and reversing characters, word order or line order. The result updates as you type and can be copied or downloaded. It runs in your browser.
How to use Case Converter
- Paste or type your text into the top box. Title Case is shown first.
- Click a style button to switch: text case, code and file names, or reverse.
- Leave Keep acronyms on to protect words like NASA and iPhone in Title, Sentence and Capitalize modes, or turn it off to flatten them.
- For code names, choose whether each line becomes its own identifier.
- Press Copy result or Download .txt. Use result as input lets you chain two conversions.
Why use this tool?
Many case converters only capitalise every word for title case and flatten acronyms. This one keeps short words such as of, the and and lowercase in the middle of a title, protects acronyms and mixed-case brand names, splits camelCase and XMLHttpRequest-style names correctly before re-joining them, keeps emoji and accented letters intact when reversing, and never uploads your text.
FAQ
- Which title case rules does it follow?
- Articles, short conjunctions and short prepositions (a, an, the, and, but, or, of, in, on, to, with, from and similar) stay lowercase unless they are the first or last word or follow a colon or dash. Every other word is capitalised, including both parts of hyphenated words. AP, Chicago and APA differ on a few words, so check them against your house style.
- Why did my acronyms stay in capitals?
- The Keep acronyms option leaves words like NASA, HTML and iPhone as typed in Title, Sentence and Capitalize modes. Untick it to convert them too. If your whole text is in capitals, the option is skipped automatically so Caps Lock text can be fixed.
- Does Sentence case capitalise names?
- No. It capitalises the first letter of each sentence and line and the word I, but it cannot recognise names and places, so check those before publishing.
- How is XMLHttpRequest converted to snake_case?
- It is split into XML, Http and Request, then joined as xml_http_request. In camelCase it becomes xmlHttpRequest. Acronyms are treated as ordinary words in the code styles.
- Can I reverse text with this tool?
- Yes. Reverse characters mirrors each line, Reverse word order flips the words in each line, and Reverse line order turns a list upside down. Emoji and accented letters stay intact.
- What is the difference between camelCase and PascalCase?
- camelCase starts with a lowercase letter (userAccountId) and is common for variables. PascalCase starts with a capital (UserAccountId) and is common for class and component names.
- Is my text uploaded?
- No. The conversion runs in your browser with JavaScript. Nothing is sent to our server or stored.
What this case converter does
This tool changes the capitalisation of any text you paste in. It covers the everyday writing styles (UPPERCASE, lowercase, Title Case, Sentence case and Capitalize Each Word), the naming styles programmers use for variables, files and URLs (camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Train-Case and path/case), two playful styles (iNVERT cASE and aLtErNaTiNg case), and three ways to reverse text: by character, by word order and by line order. The result updates as you type, and the converted text can be copied, downloaded as a .txt file or moved back into the input box for another pass.
Everything happens in your browser with JavaScript. Your text is not uploaded, so it is safe to use with drafts, code or customer data that should not leave your computer. There is no length limit set by the tool; very long documents are limited only by your device's memory.
How to use it
Paste or type your text into the top box. Title Case is selected first, because it is the most common job, so you will see a result straight away. Click any other style button to switch; the highlighted button shows which style is active, and the line under the input shows the character, word and line counts of what you pasted. When you are happy, press Copy result, or Download .txt to save it as a UTF-8 text file. Use result as input is handy when you want to chain two steps, for example reverse the line order of a list and then convert it to snake_case.
Two options change how the converter behaves. Keep acronyms and mixed-case words is on by default: in Title Case, Sentence case and Capitalize Each Word it leaves words such as NASA, HTML, iPhone, eBay and McDonald's exactly as you typed them instead of flattening them to Nasa or Iphone. If your whole text is in capitals, for example a paragraph typed with Caps Lock on, the option is ignored so the converter can actually fix it. The second option, convert each line separately, applies to the code-name styles: with it on, a list of phrases becomes a list of identifiers, one per line; with it off, the whole input becomes one long identifier.
Title Case rules used here
Title case is not simply capitalising every word. Publishing style guides such as AP, Chicago and APA keep short function words in lowercase unless they start or end the title. This converter follows that common approach: articles (a, an, the), coordinating conjunctions (and, but, or, nor, for, so, yet) and short prepositions (as, at, by, from, in, into, of, off, on, onto, over, per, to, up, via, with, vs) stay lowercase in the middle of a title. The first and last words are always capitalised, and so is the first word after a colon, question mark, exclamation mark, full stop or dash, which is how subtitles are normally treated. Each part of a hyphenated word is capitalised, so well-known becomes Well-Known.
Style guides disagree on the details. AP capitalises every word of four letters or more, so it would write Over and With; Chicago lowercases all prepositions regardless of length; APA capitalises words of four letters or more. This tool uses a middle-of-the-road list rather than one guide exactly, so if you are writing for a publication with its own house style, check a handful of words such as with, from, over and into against that guide. If you simply want every word to start with a capital letter, use Capitalize Each Word instead.
Sentence case and its limits
Sentence case lowercases the text and then capitalises the first letter of each sentence, the first letter of each new line and the pronoun I (including I'm, I'll, I've and I'd). A new sentence is detected after a full stop, question mark or exclamation mark followed by a space, even when a closing quote or bracket sits in between. It cannot know which other words are names: London, Sarah or Microsoft will come out lowercase unless they were typed in a way the acronym option keeps, such as all capitals in otherwise normal text. Abbreviations such as e.g. or Dr. followed by a space also look like the end of a sentence, so the next word may be capitalised. Read the result once before you publish it.
Code and file name styles
For the programming styles the converter first splits your text into words. It breaks on spaces, punctuation, underscores, hyphens and dots, on a change from a lowercase letter or digit to a capital (userName becomes user and Name), and at the end of a run of capitals that is followed by a capitalised word (XMLHttpRequest becomes XML, Http and Request). Then it joins the words in the style you pick:
- camelCase: userAccountId. Common for variables and functions in JavaScript, Java, C# and Swift, and for JSON keys.
- PascalCase: UserAccountId. Used for class, type and component names in most languages, including React components.
- snake_case: user_account_id. The standard for Python variables and functions, Ruby, and database column names.
- kebab-case: user-account-id. Used for URL slugs, CSS class names, HTML attributes and many file names.
- CONSTANT_CASE: USER_ACCOUNT_ID. Also called screaming snake case; used for constants and environment variables.
- dot.case: user.account.id. Seen in configuration keys and some logging and translation files.
- Train-Case: User-Account-Id. Used for HTTP header names such as Content-Type.
- path/case: user/account/id. Useful for folder paths and route patterns.
Acronyms are treated as ordinary words in these styles, so XMLHttpRequest becomes xmlHttpRequest in camelCase and xml_http_request in snake_case. That matches many style guides (Google's Java and JavaScript guides, for example, prefer XmlHttpRequest over XMLHTTPRequest), but if your codebase keeps acronyms in capitals you will need to adjust those letters by hand. Digits stay attached to the letters before them, so version2 stays one word. Accented and non-Latin letters are kept, which is fine for prose but may not be valid in identifiers for every language; most programming languages only allow ASCII letters in some places.
Invert, alternate and reverse
iNVERT cASE swaps every capital for a small letter and the other way round, which is the quickest way to repair a sentence typed with Caps Lock accidentally on (hELLO wORLD becomes Hello World). aLtErNaTiNg case switches between lower and upper on each letter, skipping spaces and punctuation; it is a meme style and is hard to read, so do not use it for anything a screen reader user needs to understand.
Reverse characters mirrors each line from right to left. It keeps emoji with skin tones, flags and accented letters together as one visible character when your browser supports grapheme segmentation, which current versions of Chrome, Edge, Safari and Firefox do. Reverse word order flips the words in each line while keeping the lines in place, and Reverse line order turns a list upside down, which is useful for logs, rankings and chronological notes.
Languages and special letters
Upper and lowercase use your browser's Unicode rules, so accented letters such as é, ç and ñ convert correctly, and Greek and Cyrillic work too. A few letters change length: the German ß becomes SS in uppercase, which is the standard rule. Turkish has dotted and dotless i, and the general Unicode rules used here do not apply Turkish-specific casing, so check Turkish text by eye. Scripts with no capital letters, such as Chinese, Japanese, Arabic or Hindi, pass through the case styles unchanged.
What this tool does not do
It does not check grammar or spelling, recognise names and brands in Sentence case, or follow one style guide's title rules to the letter. It does not keep formatting such as bold or links; it works on plain text, so anything pasted from a word processor arrives as plain text. It does not convert between numbers and words or remove extra spaces. For those jobs use the related tools below.
Privacy
The conversion runs entirely in the page. Nothing you type or paste is sent to our server or stored, and closing the tab discards it. The download is created in your browser as well.
Related tools
Count words and characters for an essay or a meta description with the word counter, compare two versions of a text with the text diff checker, swap a word or phrase throughout a document with find and replace, and clean up repeated lines in a list with the duplicate line remover.
Also try
Related tools that work well with this one: