TEXT TOOL

Case Converter

Convert text between UPPERCASE and lowercase, Title Case with small words kept lowercase, Sentence case, and the code styles camelCase, PascalCase, snake_case, CONSTANT_CASE and kebab-case. Copy the result with one click.

Result
Your converted text will appear here.

About this case converter

This case converter rewrites the capitalization of any text: uppercase to lowercase and back, headline-style Title Case, Sentence case, and five naming styles programmers use for variables, constants, files and URLs. Pick a style and the result updates as you type. The conversion runs in your browser with JavaScript, so nothing you paste is uploaded.

How to use it

  1. Paste or type text into the box. A sample heading is loaded so you can see the output.
  2. Click a style. The highlighted button is the one applied; editing the text re-runs it.
  3. For Title Case, choose a rule set: Standard keeps short connecting words lowercase, Simple capitalizes every word.
  4. Copy the result. Each line is converted separately, so a pasted list of headings or column names stays one item per line.

Every case style, with examples

This table shows each style applied to the sample text, a guide to the art of writing clean code, exactly as the tool outputs it:

StyleOutputTypical use
UPPERCASEA GUIDE TO THE ART OF WRITING CLEAN CODELabels, acronyms, emphasis
lowercasea guide to the art of writing clean codeFixing Caps Lock text, tags, email addresses
Title Case (Standard)A Guide to the Art of Writing Clean CodeHeadlines, book and article titles
Title Case (Simple)A Guide To The Art Of Writing Clean CodeMenu items, some product names
Sentence caseA guide to the art of writing clean codeBody text, UI buttons, many web headings
camelCaseaGuideToTheArtOfWritingCleanCodeJavaScript and Java variables and functions
PascalCaseAGuideToTheArtOfWritingCleanCodeClass and type names
snake_casea_guide_to_the_art_of_writing_clean_codePython and Rust functions, database columns
CONSTANT_CASEA_GUIDE_TO_THE_ART_OF_WRITING_CLEAN_CODEConstants, environment variables
kebab-casea-guide-to-the-art-of-writing-clean-codeURLs, CSS classes, file names

How the Title Case converter treats small words

The Standard rule set lowercases these 17 words: a, an, the, and, but, for, nor, or, as, at, by, in, of, on, per, to, via. They are still capitalized when they are the first or last word of a line, or when they follow a colon, period, question mark or exclamation mark. So what are you looking for becomes What Are You Looking For, and star wars: a new hope becomes Star Wars: A New Hope. Every other word gets a capital first letter, skipping leading quotes or brackets, and the rest of the word is lowercased.

This is a common core of headline style, not an exact copy of the AP Stylebook or the Chicago Manual of Style. Those guides differ on longer prepositions and on hyphenated compounds, and some of their rules depend on how a word is used in the sentence, which a converter cannot see. Hyphenated words are treated as one word here, so state-of-the-art becomes State-of-the-art. For a publication with a house style, convert first and then check the small words by hand.

Why Sentence case can't know proper nouns

Sentence case lowercases everything, then capitalizes the first letter of the text and the first letter after a period, question mark or exclamation mark followed by a space. It also turns a standalone i into I. That is all it can do safely. Whether "apple" is fruit or a company, or "bill" is an invoice or a person, depends on meaning that a letter-by-letter rule cannot see. So star wars: a new hope becomes Star wars: a new hope, and names, places, brands and acronyms need to be capitalized again by hand. Abbreviations cause the opposite problem: in i.e. yes, the space after the period makes Yes look like the start of a sentence.

Which case developers use where

How the code styles split words

The five code styles first break each line into words. Any character that is not a letter or digit is a separator, so spaces, hyphens, underscores, dots and brackets all split words and never appear in the output. A lowercase letter followed by a capital also starts a new word, and so does the last capital of an acronym before a lowercase letter. That lets you convert existing identifiers directly: customerFirstName becomes customer_first_name, and XMLHttpRequest becomes xml_http_request. Apostrophes inside a word are dropped, so don't stop becomes dontStop. Accented letters are kept, so café au lait becomes caféAuLait; remove accents first if your language or system only accepts ASCII names.

Letters that don't convert one-to-one

UPPERCASE and lowercase use the browser's language-neutral Unicode case mapping. The German ß has no single capital in that mapping, so straße becomes STRASSE, one character longer. Turkish dotted and dotless i are not handled, so istanbul becomes ISTANBUL, not the Turkish İSTANBUL.

Worked example

With the sample text and the default Standard style, Title Case gives A Guide to the Art of Writing Clean Code. A is capitalized because it is the first word; to, the and of are on the small-word list and stay lowercase. Switch to Simple and every word is capitalized. Click snake_case and the same text becomes a_guide_to_the_art_of_writing_clean_code.

Common mistakes

To check the length of the result, paste it into the Word Counter.

Frequently asked questions

How do I convert uppercase to lowercase?

Paste the text and click lowercase. Every letter is lowered using the browser's Unicode case mapping, so accented capitals such as É become é too. To capitalize only the start of each sentence instead, click Sentence case, which lowercases the text first and then capitalizes sentence starts.

Which words stay lowercase in Title Case?

With the Standard style, these 17 words stay lowercase unless they are the first or last word or follow a colon or sentence-ending punctuation: a, an, the, and, but, for, nor, or, as, at, by, in, of, on, per, to, via. Choose the Simple style to capitalize every word instead.

Why does Sentence case lowercase names and places?

Sentence case only knows where sentences start. It cannot tell whether a word is a proper noun, so names, places, brands and acronyms are lowercased with everything else. The one exception is the pronoun I, which is capitalized when it stands alone. Re-capitalize proper nouns by hand after converting.

What's the difference between camelCase and snake_case?

camelCase joins words with no separator and capitalizes each word after the first, as in myVariableName, and is the usual style for JavaScript and Java variables. snake_case joins lowercase words with underscores, as in my_variable_name, and is what PEP 8 recommends for Python function and variable names.

What is the difference between PascalCase and camelCase?

Both join words without separators and capitalize each new word. camelCase starts with a lowercase letter, as in orderTotal, while PascalCase also capitalizes the first letter, as in OrderTotal. Many languages use PascalCase for class or type names and camelCase for variables and functions.

How do I convert camelCase to snake_case?

Paste the camelCase names, one per line, and click snake_case. The converter starts a new word wherever a lowercase letter is followed by a capital, so customerFirstName becomes customer_first_name. Acronyms are split too, so XMLHttpRequest becomes xml_http_request.

Is my text uploaded anywhere when I convert it?

No. All case conversion happens locally in your browser with JavaScript, and nothing you type or paste is sent to a server. The page keeps working if you go offline after it has loaded.