~/TechPurAI
~/tools/case-converter
Converters & Formatters

Case Converter

UPPERCASE
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
lowercase
the quick brown fox jumps over the lazy dog
Title Case
The Quick Brown Fox Jumps Over The Lazy Dog
Sentence case
The quick brown fox jumps over the lazy dog
camelCase
theQuickBrownFoxJumpsOverTheLazyDog
PascalCase
TheQuickBrownFoxJumpsOverTheLazyDog
snake_case
the_quick_brown_fox_jumps_over_the_lazy_dog
kebab-case
the-quick-brown-fox-jumps-over-the-lazy-dog
CONSTANT_CASE
THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG

Case conversion — reshaping the same text into UPPERCASE, lowercase, Title Case, or one of several programming-specific naming conventions — comes up constantly in writing, editing, and code, and doing it by hand is both tedious and genuinely error-prone. This tool converts your input into all nine common formats simultaneously, so you can compare and copy whichever one you actually need.

The two families of case conversion

It's worth separating case conversions into two genuinely different categories, because they solve different problems. The first family — UPPERCASE, lowercase, Title Case, and Sentence case — is about display formatting for human-readable prose: how a heading, a label, or a sentence should visually present the same underlying words. These conversions preserve word boundaries (spaces stay spaces) and are purely about capitalization. The second family — camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE — is about identifier formatting for code and machine-readable contexts: converting a human phrase like "user first name" into a valid, conventional variable name, file name, CSS class, or constant. These conversions do something structurally different — they collapse word boundaries into a specific joining convention (no separator with capitalization changes, an underscore, or a hyphen) because the destination — a programming language identifier, a URL segment, a CSS selector — often can't contain literal spaces at all.

Title Case is more inconsistent than it looks

