Skip to content
Browse tools

Text Case Converter: Title Case, Sentence Case, Slugs & Code Variables

Convert text between UPPERCASE, lowercase, Title Case, Sentence case, URL slugs, camelCase, PascalCase and snake_case — with undo.

Writing · Free · Last updated 2 October 2026

Your text

How the Text Case Converter & Formatter works, and how to get more out of it

The styles, and what each one is for

  • UPPERCASE — every letter capitalised. Used for short labels and warnings; hard to read in bulk because word shapes disappear.
  • lowercase — every letter reduced. Occasionally needed to repair text typed with caps lock engaged.
  • Title Case — major words capitalised, minor words left lowercase. The convention for headlines, headings and titles of works.
  • Sentence case — only the first word of each sentence capitalised. The standard for body copy, UI labels and most modern editorial style guides.
  • url-slug — lowercased and hyphen-separated, with accents transliterated and punctuation removed, for use in a URL path.
  • camelCase / PascalCase / snake_case — identifier conventions for code and database columns.

Title case is a style, not a rule

There is no single correct title case. The major style guides disagree on the details: which words count as minor, whether the last word is always capitalised, and how hyphenated compounds are treated. This tool applies the most widely used convention, which is close to AP and Chicago for short headlines:

  • The first and last words are always capitalised, whatever part of speech they are.
  • Minor words — articles, short conjunctions and short prepositions — are lowercase in the middle of the title.
  • Every other word is capitalised.
  • Hyphenated compounds: the first element is capitalised and later elements are capitalised unless they are minor words, so 'state-of-the-art' becomes 'State-of-the-Art'.

Acronyms, mixed case, and caps lock

Acronyms and initialisms are left alone, so 'API' and 'SaaS' survive rather than becoming 'Api' and 'Saas'. Mixed-case product names like 'iPhone' and 'macOS' are preserved for the same reason.

One deliberate exception: if the entire input is already capitals — someone has typed with caps lock on — acronym preservation is switched off, otherwise every word would look like an acronym and title case would change nothing. All-caps input is treated as a mistake to repair rather than a set of initialisms to respect.

If your house style differs — capitalising all prepositions over four letters, for example — treat the output as a starting point rather than the final answer.

Sentence case and why it keeps winning

Sentence case capitalises the first word of each sentence and nothing else. After a full stop, question mark, exclamation mark or a line break, the next letter is capitalised; everything else is lowered.

Its advantage is that it stops the reader's eye. Title Case gives every significant word equal visual weight, so nothing stands out and scanning is harder. Sentence case carries one capital per sentence and lets the reader move down the page without stopping at each word. That is why most product interfaces, design systems and modern editorial style guides use it.

One limitation to know about: sentence case detection relies on punctuation. A heading with no full stop, or an abbreviation like 'Dr.' mid-sentence, can produce a capital in the wrong place. Read the output before pasting it.

Slugs: what belongs in a URL

A slug is the human-readable part of a URL path. Good slugs are lowercase, hyphen-separated, free of punctuation, and short enough to read in a search result. Hyphens are the convention rather than underscores because search engines treat hyphens as word separators and underscores as joiners — 'white-horse' reads as two words, 'white_horse' as one.

Accents are transliterated rather than deleted, so 'Café Déjà Vu' becomes 'cafe-deja-vu' instead of 'caf-d-j-vu'. That distinction matters: strip accents naively and the words become unreadable or collide with each other.

Two cautions. Changing a slug after a page is indexed breaks the old URL unless you redirect it, and the value in the slug itself is minimal — it mostly helps a human decide whether a result is worth clicking. Do not churn slugs in pursuit of a ranking.

Identifier conventions in code

Programming styles are conventions agreed by a language community, not laws — but they are enforced by linters, so getting them wrong costs you a review cycle.

  • camelCase — first word lowercase, each later word capitalised. Standard for variables and functions in JavaScript, Java and TypeScript. totalOrderValue
  • PascalCase — every word capitalised, including the first. Standard for classes, types, components and file names in most JavaScript ecosystems. OrderSummaryCard
  • snake_case — words separated by underscores, all lowercase. The convention for columns and tables in PostgreSQL and MySQL, and for variables in Python and Ruby. total_order_value

Why naive conversion breaks identifiers

Converting between them is the common case, and it is where naive tools fail. Splitting on separators alone cannot see the boundary inside an existing camelCase or PascalCase name, so converting to camelCase usually wrecks names that were already camelCase. This converter detects boundaries in all three styles before recombining, so 'totalOrderValue', 'TotalOrderValue' and 'total_order_value' all round-trip correctly.

Why conversion here is reversible

Case conversion destroys information. Converting to UPPERCASE and then back to Title Case cannot recover the original capitalisation, because it was discarded on the way down. That is a property of the operation, not a flaw in the tool.

Because the loss is usually discovered after the fact — the wrong button, or a style you decide against — this converter keeps a history and offers undo, rather than making a single click irreversible. It runs entirely in your browser, so long documents are not sent anywhere and paste is instant.

Frequently asked questions

Does Title Case leave small words like 'and' and 'the' lowercase?

Yes, in the middle of the title. Minor words — articles, short conjunctions and short prepositions — stay lowercase, except when they are the first or last word, which are always capitalised. Note that style guides disagree on the details; treat the output as a starting point if your house style differs.

Why did my camelCase text lose its capital letters?

That is the classic failure of naive implementations, which lowercase the whole string before looking for separators and cannot see the boundary inside a name like 'myVarName'. This converter detects camelCase, PascalCase and snake_case boundaries first, so 'totalOrderValue' survives a round trip between all three.

Is there a length limit?

No practical one. Conversion runs in your browser and scales with the document size. The only real constraint is your device's memory on extremely large inputs.

How does the slug conversion handle accents?

Accents are transliterated rather than stripped, so 'Café Déjà Vu' becomes 'cafe-deja-vu'. Naive stripping would give 'caf-d-j-vu', which is unreadable and can collide with other pages.

Should I use hyphens or underscores in a URL slug?

Hyphens. Search engines treat hyphens as word separators and underscores as joiners, so 'white-horse' reads as two words while 'white_horse' reads as one. Underscores are also hard to see in an underlined link.

Can I undo a conversion?

Yes. Case conversion discards information — you cannot recover original capitals after converting to UPPERCASE — so this tool keeps a history and offers undo rather than making one click irreversible.

Does converting change my original text?

It replaces the text in the editor and keeps the previous version in the undo history. Nothing is uploaded, and nothing is sent to a server.

Which case should I use for headings?

Sentence case is generally easier to scan, because Title Case gives every significant word equal visual weight so nothing stands out. Many design systems and modern style guides use sentence case for that reason. Title case remains common for titles of works and formal headlines.