Case Converter

Convert any identifier or phrase into eleven naming conventions at once: camelCase, PascalCase, snake_case, SCREAMING_SNAKE, kebab-case, Title Case, Sentence case, UPPER, lower, dot.case and path/case. The input can be in any style, or a mix of styles. Acronyms (XMLHttpRequest), digits (version2Name) and non-ASCII letters (café) are split the way a developer would expect, so you can round-trip names without fixing them by hand.

How to use the Case Converter

  1. Type or paste a name, a list of words or a sentence into Input. The table updates as you type.
  2. Use the Copy button next to a style to copy that version.

The page starts with thisIsAnExample of_text, which mixes camelCase, a space and an underscore. It splits into the six words this, is, an, example, of, text and converts to:

StyleOutput
camelCasethisIsAnExampleOfText
PascalCaseThisIsAnExampleOfText
snake_casethis_is_an_example_of_text
SCREAMING_SNAKETHIS_IS_AN_EXAMPLE_OF_TEXT
kebab-casethis-is-an-example-of-text
Title CaseThis Is An Example Of Text
Sentence caseThis is an example of text
UPPER / lowerTHIS IS AN EXAMPLE OF TEXT / this is an example of text
dot.case / path/casethis.is.an.example.of.text / this/is/an/example/of/text

How words are found

Every conversion starts by splitting the input into words. Three rules decide where one word ends and the next begins:

  1. A capital after a lowercase letter or a digit starts a new word: fooBar → foo, Bar, and version2Name → version2, Name, so its snake_case form is version2_name.
  2. The last capital of an acronym that is followed by a lowercase letter starts a new word: XMLHttpRequest → XML, Http, Request, so snake_case is xml_http_request and camelCase is xmlHttpRequest. getHTTPResponse gives get-http-response in kebab-case, and HTML5Parser gives html5_parser.
  3. Anything that is not a letter or a digit separates words: spaces, _, -, ., / and punctuation. Repeated separators count once, so --user--id-- becomes user_id, and so does user/id.

Letters are Unicode-aware: café_au_lait becomes caféAuLait, not cafAuLait. Each word is lowercased before the style is applied, which is why an acronym loses its capitals inside camelCase and PascalCase (XmlHttpRequest). That matches the Google Java and JavaScript style guides, which treat acronyms as ordinary words. Go style keeps initialisms in capitals (HTTPServer, userID), so fix those by hand after converting. Brand spellings are not preserved either: iOS splits into i, OS and becomes iOs in camelCase.

Common use cases

StyleWhere it is the convention
camelCaseJavaScript and TypeScript variables and functions, Java methods, most JSON APIs
PascalCaseClass and type names in most languages, React components, C# methods and properties
snake_casePython and Ruby variables and functions, Rust functions, PostgreSQL and MySQL columns
SCREAMING_SNAKEConstants in most languages, environment variables (DATABASE_URL)
kebab-caseURL slugs, CSS classes, HTML attributes, CLI flags (--dry-run), npm package names
dot.case / path/caseConfig keys (server.port), i18n message keys, file and route paths

A common job is mapping between layers: database columns in snake_case, an API in camelCase, and constants in SCREAMING_SNAKE. Pasting one name and copying the other forms avoids typos such as user_Id or userID next to userId in the same codebase.

Frequently asked questions

Why does XMLHttpRequest become xmlHttpRequest and not xMLHttpRequest?

The converter recognises XML as one word (the capital letters before the final capital that starts Http), lowercases it and then applies camelCase. Treating acronyms as words is the convention in the Google Java and JavaScript style guides.

How are numbers handled?

Digits stay attached to the letters before them: version2Name splits into version2 and Name, and HTML5Parser into HTML5 and Parser. A capital letter after a digit starts a new word.

Can I convert many names at once?

The tool treats the whole input as one name, so a multi-line list becomes one long identifier. Convert names one at a time.

Does it work with accented or non-Latin letters?

Yes. Letters and digits from any script count as word characters, so café, straße or Cyrillic names are kept intact. Capital-letter splitting only applies to scripts that have upper and lower case.

Is my text sent anywhere?

No. The conversion runs in your browser as you type, and nothing is uploaded.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: