Case Converter

Rewrite text as camelCase, snake_case, kebab-case, Title Case and six more, in your browser.

Runs entirely in your browser. Nothing is uploaded, logged or stored.

Every language and every team has settled on a different way of joining words into a name, and the conversions between them are the sort of thing that is quick by hand until there are forty of them. Paste the names, pick the convention, take the result.

How it works

The text is first split into words. Anything that is not a letter or a digit separates them, and so does a lower-case letter followed by a capital: userName is two words. A run of capitals followed by a capitalised word splits before the last capital, so parseHTTPResponse gives parse, HTTP and Response rather than one word or two.

A letter next to a digit does not split, which keeps utf8 and sha256 intact. Then each convention is simply a way of joining those words back together.

Title Case, Sentence case, UPPER and lower are different in kind: they keep the punctuation and spacing you wrote, because a sentence is still a sentence afterwards. The identifier styles discard the layout, because an identifier has none.

Examples

Case Input Result
An acronym inside an identifier parseHTTPResponse parse_http_response
A phrase becoming a constant maximum retry count MAXIMUM_RETRY_COUNT
A version number that must survive utf8 encoder v2 utf8EncoderV2

Frequently asked questions

Why does HTTPResponse become http_response and not h_t_t_p_response?

Because a run of capitals is read as one word. The split happens before the last capital of the run when a lower-case letter follows it, which is the only reading that recovers both the acronym and the word after it.

Why is Title Case not the same as PascalCase?

PascalCase is an identifier: the spaces are gone. Title Case is prose with capitals, so the spaces and punctuation stay exactly where you put them.

Does it leave small words in lower case in Title Case?

No. Every word is capitalised. Which words a style guide leaves in lower case differs between the guides and between languages, and applying one of them silently would be a decision this tool has no basis to make.

What happens to accented letters?

They are kept and their case is converted properly, so élève becomes ÉLÈVE. Removing accents is a different job, and the slug generator does it.

What is the Turkish option for?

Turkish and Azerbaijani write the dotted and the dotless i as two letters, so the capital of i is İ and the small letter of I is ı. Without the option, istanbul becomes ISTANBUL, which is a misspelling there; with it, İSTANBUL. It is ticked by default only on pages written in those languages, because the text you paste need not be in the language of the page.

Good to know

  • Everything happens in your browser. What you paste is not uploaded, not logged and not stored.

All Code tools