Skip to content
ToolPika

Case Converter

Paste your text and pick a style. The result updates instantly and can be copied with one click.

Convert to

Runs in your browser. Nothing you enter is sent to a server.

The styles

Style Example Typical use
Sentence case The quick brown fox Normal text, headlines in many publications
lower case the quick brown fox Tags, emails, fixing accidental CAPS LOCK
UPPER CASE THE QUICK BROWN FOX Headings, labels, emphasis
Title Case The Quick Brown Fox Titles of books, articles and songs
camelCase theQuickBrownFox Variables in JavaScript, Java, Swift
PascalCase TheQuickBrownFox Classes and types, React components
snake_case the_quick_brown_fox Python, Ruby, database columns
kebab-case the-quick-brown-fox URLs, CSS classes, file names
CONSTANT_CASE THE_QUICK_BROWN_FOX Constants and environment variables

How it works

Text styles keep your punctuation, spacing and line breaks. Sentence case lowercases everything and then capitalizes the first letter after each full stop, question mark, exclamation mark or line break, as well as the pronoun “I”. Proper nouns such as names and places cannot be detected, so check them after converting.

Programming styles first split the text into words, ignoring punctuation, and then join the words with the separator and capitalization of the chosen style. Converting between them works in any direction: user_first_nameuserFirstNameUserFirstNameuser-first-name.

Letters with accents and other alphabets (Greek, Cyrillic…) are converted with your browser’s language rules. The German ß becomes SS in upper case, as the spelling rules require.

Examples

  • Headline: “a tale of two cities” → “A Tale of Two Cities”.
  • Fixing CAPS LOCK: “HELLO THERE. HOW ARE YOU?” → “Hello there. How are you?”
  • Code: “XMLHttpRequest” → xml_http_request; “maxRetryCount” → MAX_RETRY_COUNT.

Frequently asked questions

What are the rules for Title Case?

The first and last words are always capitalized, and so is every other word except short articles, conjunctions and prepositions (a, an, the, and, but, or, of, in, on, to, at, by and similar). This follows AP style, so prepositions of four letters or more, such as "over" or "with", are capitalized. Words already in capitals, such as NASA, are left as they are.

Which style should I use for code?

It depends on the language's conventions. JavaScript and Java use camelCase for variables and PascalCase for classes; Python and Ruby use snake_case; CSS and URLs use kebab-case; constants are usually CONSTANT_CASE.

How does it split words in names like XMLHttpRequest?

A new word starts at every space, underscore, hyphen or other separator, and wherever a lowercase letter is followed by an uppercase one. Runs of capitals are kept together as one word, so XMLHttpRequest becomes xml_http_request in snake_case.

Can I convert a list of names at once?

Yes. The programming styles convert each line separately, so a list of column names or labels comes out as a list.