Of all nine conversions, Title Case is the one where reasonable people, and reasonable style guides, genuinely disagree. The complication is short function words — articles like "a" and "the," short prepositions like "of," "in," "on," conjunctions like "and," "or" — which several major style guides recommend leaving lowercase in a title unless they're the first or last word, on the theory that capitalizing every single word makes short structural words visually compete for attention with the actual content words that carry a title's meaning. But different style guides draw that line differently: AP style, Chicago style, and APA style each have slightly different lists of which words to lowercase and under what conditions, and popular software (word processors, CMS platforms) often implements yet another simplified version of the rule, or skips the nuance entirely and just capitalizes every word. This tool's Title Case implementation takes the simplest, most broadly applicable approach — capitalizing the first letter of every word — precisely because it's predictable and easy to reason about, rather than silently applying one specific style guide's exception list that might not match the convention you're actually being asked to follow. If your context has strict, specific Title Case rules (a publication's house style, an academic citation format), treat this as a fast starting point to then manually adjust the handful of short connector words, rather than a guaranteed final answer.

Why programming languages standardized on different case conventions

Each of the five identifier-style conventions this tool produces has a real, still-relevant reason for existing rather than being arbitrary historical accident. camelCase — capitalizing every word after the first, with no separator — became the dominant convention in C, Java, JavaScript, and C# in large part because it produces compact identifiers without wasting horizontal space on separator characters, which mattered more when screens and printed code listings had much less room than modern wide monitors do. snake_case — lowercase words joined by underscores — is the standard in Python (enforced quite strictly by the language's own official style guide, PEP 8) and Ruby, communities that historically prioritized readability and explicitness over compactness, and underscore-joined words do read slightly more clearly at a glance than a dense run of camelCased letters, especially for longer, multi-word names. PascalCase — camelCase but with the first word capitalized too — is used almost universally across C-family languages specifically for type and class names, as a deliberate visual convention that lets a reader instantly distinguish "this identifier refers to a type" from "this identifier refers to a variable or function," purely from its capitalization pattern, without needing any other context. kebab-case — lowercase words joined by hyphens — dominates in URLs, CSS class names, and HTML/XML attribute names for a very concrete technical reason on top of readability: many of those contexts either don't allow underscores at all, or historically didn't, while hyphens have always been safe there; and hyphens read cleanly in a URL slug in a way that also happens to be the format most search engines have historically favored for readable, keyword-relevant URLs. CONSTANT_CASE — all uppercase, underscore-joined — exists as a pure visual signal, near-universally used across programming languages to mark a value as a constant that should never be reassigned, letting a reader spot "this is a fixed value, not a variable" purely from how it's written, the same way PascalCase signals "this is a type."

Where naming convention mismatches actually cause real problems

Mixing case conventions inconsistently within the same codebase or dataset isn't just a cosmetic issue — it creates real friction. A JSON API that returns snake_case field names being consumed by a JavaScript frontend that expects camelCase forces either a manual field-by-field rename at the API boundary or an automated conversion step, and skipping that step consistently is a very common, very avoidable source of "undefined" bugs when a frontend developer reaches for user.firstName on an object that actually has user.first_name. A database with inconsistently-cased column names (some snake_case, some camelCase, picked ad hoc by whoever added each column) makes every query slightly more error-prone, since there's no way to predict a given column's exact casing without looking it up. Consistently converting between conventions at the right boundary — and having a fast way to do that conversion correctly rather than by hand — is a small thing that measurably reduces this entire category of bug.

A practical workflow this tool is built for

Type or paste a phrase once, and every format appears simultaneously rather than one at a time, specifically so you can compare them side by side and copy whichever one fits the context you're working in — a database column name in snake_case, a CSS class in kebab-case, a JavaScript variable in camelCase, and a page heading in Title Case, all derived from the exact same source phrase without retyping it four separate times or running it through four separate tools.

Acronyms and brand names need a manual check

Automated case conversion can't reliably tell "a word that happens to start a new segment" apart from "an acronym or brand name whose capitalization is intentional and meaningful." Always glance over the converted output for anything containing acronyms (API, URL, iOS) or stylized brand capitalization before using it — these are the one category of input where the mechanical conversion rules can produce a technically-consistent but practically wrong result.

Frequently asked questions

What's the actual difference between Title Case and Sentence case?

Title Case capitalizes the first letter of most words in a phrase — the convention used for headlines, book titles, and proper headings — while Sentence case only capitalizes the first letter of the whole sentence (and proper nouns, though this tool's simple version doesn't detect those), the way ordinary prose is written. 'The Quick Brown Fox' is Title Case; 'The quick brown fox' is Sentence case. Style guides disagree on the exact rules for Title Case — some lowercase short articles and prepositions like 'a,' 'the,' and 'of' — so treat this tool's version as a solid, simple starting point rather than a strict implementation of any one specific style guide (AP, Chicago, and APA all differ slightly on the details).

Why do programming languages use so many different casing conventions instead of just one?

Mostly history and per-language convention rather than any technical necessity — different languages and communities settled on different defaults decades apart, and backward compatibility keeps each one in place. camelCase is the JavaScript, Java, and C# convention for variables and functions. snake_case is the standard in Python and Ruby. PascalCase is used for class and type names across most C-family languages, including inside otherwise camelCase-favoring JavaScript. kebab-case shows up constantly in URLs, CSS class names, and HTML attributes, in each case because hyphens are more readable there than the alternatives and, in some of those contexts, underscores or camelCase aren't even valid syntax.

Can converting between cases lose information or introduce ambiguity?

In some edge cases, yes. Converting 'iOS' or 'macOS' to snake_case or another case convention often mangles the intentional internal capitalization that makes those particular brand names recognizable, because standard case-conversion logic can't distinguish 'meaningful mixed capitalization' from 'a word that happens to be at a word boundary.' Similarly, converting an acronym-heavy phrase like 'HTTP API URL' through camelCase produces something like 'httpApiUrl' or 'HTTPAPIURL' depending on the exact algorithm, and different tools make different (all somewhat reasonable) choices about how to handle runs of consecutive capital letters. For anything containing acronyms or intentional stylized capitalization, always double-check the converted output rather than assuming it's automatically correct.

Why does snake_case use underscores while kebab-case uses hyphens, if they're otherwise doing the same job?

Largely because of what each format needs to be valid in its home context. Most programming language identifiers (variable and function names) can't contain a hyphen — the parser would read it as a subtraction operator — so snake_case's underscore is a hard technical requirement, not just a style choice, everywhere it's used as an actual code identifier. URLs, CSS class names, and HTML attributes have the opposite situation: hyphens are perfectly valid there, and they're also generally considered more readable and slightly more SEO-friendly in URL slugs than underscores, which is why kebab-case dominates in those specific contexts even though nothing technically prevents underscores there too.