Case Converter: Change Text to Upper, Lower, Sentence or Title Case

Paste your text into the case converter below, then click the case you want. It rewrites the text in place: Sentence case, lower case, UPPER CASE, Capitalized Case, Title Case, alternating and inverse case, plus six programming cases (camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and dot.case). Undo steps back one change at a time, and Copy text puts the result on your clipboard.

Everything runs in your browser. Nothing you paste is sent to our server or saved anywhere.

Text
Code (one result per line)

What each case looks like

Here is the same phrase, “how to change the case of a heading,” run through every button. These outputs come straight from the converter above.

CaseResultCommon uses
Sentence caseHow to change the case of a headingBody text, headings in most style guides, UI labels
lower casehow to change the case of a headingNormalizing text before comparing or sorting it
UPPER CASEHOW TO CHANGE THE CASE OF A HEADINGShort labels, buttons, warnings
Capitalized CaseHow To Change The Case Of A HeadingNames and lists where every word should start with a capital
Title CaseHow to Change the Case of a HeadingArticle titles, book and film titles
aLtErNaTiNg cAsEhOw To ChAnGe ThE cAsE oF a HeAdInGJokes and memes
iNVERSE cASEHOW TO CHANGE THE CASE OF A HEADINGFixing text typed with Caps Lock on by accident
camelCasehowToChangeTheCaseOfAHeadingJavaScript variables and functions, JSON keys
PascalCaseHowToChangeTheCaseOfAHeadingClass names, React components
snake_casehow_to_change_the_case_of_a_headingPython and WordPress PHP functions, database columns
kebab-casehow-to-change-the-case-of-a-headingURLs and slugs, CSS classes, file names
CONSTANT_CASEHOW_TO_CHANGE_THE_CASE_OF_A_HEADINGConstants such as WP_DEBUG, environment variables
dot.casehow.to.change.the.case.of.a.headingSome config and translation keys
Every case applied to the same input.

Inverse case turned the all-lowercase example into capitals because it swaps each letter. Run it on “hELLO wORLD” and you get “Hello World” back.

How the converter handles tricky text

Simple converters lowercase everything first, which turns “WordPress” into “Wordpress” and “PHP” into “Php.” This one follows a few rules so that doesn’t happen:

  • Words with a capital letter in the middle, like WordPress or iPhone, keep their original casing in the text cases.
  • Words in all capitals, like PHP or SEO, are treated as acronyms and kept, unless most of your text is in capitals. Then it assumes Caps Lock was on and lowercases everything.
  • Title Case leaves short words (a, an, and, as, at, but, by, for, in, nor, of, on, or, per, the, to, vs, via) in lowercase, except as the first or last word or right after a colon.
  • The code cases split camelCase and PascalCase input into words, strip accents (é becomes e) and drop punctuation. Each line is converted on its own, so you can paste a whole list of names.
ButtonInputOutput
Title Casethe best plugins for a faster siteThe Best Plugins for a Faster Site
Title Casewhat to look for in a hostWhat to Look for in a Host
Title CaseTHE LORD OF THE RINGSThe Lord of the Rings
Sentence casei updated WordPress. now PHP 8.4 runs fine.I updated WordPress. Now PHP 8.4 runs fine.
Sentence caseTHIS WHOLE LINE WAS TYPED WITH CAPS LOCK ONThis whole line was typed with caps lock on
Capitalized Caseself-hosted wordpress vs. iPhone appsSelf-Hosted Wordpress Vs. iPhone Apps
snake_caseXMLHttpRequestxml_http_request
camelCaseget user IDgetUserId
snake_caseWordPress site URLword_press_site_url
kebab-caseCafé Déjà Vu!cafe-deja-vu
kebab-casewp_get_current_user()wp-get-current-user
Edge cases, tested on the converter above.

Two rows are worth a second look. “wordpress” in the Capitalized Case row was typed in lowercase, so the converter had no brand casing to keep and capitalized only the first letter. And the code cases read “WordPress” as two camelCase words, giving word_press. If you want wordpress_site_url, type the brand in lowercase before converting.

Title Case vs Capitalized Case vs Sentence case

These three get mixed up more than any others:

CaseRuleExample
Sentence caseCapitalize the first word and proper nouns onlyHow to speed up a WordPress site
Title CaseCapitalize major words, keep short articles, conjunctions and prepositions lowercaseHow to Speed Up a WordPress Site
Capitalized CaseCapitalize every word, including the short onesHow To Speed Up A WordPress Site
The three headline styles side by side.

