Text case converter

Switch text between UPPER, lower, Title, Sentence, camel, Pascal, snake, kebab and slug

The tool loads here. It needs JavaScript, because the work happens on your device.

Your files and your privacy

Every transformation is a function running in this browser tab, applied to a string held in memory. Nothing is uploaded, nothing is autosaved and nothing survives a reload, so pasting a draft or a block of source code here leaves no copy anywhere, including on a shared machine.

What this tool does

Nine case transformations applied to the whole text box, each one undoable. The programmer cases share a word splitter that understands camelCase boundaries and runs of capitals, and the slug transform folds accents to their base letters instead of deleting them.

It rewrites the capitalisation of the whole text box in one step, with nine targets: UPPER, lower, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and a URL slug. The four programmer cases share one word splitter, so they agree about where words begin — including inside an identifier that contains no spaces at all. Each transformation pushes the previous text onto an undo stack, so a conversion that turns out wrong costs one click to reverse rather than a re-paste.

How to use it

  1. Paste your text into the box. Transformations apply to all of it, so paste only what you want changed.
  2. Select the case you want from the Case row. The result replaces the text in the box and a confirmation names what was applied.
  3. Check any acronym or proper noun in the result, since title and sentence case both lower-case letters they do not think should be capitalised.
  4. Select Undo to step back, or copy or download the text when it is right.

Example use cases

Supported input and output

Accepts

Produces

What this tool will not do

Common mistakes

Technical notes

Upper and lower case call the JavaScript string methods directly, applying the default Unicode case mappings rather than locale-tailored ones. Title case rewrites each run of a letter followed by letters, combining marks or apostrophes, upper-casing the first character and lower-casing the rest, which is why it flattens acronyms. Sentence case lower-cases the whole string first, then capitalises the opening letter and the first letter after a sentence terminator followed by whitespace. The programmer cases share a splitter that breaks on runs of non-alphanumeric characters, on a lower-case letter or digit followed by a capital, and on a run of capitals followed by a capital-then-lower-case pair — the rule that separates HTTP from Response in parseHTTPResponse. Slugs are normalised to NFD and stripped of combining marks before lower-casing, so an accent folds to its base letter.

Frequently asked questions

What is the difference between kebab-case and a slug?
Both join lower-cased words with hyphens, but the slug transform also folds accents to base letters and removes anything that is not a letter or a digit. ‘Café Crème’ gives ‘café-crème’ as kebab-case and ‘cafe-creme’ as a slug.
Why did Title Case break my acronym?
Title case upper-cases the first letter of each word and lower-cases the rest, with no dictionary of acronyms behind it, so NASA becomes Nasa. Fix acronyms after converting, or use a different transformation.
Does sentence case know about names?
No. It lower-cases everything and then capitalises the first letter of each sentence, so proper nouns need correcting by hand. That is the trade-off for a transformation that reliably fixes text written in capitals.