Case Converter Developer Tool

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

Switching a variable name between camelCase and snake_case, or turning a heading into Title Case, is a common but fiddly task across programming languages and style guides. This free case converter is a developer tool that handles camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, Sentence case, and slug case in one place, instantly and entirely in your browser.

Input

Results

Type something on the left to see conversions.

Runs entirely in your browser — no data is sent anywhere.

Why so many naming conventions exist

Every one of these casing styles solves the same underlying problem — representing a multi-word name in a context that doesn't allow spaces — but different languages, file formats, and eras of software settled on different answers, and those choices calcified into convention long before anyone could unify them. The result is that the same conceptual name (say, "user id") gets written differently depending on where it lives: userId in one file, user_id in another, USER_ID somewhere else, all referring to the same underlying concept.

Where each convention is used

camelCase (firstName) is the standard for variable and function names in JavaScript, Java, and C#, where the first word is lowercase and each subsequent word starts with a capital.

PascalCase (FirstName) capitalizes every word including the first, and is the near-universal convention for class and type names across those same languages — the capital first letter is often the visual cue that distinguishes a class from a variable at a glance.

snake_case (first_name) is the standard for variables and functions in Python and Ruby, and also shows up widely for database column names, where underscores read cleanly in SQL and avoid any case-sensitivity ambiguity.

kebab-case (first-name) is used in CSS class names, HTML attributes, and URL slugs, where hyphens are the conventional word separator and underscores are historically discouraged (older URL-parsing and SEO tooling has treated hyphens as word boundaries and underscores as not).

CONSTANT_CASE (FIRST_NAME) marks constants and environment variables across nearly every language — the all-caps styling is a strong visual signal that a value shouldn't be reassigned, and it's the near-universal convention for .env files and shell environment variables specifically.

Title Case and Sentence case aren't code conventions at all but text-formatting ones, used for headings, labels, and UI copy rather than identifiers.

Why consistency matters

Mixing conventions within a single codebase creates more friction than the inconsistency itself might suggest. Autocomplete and fuzzy search work by matching characters, so a variable inconsistently referred to as userId in one file and user_id in another effectively becomes two different search terms for the same thing. Linters and style guides (ESLint's camelcase rule, PEP 8 for Python, Rubocop for Ruby) exist largely to enforce a single convention per language so that a codebase reads predictably regardless of who wrote which part of it. And when data crosses a boundary — a Python backend returning snake_case JSON keys to a JavaScript frontend that expects camelCase — the mismatch becomes a real integration task, not just a style nitpick, which is exactly the kind of conversion this tool is meant to speed up.

A note on word boundaries

Converting between cases requires first splitting the input back into individual words, which is straightforward for space- or delimiter-separated input but slightly trickier for existing camelCase or PascalCase strings, where boundaries are marked by a capital letter rather than a separator character. This tool detects those transitions (a lowercase letter or digit followed by an uppercase letter) in addition to splitting on spaces, hyphens, underscores, and periods, so pasting in an existing camelCase or kebab-case value converts it correctly rather than treating it as one long word.