Home › Text Tools › Case Converter

Case Converter

Convert text to camelCase, snake_case, kebab-case, Title Case and more.

Choose a format to see the result.
Everything runs in your browser. Nothing you type is sent or stored.

How to use

  1. Type or paste your text into the Your text box. It can be a phrase, a variable name or a whole sentence.
  2. Press one of the nine format buttons. The result appears in the result panel straight away. If the box is empty the tool asks you to type something first.
  3. Press another button to see the same text in a different format. The input is never changed, so you can try every format in turn.
  4. Press Copy result to put the result on the clipboard, or Clear to empty the box and start again.

Worked example

Take the input parse HTTPServer_response-time v2. The tool gives these results:

ButtonResult
camelCaseparseHttpServerResponseTimeV2
PascalCaseParseHttpServerResponseTimeV2
snake_caseparse_http_server_response_time_v2
kebab-caseparse-http-server-response-time-v2
CONSTANT_CASEPARSE_HTTP_SERVER_RESPONSE_TIME_V2
Title CaseParse Httpserver_response-time V2
Sentence caseParse httpserver_response-time v2

The first five rows are identifier formats. They find the words parse, HTTP, Server, response, time and v2, then join them. The last two rows work on the text as written, so the underscore and hyphen are left alone and HTTPServer becomes one word, Httpserver.

How it works

For identifier formats, the text is split into words in three steps. A boundary is inserted where a lower-case letter or digit is followed by an upper-case letter (fooBar gives foo and Bar). A second boundary is inserted between a run of capitals and a following capitalised word (HTTPServer gives HTTP and Server). Finally, anything that is not a letter or a digit is treated as a separator and dropped. Each word is then lower-cased, capitalised or upper-cased and joined with nothing, an underscore or a hyphen.

These conventions come from programming style guides rather than from one standard. camelCase is common for JavaScript variables, PascalCase for class and type names, snake_case for Python and Ruby names and database columns, kebab-case for CSS classes and URL slugs, and CONSTANT_CASE for constants and environment variables. The MDN JavaScript code style guide shows the JavaScript naming habits.

Common mistakes and edge cases

Frequently asked questions

Does the tool keep my text?

No. The conversion runs in your browser and nothing is uploaded or stored. Closing the tab discards the text.

What is the difference between camelCase and PascalCase?

Only the first letter. camelCase starts with a lower-case letter (userName) and PascalCase starts with a capital (UserName).

Which case should I use for URLs?

Lower-case kebab-case is the usual choice for page paths, because hyphens are easy to read and URL paths are often case-sensitive. Google's documentation on URL structure recommends hyphens over underscores to separate words.

Why did my numbers move?

Digits stay attached to the letters before them, so v2 stays one word. A digit followed by a capital letter starts a new word, so 2Fast splits into 2 and Fast.

Can I convert many lines at once?

The identifier formats treat line breaks as separators and join everything into one name. For a list of names, convert one line at a time.

Related tools