Text Tools

Case Converter

Convert text between sentence case, title case, camelCase, snake_case, kebab-case and eight other formats.

Free to use No registration Mobile friendly Unlimited usage

What is the Case Converter?

Text arrives in the wrong case constantly. A product feed comes through in SHOUTING CAPITALS. A colleague sends headings in lowercase. You are naming a variable and the codebase uses snake_case while your fingers default to camelCase. Retyping is slow and introduces typos in exactly the words you were trying to preserve.

This converter handles twelve formats, split roughly into two families: cases for prose, and cases for code.

Cases for writing

Sentence case capitalises the first letter of each sentence and lowercases the rest. This is the workhorse for fixing text that arrived in caps. It looks for terminating punctuation to find sentence boundaries, so a paragraph pasted as one block will come back correctly capitalised throughout.

Title Case capitalises significant words and leaves short joining words - a, the, of, and, in, to - in lowercase, except at the start and end where they are always capitalised. This follows the convention most style guides use for headlines. Style guides do disagree with one another, so check the result against yours if you are working to a house standard.

Capitalise Each Word is the blunter version: every word gets a capital, no exceptions. Useful for names, menu labels and column headers where the title-case rules would look odd.

UPPERCASE and lowercase need no explanation. aLtErNaTiNg and iNVERSE are novelties, though inverse case has a real use: it fixes text typed with caps lock on by mistake, including the inverted capital at the start.

Cases for code

The five programming cases all work the same way underneath. The converter splits your text into words - it understands spaces, hyphens, underscores, dots and the capital letters inside an existing camelCase name - and then rejoins them in the target format.

camelCase for JavaScript variables and JSON keys. PascalCase for class names in most languages. snake_case for Python, Ruby and database columns. kebab-case for URLs, CSS classes and HTML attributes. CONSTANT_CASE for environment variables and configuration keys.

Because the splitter reads existing capitals as word boundaries, conversion between these formats works in any direction. Paste getUserAccountBalance, choose snake_case, and you get get_user_account_balance. Paste that back and choose PascalCase for GetUserAccountBalance. This is the fastest way to translate a block of names when you are porting code between languages with different conventions.

Working line by line

The five code formats treat each line separately, so you can paste a whole column of names and convert them in one pass rather than one at a time. The prose formats treat the text as continuous, which is what you want when you are fixing paragraphs.

One thing worth knowing: acronyms do not survive conversion cleanly. parseHTMLDocument becomes parse_h_t_m_l_document, because there is no reliable way to tell an acronym from a run of single-letter words. If your codebase is full of acronyms, expect to fix those by hand. It is a known limitation of every tool that does this, not just this one.

Benefits of using the Case Converter

Twelve formats in one place

Prose cases and programming cases together, so you are not switching tools when you move between writing and code.

Converts in any direction

Existing capitals are read as word boundaries, so camelCase to snake_case works as easily as the reverse.

Bulk conversion for code

The programming formats process each line separately, so a whole column of names converts in one pass.

Fixes caps lock accidents

Inverse case restores text typed with caps lock on, including the wrongly lowercased first letter.

How to use the tool

Step 1

Paste the text you want to reformat

Step 2

Pick a format from the dropdown - prose cases are listed first, code cases after

Step 3

Press Convert Case to see the result

Step 4

Copy the output, or change the format to compare two options

Popular use cases

  • Fixing ALL CAPS product feeds
  • Headline and title formatting
  • Variable naming in code
  • URL slugs and CSS class names
  • Database column naming
  • Environment variable keys
  • Porting code between languages
  • Cleaning up imported spreadsheet headers

Frequently asked questions

Articles, short conjunctions and short prepositions: a, an, and, as, at, but, by, for, in, nor, of, on, or, the, to, up, with. The first and last words are always capitalised regardless. Style guides differ on the exact list, so compare the output against your house style if you have one.

Title Case follows editorial convention and leaves small joining words lowercase. Capitalise Each Word capitalises everything without exception. Use the first for headlines, the second for names, menu labels and table headers.

Ready to start using TU Web Tools?

Free, browser based utilities for developers, SEO professionals, students and businesses.

Free to use  •  Mobile friendly  •  No installation required