Case Converter
Title Case capitalizes the major words of every phrase, so 'the quick brown fox' becomes 'The Quick Brown Fox'. Articles, conjunctions and prepositions of 4 letters or fewer stay lowercase unless they start or end the title. camelCase, snake_case and kebab-case join words with no spaces.
| Case applied |
Paste your text, then click the case you want. This converter handles the everyday ones. UPPERCASE, lowercase, Title Case and Sentence case, plus the developer formats: camelCase, PascalCase,
Key takeaways
- Title Case keeps small words of 4 letters or fewer lowercase
- camelCase leaves the first word lowercase, PascalCase caps it
- snake_case uses underscores, kebab-case uses hyphens
- English has 52 letter forms plus 10 digits
- Use kebab-case for URLs and CSS, snake_case for Python
On this page
- Title Case vs Sentence case: the rule most people mix up
- Which words stay lowercase in Title Case
- camelCase, PascalCase and where each one is used
- snake_case, kebab-case and CONSTANT_CASE
- Worked example: one phrase converted eight ways
- How numbers, apostrophes and punctuation are handled
- Why URLs, CSS and file names prefer kebab-case
Title Case vs Sentence case: the rule most people mix up
These two formats get confused more than any others, and the fix is simple once you see them side by side.
- Title Case capitalizes the major words of every phrase: “the quick brown fox” becomes “The Quick Brown Fox”. Use it for headlines, page titles, book titles and section headings.
- Sentence case capitalizes only the first word and any proper nouns: “The quick brown fox”. Use it for body text, UI labels, button text and most modern product copy.
The trend in software and web writing has been steadily toward sentence case, because it is easier to read and easier to keep consistent, you rarely have to decide whether a word is “important” enough to capitalize. Title Case still dominates traditional print media, many academic styles and most US newspaper headlines.
One practical warning: do not mix the two inside a single document unless you have a reason. A page with Title Case headings and Sentence case subheadings can look deliberate, but the same page with Title Case in one section and Sentence case in the next just looks careless. Pick one for each level of your document and apply it everywhere.
Which words stay lowercase in Title Case
The convention most style guides follow is to leave short function words lowercase, unless they are the first or last word of the title, or follow a colon.
- Articles: a, an, the
- Coordinating conjunctions: and, but, or, nor, for, yet, so
- Short prepositions: of, in, on, at, to, by, for, with, from
The exact cutoff varies by guide. This converter leaves a word lowercase when it appears in its small-word list and is four letters or shorter; anything longer than four letters is capitalized, and the first and last words are always capitalized. Here is how that plays out:
| Input | Title Case output | Why |
|---|---|---|
| the war of the worlds | The War of the Worlds | “of” and “the” are short function words |
| a tale of two cities | A Tale of Two Cities | First and last words capitalized |
| to be or not to be | To Be or Not to Be | “to” is first, so it is capitalized |
| how to write a resume | How to Write a Resume | “to” and “a” stay down |
If your house style differs, some guides capitalize every preposition, others lowercase all of them, you can always fix the handful of exceptions by hand after converting.
camelCase, PascalCase and where each one is used
The developer formats strip the spaces out entirely and signal word boundaries with capitalization or a separator. The two that use capitalization are camelCase and PascalCase.
- camelCase joins the words and capitalizes each one after the first:
myVariableName. The leading lowercase letter is the camel's “hump” lying down. - PascalCase is the same idea but capitalizes the first word too:
MyClassName. It is sometimes called UpperCamelCase.
Each language has a strong convention, and following it makes your code look native. The Google JavaScript Style Guide, PEP 8 for Python and Microsoft .NET naming guidelines all agree on the split below:
| Language | Variables & functions | Types & classes |
|---|---|---|
| JavaScript | camelCase | PascalCase |
| Java | camelCase | PascalCase |
| C# | PascalCase | PascalCase |
| Swift | camelCase | PascalCase |
| Go | camelCase / PascalCase* | PascalCase |
*In Go the first letter also controls visibility: thing is unexported, Thing is exported to other packages.
snake_case, kebab-case and CONSTANT_CASE
The three separator-based formats all replace spaces with a punctuation character and lowercase the words. Which separator you use is dictated by the language or the file type.
- snake_case uses underscores:
user_profile_image. It is the standard in Python, Ruby, SQL column names and most config files. - kebab-case uses hyphens:
user-profile-image. It is the convention for URLs, HTML attributes, CSS class names and file names. - CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) uses underscores and capitalizes everything:
MAX_RETRY_COUNT. It marks values that should never change at runtime.
The reason kebab-case wins for URLs and CSS is practical, not aesthetic. Hyphens are already valid in a URL and in a CSS selector, while underscores are awkward to type on a phone keyboard and can be hidden by the underline of a hyperlink. When a URL is underlined, user_profile can be misread as user profile or userprofile, but user-profile stays readable. That is why Google's own URL guidance and most style guides recommend hyphens over underscores in web addresses.
Worked example: one phrase converted eight ways
Take a messy, realistic input and watch what each format does to it. The phrase is:
User Login Form 2.0 (Draft)
This converter first splits on anything that is not a letter or a digit, so the period, the space, the parentheses and the version number all become boundaries. Then it applies the chosen rule:
| Format | Result |
|---|---|
| UPPERCASE | USER LOGIN FORM 2.0 (DRAFT) |
| lowercase | user login form 2.0 (draft) |
| Title Case | User Login Form 2.0 (Draft) |
| Sentence case | User login form 2.0 (draft) |
| camelCase | userLoginForm20Draft |
| PascalCase | UserLoginForm20Draft |
| snake_case | user_login_form_20_draft |
| kebab-case | user-login-form-20-draft |
| CONSTANT_CASE | USER_LOGIN_FORM_20_DRAFT |
Notice that the plain formats (UPPERCASE, lowercase, Title Case, Sentence case) keep the punctuation exactly as you typed it, while the developer formats drop it, because a variable name cannot contain a space, a period or a bracket.
How numbers, apostrophes and punctuation are handled
The two families of formats treat punctuation differently, and that trips people up.
Plain formats keep everything. UPPERCASE, lowercase, Title Case and Sentence case change only the case of letters. Every comma, apostrophe, period and bracket stays exactly where you put it. “Don't stop.” becomes “DON'T STOP.” in UPPERCASE and “Don't stop.” in Sentence case, apostrophes and periods untouched.
Developer formats remove punctuation. camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE split the text on any character that is not a letter or a digit, then rejoin the pieces. That means periods, commas, apostrophes, brackets and slashes are all treated as word boundaries and disappear from the output. “Don't stop.” becomes dontStop, not don'tStop, because an apostrophe is not a valid character in an identifier.
Numbers survive either way. They are letters-and-digits as far as the splitter is concerned, so “Form 2” keeps its 2 in every format, it just loses the space around it in the developer styles.
Why URLs, CSS and file names prefer kebab-case
Three separate conventions converge on hyphens, and it is worth knowing why so you can apply the same logic to new situations.
- URLs. Search engines treat hyphens as word separators, so
best-coffee-shopsreads as four words whilebestcoffeeshopsreads as one. Hyphens are also the only separator that is never percent-encoded in a URL. - CSS. Class and ID names are case-sensitive and conventionally lowercase, and hyphens avoid the confusion of underscores. The popular BEM methodology (
block__element--modifier) leans on the same idea. - File names. Hyphens are safe on every operating system, whereas some tools treat spaces and uppercase letters inconsistently. Lowercase kebab-case file names avoid case-sensitivity bugs when a file moves between Windows, macOS and Linux.
snake_case is not wrong, it is just used in different places, Python packages, SQL schemas and environment variables, where the surrounding ecosystem already uses underscores. Follow the language, not your personal taste, and your names will match everything around them.
Frequently asked questions
What is the difference between Title Case and Sentence case?
Title Case capitalizes the major words of every phrase, so 'the quick brown fox' becomes 'The Quick Brown Fox'. Sentence case only capitalizes the first word and any proper nouns, giving 'The quick brown fox'. Use Title Case for headings and headlines, and Sentence case for body text and UI labels.
Which words are left lowercase in Title Case?
Short function words are normally left lowercase: articles (a, an, the), coordinating conjunctions (and, but, or, nor, for, yet, so) and short prepositions (of, in, on, at, to, by, for). The first and last words of the title are always capitalized, along with everything longer than four letters.
What is camelCase and when do I use it?
camelCase joins words with no spaces and capitalizes each word after the first, like 'myVariableName'. It is the standard naming style for variables and functions in JavaScript, Java and Swift. PascalCase is the same thing but with the first letter capitalized too, like 'MyClassName', and is used for classes and components.
What are snake_case and kebab-case?
snake_case joins lowercase words with underscores, like 'user_profile_image', and is common in Python, SQL and Ruby. kebab-case joins lowercase words with hyphens, like 'user-profile-image', and is the convention for URLs, CSS class names and HTML attributes because hyphens are URL-safe.
Does the converter change numbers or punctuation?
Numbers are kept as they are. In the developer formats (camelCase, snake_case, kebab-case) punctuation such as periods, commas and apostrophes is treated as a word separator and removed, since those formats cannot contain it. In the plain formats (UPPERCASE, lowercase, Title Case, Sentence case) all punctuation is preserved exactly as you typed it.
What is the difference between camelCase and PascalCase?
Both join words with no separator and capitalize each word, but camelCase leaves the first letter lowercase - 'myVariableName' - while PascalCase capitalizes it too - 'MyClassName'. The convention in most languages is camelCase for variables and functions and PascalCase for classes, types and components.
Should I use kebab-case or snake_case in a URL?
Use kebab-case with hyphens, like 'best-coffee-shops'. Search engines treat hyphens as word separators, so the phrase reads as four words rather than one, and hyphens are never percent-encoded in a URL. Underscores can also be hidden by the underline of a link, making 'user_profile' hard to read.
Does Title Case capitalize 'and', 'the' and 'of'?
Normally no - articles, coordinating conjunctions and short prepositions stay lowercase in Title Case, so 'the war of the worlds' becomes 'The War of the Worlds'. The cutoff this converter uses is 4 letters: a small word of 4 letters or fewer stays lowercase. The exceptions are the first and last words of the title, which are always capitalized, and any of these small words that follow a colon.
What is SCREAMING_SNAKE_CASE?
It is CONSTANT_CASE: all-uppercase words joined by underscores, like MAX_RETRY_COUNT or API_KEY. It is used for constants - values fixed at the top of a program that should never change while it runs - in languages including JavaScript, Python, Java and Go.
How does the converter handle acronyms like 'API' or 'URL'?
In the developer formats it lowercases everything first, so 'API key' becomes 'apiKey' in camelCase and 'api_key' in snake_case. In the plain formats it preserves your original letters, so 'API' stays 'API' in Title Case and Sentence case. Most style guides keep short acronyms of 2 to 4 letters uppercase in prose but lowercase them inside identifiers.
What case conventions do common languages use?
JavaScript, Java and Swift use camelCase for variables and PascalCase for classes; Python and Ruby use snake_case for variables and PascalCase for classes; Go uses PascalCase for exported names and camelCase for unexported ones; C# uses PascalCase for both. CSS and URLs use kebab-case. There are about 4 or 5 dominant conventions in total, and each language picks a consistent set.
Why does my text look wrong after pasting from Word?
Word often applies smart quotes, curly apostrophes and non-breaking spaces that look like ordinary characters but are not. The developer formats strip them automatically because they are not letters or digits, but in the plain formats they survive. If a name will not convert cleanly, retype the quote or apostrophe by hand and try again.
How many letter forms does case conversion work with?
English has 26 uppercase and 26 lowercase letters - 52 letter forms in total - plus 10 digits that case conversion leaves unchanged. That is why UPPERCASE and lowercase never change the length of your text: they only swap one form of a letter for the other.
Spotted a wrong number or a broken result?
More Text tools
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.