CamelCase & PascalCase Converter for Developers

Convert plain phrases, URLs, and hyphenated names into camelCase or PascalCase identifiers.

  • No length limits
  • No registration
  • Free forever
  • Your text never leaves your browser
Options
Output
Your result will appear here as you type.

CamelCase vs. PascalCase vs. snake_case

Every language family has a default way of joining words into identifiers, and reaching for the wrong one is a reliable way to annoy a code reviewer. In JavaScript, TypeScript, and Java, variables, functions, and object keys are conventionally camelCase (totalPrice, fetchUserById) while classes and React components take PascalCase (ShoppingCart, UserProfile). C# and Java types also use PascalCase. Python prefers snake_case for nearly everything (total_price, fetch_user_by_id), and SQL columns often follow suit. Constants across many languages use SCREAMING_SNAKE_CASE (MAX_RETRIES).

Hyphens are the outlier: kebab-case is standard for URLs, CSS class names, and command-line flags, but it is not a valid identifier in most programming languages—the hyphen reads as a minus sign. That is why hyphenated names get converted before they become variables. This camelCase converter accepts spaces, hyphens, underscores, or an existing camelCase string and rebuilds the words in the casing you choose.

Linters and style guides enforce these conventions—ESLint’s camelcase rule, Prettier, and naming checks in Python and C# will warn or fail on the wrong case. Convert early in the workflow: if the file name, URL segment, or API key arrives in kebab-case or snake_case, produce the code identifier in the casing your project actually uses before it lands in a pull request.

Converting URLs and File Names to Variables

A large share of real conversion work is turning names that were never code into names that are: a CSS class like “card-title” imported into JavaScript as cardTitle, an image file “hero-banner-2x.png” exposed as heroBanner2x, a URL segment “/user-profile/settings” mapped to a camelCase key in a route table, or a backend field such as order_status that the frontend expects as orderStatus.

The converter tokenizes the input—splitting on spaces, hyphens, underscores, dots, and existing camelCase boundaries, and keeping digits attached to the word around them—then joins the tokens in the requested case. That handles the messy everyday cases in one paste: “my-css-file-name” becomes myCssFileName, an already PascalCased string can be split and rebuilt, and stray punctuation stops producing broken identifiers.

Before pasting the result into code, watch for three traps: reserved words (a variable cannot be called class or default in JavaScript), leading digits, and acronyms, where conventions such as fetchURL versus fetchUrl vary by team. If the text will live inside JSON or a log rather than as an identifier, an escape tool is the more useful neighbor—this page is specifically for names.

Frequently asked questions

What is kebab-case?

kebab-case joins lowercase words with hyphens, exactly as it looks: my-css-file-name. It is the default for URLs, where hyphens separate words for readers and search engines, and it is common for CSS class names and command-line options. It is not usable as a JavaScript, Python, or Java identifier because the hyphens read as minus signs—which is why file names and URL segments are converted to camelCase or snake_case once they enter code. JavaScript can still hold a hyphenated key when it is quoted ("my-key": true), but the convention fights the ecosystem, so most teams convert.

Your text never leaves your browser

Every tool runs locally on your device. Nothing you paste is uploaded, stored, or tracked.