Text Case Converter

Built and verified by pengchun · Last reviewed · How we verify

Convert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case and kebab-case. Free online tool that runs entirely in your browser.

Result appears here...

What each of the nine cases does

A case converter looks trivial until you need a specific one: a slug for a web address, a column name for a database, a variable for JavaScript, a headline that follows a style guide. Each of those has its own convention, and the difference between them is exactly what a converter settles in one click.

Here is the same sentence pushed through all nine modes, so you can see what each one is for before you use it:

Mode"The Quick Brown Fox" becomesWhere it is used
UPPERCASETHE QUICK BROWN FOXLabels, warnings, headings that have to shout
lowercasethe quick brown foxNormalising input before comparing it
Title CaseThe Quick Brown FoxHeadlines, page titles, book titles
Sentence caseThe quick brown foxSentences, list items, modern UI copy
camelCasetheQuickBrownFoxJavaScript and Java variables, JSON keys
PascalCaseTheQuickBrownFoxClass and component names, C# and Go exports
snake_casethe_quick_brown_foxPython and Ruby names, database columns
kebab-casethe-quick-brown-foxURL slugs, CSS class names, file names
CONSTANT_CASETHE_QUICK_BROWN_FOXConstants and environment variables

UPPERCASE, lowercase and Sentence case work on the string as a whole and keep your line breaks. The other six are built from words, so they rebuild the text with a single separator and collapse whitespace in the process.

How the converter decides where one word ends

Everything except UPPERCASE, lowercase and Sentence case starts by splitting your text into words, and that split is where most surprises come from. Any run of characters that is not a letter or a digit counts as a separator, so spaces, hyphens, underscores, punctuation and line breaks all do the same job. On top of that, a lowercase letter or a digit followed by a capital letter is treated as a word boundary, which is what lets the converter read camelCase input.

You pasteWords the converter seessnake_case result
userProfileIDuser, Profile, IDuser_profile_id
kebab-case-textkebab, case, textkebab_case_text
café résumécafé, résumécafé_résumé
v2 releasev2, releasev2_release
don'tdon, tdon_t
iPhonei, Phonei_phone

Two of those rows are worth pausing on. An apostrophe is punctuation, so it separates: don't becomes two words and snake_case turns it into don_t. And a lower-case letter at the start of a camelCase word is its own word, so iPhone becomes i_phone. Neither is a defect in the converter; both are consequences of splitting on boundaries rather than on meaning, and both are easy to fix by hand afterwards.

Title case is not one rule

Style guides disagree about title case, and the disagreement is always about small words. This converter capitalises every word, which is the simplest rule to predict: lord of the flies becomes Lord Of The Flies, with Of and The capitalised. Chicago and AP style would lowercase those, and different publications handle hyphenated words and prepositions differently again.

That makes the tool a good first pass and a poor final authority. Convert, then adjust the two or three small words your style guide cares about — which is much faster than typing a headline in title case from scratch, and it never leaves a stray lowercase word in the middle.

Sentence case throws away the rest of the capitalisation

Sentence case works by lowercasing the entire string and then capitalising the first letter of each sentence, including after a full stop, a question mark or an exclamation mark. That is the correct behaviour for tidying up text typed with the caps lock on, and it is destructive for anything with meaningful capitals inside it: NASA launched the ISS comes back as Nasa launched the iss.

If the text contains acronyms, proper nouns or product names, convert the sentence structure first and then restore the capitals you care about. There is no automatic way to tell the converter that ISS is an acronym and The is not.

Acronyms do not survive the identifier modes

The identifier modes — camel, Pascal, snake, kebab and CONSTANT — lowercase every word before rebuilding, so an acronym like ID or HTTP ends up as id and http: HTTP API v2 becomes http_api_v2. That is usually what you want for a column name, and it is the one thing to check if your project's convention is to keep acronyms uppercase in identifiers.

Digits are treated as word characters, which means a version number stays attached to the word it belongs to: v2 release is two words, not three, and v2 keeps its shape through every mode.

Accents, and the letters outside A to Z

Letters with accents and letters from other alphabets are letters, so the converter keeps them: café résumé becomes café_résumé, not caf_r_sum, and ÜberNice splits into Über and Nice. Only things that are not letters or digits act as separators.

One caveat is worth stating plainly: the case mapping is the one built into your browser, which is deliberately locale-independent. That means the letter i always uppercases to I and never to the dotted capital İ used in Turkish, and a few other languages have similar rules. For English and most Latin-script text it makes no difference; for Turkish it does, and the conversion has to be corrected by hand.

Choosing the right case for the job

For a URL slug, use kebab-case: hyphens are the separator search engines treat as a word break, and they survive being pasted into an address bar without escaping. If you want to see what happens to a slug once it enters a URL, the URL encoder and decoder will show you which characters have to be escaped and which do not.

For a database column or a Python variable, use snake_case; for a JavaScript variable or a JSON key, use camelCase and stay consistent within a payload. If you are tidying the keys of a JSON document, the JSON formatter will re-indent it so you can see the whole structure while you work through the names.

And if what you actually need is a count rather than a conversion — a headline that has to fit a character limit, or a paragraph that has to fill a fixed time — the word counter is the tool for that side of the problem.

Checking the result before you paste it

Two habits catch almost every bad conversion. First, convert a short sample before converting the whole document, because the word-splitting rules are easier to see in one sentence than in a page. Second, look for the giveaway shapes: a stray underscore at either end, a double separator where your text had punctuation, or a lowercase word where an acronym should be.

Identifiers cannot contain spaces or punctuation, so the converter removes them by design. If you paste a three-line paragraph into snake_case you will get one long identifier, not three — the line breaks were separators, and separators become the underscore. Text that has to keep its structure belongs in UPPERCASE, lowercase or Sentence case, which leave the original string intact apart from the letters they change.

Frequently asked questions

What is title case, and which words should be capitalised?

This converter capitalises every word, so "lord of the flies" becomes "Lord Of The Flies". Most style guides lowercase short words such as of, the and and, so treat the result as a first pass and adjust those few words to match the guide you are following.

Why did my acronyms come back as normal words?

Because the identifier modes lowercase every word before rebuilding the text, so ID becomes id and HTTP becomes http. That is the usual convention for database columns and environment variables, but if your project keeps acronyms uppercase you will need to restore them by hand.

Which case should I use for a URL slug?

kebab-case, with hyphens between the words. Search engines treat a hyphen as a word break inside a URL, and hyphens never need percent-encoding, so the slug stays readable in the address bar and in links copied out of a browser.

Does the converter keep my line breaks?

UPPERCASE, lowercase and Sentence case leave the string as it is apart from the letters they change, so line breaks survive. The six word-based modes rebuild the text with a single separator, so a paragraph becomes one long identifier with underscores or hyphens where the breaks were.

Does it work with accented and non-English letters?

Yes: letters outside A to Z count as letters, so "café résumé" becomes "café_résumé" rather than losing the accents. The case mapping itself is the browser's, which is locale-independent, so Turkish text may need the dotted capital İ corrected by hand.

← Back to all tools