All tools

Case Converter

Convert between camelCase, PascalCase, snake_case, kebab-case, and more.

  • camel
  • snake
  • kebab
  • pascal
  • case

About Case Converter

Programmers spend a surprising amount of time renaming things between naming conventions. JavaScript variables are usually camelCase, class names are PascalCase, Python prefers snake_case, CSS classes use kebab-case, and environment variables are typically SCREAMING_SNAKE_CASE. Migrating an identifier between conventions by hand is tedious and easy to get wrong on the edges — initial capitals, consecutive capitals, numbers, and existing separators all need consistent handling.

This converter takes any input and shows it in every common naming convention at once: camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, Train-Case, Title Case, Sentence case, UPPER CASE, and lower case. The same word-splitting logic is used across all variants, so renamings stay consistent.

How to use

Type or paste your text into the input at the top. The grid below shows the same text in every supported case style — pick the one you want and click its copy button to lift it onto your clipboard.

The converter is happy with messy input: a mix of separators ("hello-world_fromTools"), runs of capitals ("HTTPRequest"), and numbers ("page2title") all get normalised into words before being recombined in the target case. That makes it useful for one-off renames as well as scripting cleanup across a codebase.

Frequently asked questions

  • What's the difference between camelCase and PascalCase?

    camelCase starts with a lowercase letter and capitalises every subsequent word: userName, getFirstResult. PascalCase capitalises the first letter too: UserName, GetFirstResult. By convention, JavaScript and Java use camelCase for variables and methods and PascalCase for classes; many other languages follow the same split.

  • When should I use snake_case vs kebab-case?

    snake_case (underscores) is the convention for Python variables, Rust, Ruby, and most SQL column names. kebab-case (hyphens) is the convention for CSS classes, HTML attributes, URL slugs, and command-line flags. The choice usually isn't personal preference — it's determined by the ecosystem you're writing in.

  • How does the converter handle runs of capital letters like "XMLHTTPRequest"?

    It treats consecutive capitals as part of a single acronym word, so "XMLHTTPRequest" becomes "xml-http-request" in kebab-case and "xmlHttpRequest" in camelCase. This matches the convention most style guides recommend, which is to drop the all-caps form in favour of treating acronyms as ordinary words.

  • Why does "Title Case" capitalise every word?

    Because this is "Headline" Title Case — every word gets capitalised, including small ones like "of" and "the". The stricter "AP-style" or "Chicago-style" Title Case leaves small connector words lowercase ("The Lord of the Rings"). For a programmatic converter, capitalising every word is simpler and unambiguous; copy the result and lowercase any small words by hand if you need stricter style.

More Text & Encoding tools