ToolDash
Case Converter

Case Converter: camelCase, snake_case, UPPER & More

Paste a variable name, a phrase or a column header and see it in twelve case styles at once, from camelCase and snake_case to Title Case and path/case. Copy whichever one you need.

  • Free, no sign-up
  • Runs in your browser — nothing is uploaded
  • Instant results, no waiting on a server

Convert text between every common case style at once — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and more. Punctuation and digit boundaries are handled automatically.

Input

0 chars

camelCase

helloWorld

PascalCase

HelloWorld

snake_case

hello_world

CONSTANT_CASE

HELLO_WORLD

kebab-case

hello-world

Train-Case

Hello-World

Title Case

Hello World

Sentence case

Hello world

lowercase

hello world

UPPERCASE

HELLO WORLD

dot.case

hello.world

path/case

hello/world

How to convert text case

  1. 1Type or paste your text into the Input panel. It can be in any style: plain words, camelCase, snake_case, a mix of them, or something with punctuation.
  2. 2Read the twelve results below. Every format updates as you type, so there's nothing to select or submit.
  3. 3Click the copy icon on the card you want, such as camelCase for a JavaScript variable or CONSTANT_CASE for an environment variable.
  4. 4Use the clear button in the Input panel to start over.

Naming conventions and how the converter splits words

Most languages and tools have a preferred way to join words in an identifier. JavaScript and Java use camelCase for variables and functions, and PascalCase for classes and React components. Python and Ruby favor snake_case, while CONSTANT_CASE (or SCREAMING_SNAKE_CASE) marks constants and environment variables. kebab-case is the norm for URLs, CSS classes, CLI flags and npm package names. Train-Case shows up in HTTP header names like Content-Type. dot.case and path/case are handy for config keys, i18n message IDs and file paths.

To convert case from one style to another, you have to solve one problem first: finding the word boundaries. This tool breaks the input apart in three ways. It splits where a lowercase letter or digit is followed by a capital, so userId becomes user and id. It separates a run of capitals from the word that follows, so HTMLParser becomes HTML and Parser rather than one long word. And it treats any character that isn't a letter or digit, including spaces, underscores, hyphens, dots and slashes, as a separator. The resulting words are lowercased, then rejoined in each target style.

A few things to know about that approach. Acronyms are normalized, so parseHTML becomes parse_html in snake_case and ParseHtml in PascalCase. In the identifier styles, punctuation is dropped rather than carried over, which is what you want for variable and file names, and only ASCII letters and digits count as word characters, so accented letters act as separators there. The four prose styles work differently: UPPERCASE, lowercase, Title Case and Sentence case only change letter case, so punctuation, spacing and accented letters like é stay exactly as you typed them. That makes the page a plain uppercase converter or lowercase converter for normal sentences too. Title Case capitalizes every word and doesn't apply style-guide rules for short words like "of" or "the".

Because every format is shown at once, this text case converter is also a quick way to rename something consistently across layers, such as a database column, an API field and a TypeScript property.

When developers reach for it

Mapping between API and code

Turn snake_case JSON fields from a Python or Rails API into camelCase properties for a TypeScript client, or use it as a snake_case converter in the other direction when you write a Python model or a migration.

Naming constants and env vars

Convert a setting name into CONSTANT_CASE for an environment variable and camelCase for the config object that reads it.

Slugs, CSS classes and file names

As a kebab-case converter it turns a heading or component name into a URL slug, a class name or a file name. Punctuation is dropped, so Release Notes (2024) becomes release-notes-2024.

Cleaning up headings

Normalize a messy label or spreadsheet header into Title Case or Sentence case for docs and UI copy.

Frequently asked questions

What's the difference between camelCase and PascalCase?

+

Both join words without separators and capitalize each word, but camelCase starts with a lowercase letter (userName) while PascalCase capitalizes the first word too (UserName). PascalCase is common for class and component names.

What's the difference between snake_case and kebab-case?

+

snake_case joins words with underscores and kebab-case uses hyphens. Most programming languages can't use hyphens in identifiers, so snake_case is used in code while kebab-case is common in URLs, CSS and file names.

How are acronyms like HTML or ID handled?

+

A run of capitals is treated as one word and lowercased, so XMLHttpRequest becomes xml_http_request in snake_case and XmlHttpRequest in PascalCase. If you need to keep an acronym in caps, adjust that part by hand.

Does the converter keep punctuation?

+

It depends on the style. UPPERCASE, lowercase, Title Case and Sentence case keep punctuation, spacing and accented letters, so they're safe for full sentences. The identifier styles (camelCase, snake_case, kebab-case and the rest) drop punctuation, because it isn't valid in variable or file names.

Is my text sent anywhere?

+

No. Conversion happens in your browser as you type, so nothing is uploaded.

How do I convert snake_case to camelCase?

+

Paste the snake_case name and copy the camelCase card, so user_id becomes userId. It works as a camelCase converter from any style, including kebab-case, PascalCase and space-separated words, because every input is split into words first.

Is there a Pascal case converter for React component names?

+

Yes, the PascalCase card. It capitalizes every word and removes separators, so user-profile-card becomes UserProfileCard, the convention for React components and classes.

How do I convert to Title Case?

+

Paste the text and copy the Title Case card. It capitalizes the first letter of every word, including short words like of and the, and keeps your punctuation, so it works for headings, labels and full sentences. For AP or Chicago style headlines, lowercase the small words by hand afterward.