Style guides disagree on the details of Title Case. AP style capitalizes prepositions of four or more letters (“With,” “From”), while Chicago keeps all prepositions lowercase. The converter uses one short list of lowercase words that works for most headlines. If you need a specific style, Title Capitalize lets you choose AP, Chicago, APA, MLA and others.

For headings on the web, sentence case is the safer default. Google’s developer documentation style guide says to use sentence case for document titles and headings, and it is easier to read in long lists of links.

Programming cases and where each one is used

Code cases matter more than text cases, because many languages and tools enforce them. WordPress has its own rules for PHP, set out in the WordPress PHP coding standards:

What you are namingWordPress conventionExample
Functions, variables, hooksLowercase with underscores (snake_case), never camelCaseget_the_title(), save_post
ClassesCapitalized words separated by underscoresWP_Query, WP_REST_Request
ConstantsUpper case with underscores (CONSTANT_CASE)WP_DEBUG, ABSPATH
File namesLowercase with hyphens (kebab-case)class-wp-query.php
Post slugs and URLsLowercase with hyphens/case-converter/
WordPress naming conventions by type.

Note that WordPress classes are not PascalCase. WP_Query keeps underscores between the capitalized words, which the PascalCase button removes. Outside WordPress, JavaScript uses camelCase for variables and functions and PascalCase for classes and components, Python uses snake_case for functions and variables, and CSS class names are usually kebab-case. Our kebab case guide covers where hyphens are required and where they break things.

For slugs, WordPress does the conversion itself when you save a post: it lowercases the title and swaps spaces for hyphens, which is the same idea as the kebab-case button. Our guide to WordPress permalinks explains how slugs fit into your URL structure.

How to change case without a tool

If you are already inside another app, most of them have a built-in option:

WhereHowWhat you get
Microsoft WordSelect the text and press Shift+F3Cycles through lowercase, UPPERCASE and Capitalize Each Word
Google DocsFormat, then Text, then Capitalizationlowercase, UPPERCASE or Title Case
Excel and Google Sheets=LOWER(A1), =UPPER(A1), =PROPER(A1)Lower, upper and each word capitalized. Excel’s PROPER also capitalizes any letter after a non-letter, so “it’s” becomes “It’S”
CSStext-transform: uppercase (or lowercase, capitalize)Changes how text looks on screen without changing the text itself
PHPstrtolower(), strtoupper(), ucwords(), ucfirst()Lower, upper, each word capitalized, first letter capitalized
JavaScriptstr.toLowerCase(), str.toUpperCase()Lower and upper case only
Built-in case conversion in common tools.

None of these handle sentence case, real title case or the code cases, which is where the converter above saves time. If you are cleaning up text for a post, the sentence counter and our guide to checking word count in WordPress pair well with it.

Frequently asked questions

How do I convert uppercase text to lowercase?

Paste the text into the box at the top of this page and click “lower case.” If you want normal capitalization back instead of all lowercase, click “Sentence case,” which capitalizes the first word of each sentence and keeps names like WordPress intact.

Is the text I paste saved or sent anywhere?

No. The converter is a small script that runs in your browser. Your text never leaves your device, and it is gone when you close the page.

What is the difference between Title Case and Capitalized Case?

Title Case keeps short words such as “a,” “of” and “the” in lowercase unless they start or end the title. Capitalized Case capitalizes every word, short ones included.

What is the difference between camelCase and PascalCase?

Both join words without spaces and capitalize each new word. camelCase starts with a lowercase letter (myVariableName) and PascalCase starts with a capital (MyClassName).

Can I convert a list of variable names at once?

Yes. Put one name per line and click any of the code buttons. Each line is converted on its own, so a list of ten names comes back as ten converted names.

Why did my all-caps text come out in lowercase instead of keeping the acronyms?

When most of the words are in capitals, the converter assumes Caps Lock was on and lowercases everything, because it cannot tell an acronym from a shouted word. In mixed text, short all-caps words like PHP or SEO are kept.

Picture of Andy Feliciotti

Andy Feliciotti

Andy has been a full time WordPress developer for over 15 years. Through his years of experience has built 100s of sites and learned plenty of tricks along the way. Found this article helpful? Buy Me A Coffee

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Tips Monthly
Get the latest from SmartWP to your inbox.