Content & Text

Case Converter

This case converter rewrites text in eleven styles, from UPPERCASE and Title Case for headlines to camelCase, snake_case and kebab-case for code. For programming styles it first splits the text into words at spaces, punctuation and lower-to-upper letter changes, so “XMLHttpRequest user_id” becomes xml_http_request_user_id in snake_case.

Last updated Reviewed by ToolsPulse Hub

How to use the case converter

  1. Type or paste your text in the top box.
  2. Pick a style. The result appears below straight away and keeps updating if you edit the text.
  3. Try another style with one click; your original text is never changed.
  4. Copy the result, or use it as the new input to chain conversions.

How each style is built

Writing styles change letters but keep your spacing and punctuation. Programming styles rebuild the text from a list of words, so they first need to find where each word starts:

Split points: spaces, punctuation, _ and -, a lowercase letter followed by an uppercase one (helloWorld), an acronym followed by a word (XMLHttp → XML Http) camelCase first word lowercase, others capitalised, joined PascalCase every word capitalised, joined snake_case lowercase, joined with _ kebab-case lowercase, joined with - CONSTANT_CASE uppercase, joined with _

Title Case follows the common AP-style rule: capitalise words of four or more letters and all nouns, verbs and adjectives, but keep short articles, conjunctions and prepositions such as “a”, “and”, “of” and “the” in lowercase, unless they are the first or last word. Acronyms such as NASA are left in capitals. Sentence case lowercases everything, then capitalises the first letter of each sentence and the pronoun “I”.

Worked example

Starting from “the quick brown fox jumps over the lazy dog”, Title Case gives The Quick Brown Fox Jumps Over the Lazy Dog. “Over” is capitalised because it has four letters, while the second “the” stays lowercase.

From “helloWorld XMLHttpRequest user_id”, camelCase gives helloWorldXmlHttpRequestUserId and kebab-case gives hello-world-xml-http-request-user-id.

Which case should you use?

WhereUsual style
US news and blog headlinesTitle Case
UK government and many UK publishersSentence case
JavaScript variables and functionscamelCase
Classes in Java, C# and TypeScriptPascalCase
Python variables, SQL columnssnake_case
URLs, CSS classes, file nameskebab-case
Environment variables and constantsCONSTANT_CASE

Check names and acronyms afterwards

Automatic conversion cannot know that “iPhone”, “McDonald” or “eBay” have unusual capitals, or that “US” in a sentence means a country and not the word “us”. Title Case keeps short all-capital words such as NASA, but Sentence case and lowercase flatten them. Give brand names and acronyms a quick read before you publish.

Key features

  • Eleven styles, including dot.case and inverse case.
  • Smart word splitting for camelCase and acronyms.
  • Handles accented letters and non-English alphabets.
  • Keeps line breaks in writing styles.
  • Runs locally, so drafts and code stay private.

Practical use cases

Fixing caps lock. Paste a paragraph typed in capitals and switch it to Sentence case instead of retyping it.

Naming in code. Turn a field label such as “Billing postal code” into billingPostalCode for JavaScript, billing_postal_code for a database column, or BILLING_POSTAL_CODE for a config key.

SEO-friendly URLs. Convert a page title to kebab-case for a clean slug, then remove any filler words you do not need.

Frequently asked questions

This tool runs entirely in your browser and is provided as-is. See our terms and privacy policy.