Skip to content
ToolShelf

Case converter

Turn any text into upper, lower, title, sentence, camel, snake and kebab case together, each with its own copy button and no mode to switch between.

Your text

Your text stays in this tab. The work is done by JavaScript in your browser. None of it is uploaded, logged or saved, and the tool keeps working with the network off.

Title case style

Title case style

Chicago, AP, APA and MLA all capitalise different small words. Neither option here is “correct”, pick the one that matches the style guide you are writing to.

Sentence case cannot keep your proper nouns

It lowercases everything and capitalises after each full stop, so “I met Sarah in Berlin” comes back as “I met sarah in berlin”. Telling a name from an ordinary word needs a dictionary of names, so the fixing is left to you rather than guessed at.

UPPERCASE

—

lowercase

—

Title Case

—

Sentence case

—

camelCase

—

snake_case

—

kebab-case

—

Title case against sentence case

Title case capitalises the significant words in a heading: “The Lord of the Rings”. Sentence case capitalises only what a sentence would: “The lord of the rings”. Most style guides for the web now prefer sentence case for headings, on the grounds that it reads faster and is far easier to apply consistently across a large site.

Which small words stay lowercase in title case is a style decision rather than a rule. Chicago keeps prepositions lowercase whatever their length; AP capitalises anything of four letters or more; APA and MLA draw the line elsewhere again. The two options here are “headline style”, close to AP, and “every word”. Neither is correct in the abstract, match whatever you are writing to.

The first and last words are always capitalised in headline style, however small. That much every guide agrees on.

What sentence case cannot do

It lowercases everything and then capitalises after each full stop. Which means proper nouns are lost: “I met Sarah in Berlin” comes back as “I met sarah in berlin”.

There is no fixing this without a dictionary of names, and a tool that guessed would be wrong in exactly the places you would not check. So it does the mechanical part and leaves the names to you. It is stated on the page rather than discovered afterwards.

The three code cases

camelCase for variables in JavaScript and Java, snake_case for Python, Ruby and database columns, kebab-case for CSS classes, HTML attributes and URLs. Same words, different joins, which is why converting between them is such a frequent chore.

Words are found by splitting on spaces, punctuation, hyphens and underscores, and also at the case boundaries inside an existing identifier. A run of capitals stays together, so HTTPServer becomes http-server rather than https-erver.

Accents survive

Crème Brûlée becomes crème-brûlée rather than losing its accents, because they are part of the letters. If you want them folded away for a URL, that is a different job and the slug generator does it.

Questions

Is my text sent anywhere?
No. Every case is worked out in your browser and nothing is uploaded, logged or stored. The page keeps working with the network off.
What is the difference between title case and sentence case?
Title case capitalises the significant words in a heading: 'The Lord of the Rings'. Sentence case capitalises only the first word of each sentence: 'The lord of the rings'. Most style guides now prefer sentence case for headings on the web, because it is easier to read and easier to be consistent about.
Why does title case leave some words lowercase?
Headline style keeps articles, short conjunctions and short prepositions lowercase unless they open or close the title, so 'The Lord of the Rings', not 'The Lord Of The Rings'. Switch to 'every word' if your style guide capitalises everything. Chicago, AP, APA and MLA all draw the line in slightly different places, so neither option is universally correct.
Why did sentence case lowercase someone's name?
Because it cannot tell a name from an ordinary word. Sentence case works by lowercasing everything and then capitalising after each full stop, so 'Sarah' and 'Berlin' come back lowercase. Recognising proper nouns needs a dictionary of names, and a tool that guessed would be wrong in ways that are hard to spot. Fix those by hand afterwards.
What are camelCase, snake_case and kebab-case for?
Naming things in code. camelCase is the convention for variables in JavaScript and Java; snake_case for Python, Ruby and database columns; kebab-case for CSS classes, HTML attributes and URLs. They all mean the same words joined differently, which is why converting between them is such a common chore.
How does it split words for camelCase?
On spaces, hyphens, underscores and punctuation, and also at the case boundaries inside an existing identifier, so 'helloWorld-foo_bar' becomes four words. Runs of capitals are kept together, which is why 'HTTPServer' splits as HTTP and Server rather than HTTPS and erver.
Why are all seven shown at once?
Because the job is usually comparing two of them and taking whichever reads better. A mode switch turns that into clicking back and forth and holding the last one in your head. They cost nothing to compute, so they are all just there, each with its own copy button.
Does it keep accents?
Yes. 'Crème Brûlée' becomes 'crème-brûlée' in kebab-case rather than losing the accents, because they are letters. If you want them folded away for a URL, that is what the slug generator is for.

More tools