Webtools

Case Converter

Convert text to UPPERCASE, lowercase, Title Case, camelCase, snake_case, and more

What is a case converter?

A case converter transforms text between the naming conventions used in programming, writing, and design. This tool supports the eight formats developers and writers actually reach for: UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE. Conversions happen instantly as you type. Everything runs in your browser using JavaScript, so the text you paste never leaves your device — there is no network round-trip and no server log of what you converted.

Word boundaries are detected from spaces, hyphens, underscores, and existing camelCase or PascalCase capitalisation. That means you can paste text in almost any form — a URL slug, a SQL column, an existing variable name, a heading copied out of a document — and it will be parsed into discrete words before being re-emitted in the target case. The conversion is reversible in the sense that the parsed-word boundaries are preserved across all eight cases, so you can round-trip a name from one convention to another without losing structure.

Developers reach for a case converter dozens of times a day: turning a UI label into a snake_case database column, a function name into a kebab-case CSS class, or a heading into a URL slug. Writers and designers use it to fix text accidentally typed in caps lock, to enforce title case in headings, or to prepare copy for systems that demand a specific format. Every modern programming ecosystem has its own conventions, and getting them right is one of the small but real markers of code quality — linters and code reviewers will flag deviations, and the wrong case in the wrong place tends to make code harder to read for everyone else who works on it.

The eight case styles, explained

Each style has its own history and its own conventions. Knowing where each one belongs is the difference between code that reads naturally and code that fights the language it is written in.

UPPERCASE

HELLO WORLD

Every letter capitalised, words separated by spaces. Used for emphasis in plain text, headlines in classical typography, and short button labels. In code it is rare except as a visible label or in legacy systems. Note that UPPERCASE is a pure character transformation — it does not split or rejoin words, so helloWorld becomes HELLOWORLD, not HELLO_WORLD.

lowercase

hello world

Every letter lowered, words separated by spaces. The default in body text and the safe choice for case-insensitive comparison. Email addresses, hostnames, and URL paths are conventionally lowercased before storage to avoid duplicate keys, since most of the systems that handle them treat User@Example.com and user@example.com as the same value.

Title Case

Hello World

The first letter of each word capitalised. Common in book titles, headings, and document names. Note that competing rules exist: AP style lowercases articles ("a", "the"), short conjunctions ("and", "or"), and short prepositions ("of", "to"); Chicago style capitalises everything four letters or longer; strict title case capitalises every word. This tool follows strict title case — capitalising every word — because the lists of "small words" disagree across guides, and a fully automatic AP/Chicago converter is not really possible without a style choice.

camelCase

helloWorld

A lowercase first word followed by capitalised subsequent words, with no separator. The dominant style for variable, parameter, function, and method names in JavaScript, Java, Swift, Kotlin, Objective-C, and TypeScript, and the standard for JSON property keys in most public APIs. Named for the camel-like humps formed by the internal capitals. Single-word identifiers in camelCase are simply lowercase: name, not Name.

PascalCase

HelloWorld

Every word capitalised, no separator. Used for class names, type names, and enum values across most object-oriented languages — C#, Java, Swift, TypeScript, Python (specifically for class names per PEP 8). React and Vue component names use PascalCase by convention so JSX and template compilers can distinguish them from lowercase HTML tags. Sometimes called UpperCamelCase; the difference is purely the first character.

snake_case

hello_world

Lowercase words joined by underscores. The standard for variable and function names in Python (PEP 8), Ruby, and Rust, and the conventional form for SQL column and table names in PostgreSQL, MySQL, and SQLite. Some style guides distinguish snake_case (lowercase) from SCREAMING_SNAKE_CASE (uppercase) — this tool treats the latter as the separate CONSTANT_CASE style.

kebab-case

hello-world

Lowercase words joined by hyphens. The standard form for CSS class names, custom HTML attributes (data-*), URL slugs, file names on the web, and command-line flags (--my-flag). Sometimes called dash-case or lisp-case. Hyphens are not valid identifiers in most programming languages, so kebab-case is reserved for places where the surrounding syntax allows it: stylesheets, markup, URLs, and shell flags.

CONSTANT_CASE

HELLO_WORLD

Uppercase words joined by underscores. Used for compile-time constants, environment variables (DATABASE_URL, NODE_ENV), feature flags, and macro names. The visual weight signals "this value does not change at runtime" — a convention followed by C, C++, Java, JavaScript (for true constants), Go (for exported constants), and POSIX shells. Unlike a plain UPPERCASE conversion, CONSTANT_CASE preserves word boundaries: helloWorld becomes HELLO_WORLD, not HELLOWORLD.

Which case to use where

Most ecosystems have settled conventions. Following them is not just style — linters, formatters, and code reviewers will flag deviations, and consistency makes code predictable for everyone reading it. The table below summarises the dominant conventions across mainstream languages and contexts.

Context Convention Example
JavaScript / TypeScript variables and functions camelCase getUserName
JavaScript / TypeScript classes PascalCase UserAccount
JavaScript constants CONSTANT_CASE MAX_RETRIES
Python variables and functions (PEP 8) snake_case get_user_name
Python classes (PEP 8) PascalCase UserAccount
Ruby variables and methods snake_case user_name
Ruby classes and modules PascalCase UserAccount
C# methods, classes, and properties PascalCase GetUserName
C# parameters and local variables camelCase userName
Go exported names (public) PascalCase GetUserName
Go unexported names (private) camelCase getUserName
Rust functions, variables, modules snake_case get_user_name
Rust types and traits PascalCase UserAccount
PHP variables and functions (PSR) camelCase getUserName
PHP classes (PSR) PascalCase UserAccount
CSS class names kebab-case primary-button
HTML data attributes kebab-case data-user-id
URL slugs kebab-case how-to-write-clean-code
SQL column and table names snake_case user_accounts
JSON keys (most public APIs) camelCase firstName
JSON keys (Rails / Django APIs) snake_case first_name
Environment variables CONSTANT_CASE DATABASE_URL
React / Vue components PascalCase UserProfile
File names (web) kebab-case user-profile.tsx

How word boundaries are detected

When you paste text, this tool splits it into words before applying the target case. The splitter recognises three boundary types: explicit separators (spaces, hyphens, underscores), camelCase transitions (a lowercase letter followed by an uppercase letter), and acronym boundaries (a run of uppercase letters followed by an uppercase-lowercase pair). getUserNameAPI is parsed as get / User / Name / API, and parseHTMLTag as parse / HTML / Tag. Empty fragments are dropped, and Unicode letters in non-ASCII scripts are preserved as written so names with diacritics or non-Latin characters round-trip cleanly. UPPERCASE and lowercase are deliberate exceptions — they bypass word-splitting and act as pure character transformations, because that is what users almost always mean when they ask for "uppercase" rather than "constant case".

Frequently asked questions

What is camelCase and when should I use it?
camelCase starts with a lowercase letter and capitalises the first letter of each subsequent word (e.g. myVariableName). It is the dominant convention for variable, parameter, and function names in JavaScript, TypeScript, Java, and Swift, and the standard form for JSON property keys in most public APIs.
What's the difference between snake_case and kebab-case?
snake_case uses underscores as word separators (e.g. my_variable_name) and is conventional in Python, Ruby, Rust, and SQL column names. kebab-case uses hyphens (e.g. my-variable-name) and is the standard for CSS class names, HTML attributes, and URL slugs. Hyphens are not valid identifier characters in most programming languages, so kebab-case is restricted to places where the surrounding syntax allows it.
When should I use PascalCase instead of camelCase?
PascalCase (every word capitalised, no separator) is conventional for class names, type names, and React or Vue component names across most languages. The shorthand: types and classes get PascalCase; values and functions get camelCase. In JSX the rule is enforced — lowercase tags are treated as HTML, so a custom component name must start with an uppercase letter or it will not be recognised as a component.
Does Title Case capitalise every word?
This tool's Title Case capitalises the first letter of every word, including small words like "a", "the", and "of". Strict AP and Chicago style instead lowercase articles, conjunctions, and short prepositions — but the lists of "small words" disagree across style guides, so a fully automatic AP/Chicago converter is not really possible. Use the tool's output as a starting point and lowercase the small words by hand if your style guide requires it.
How does the tool handle existing camelCase or PascalCase input?
It splits on the case transition. getUserName is read as three words — get, User, Name — before being re-emitted in the target case. Acronyms are preserved as a single word (so parseHTMLTag becomes parse / HTML / Tag, not parse / H / T / M / L / Tag), provided they sit next to a following capitalised word.
Is the conversion done locally or on a server?
Entirely locally. The case conversion is implemented in JavaScript and runs in your browser — the text you paste in never leaves your device. There is no network request involved, which means the tool also works offline once the page has loaded, and the input is never logged or seen by the server.
Does the tool support Unicode characters?
Yes. Letters with diacritics (é, ñ, ü), Cyrillic, Greek, and other scripts pass through unchanged, and the case operations use the JavaScript engine's Unicode-aware toUpperCase and toLowerCase. A handful of locale-specific edge cases exist — Turkish dotted/dotless I is the famous one — that this tool does not currently special-case.
Why does CONSTANT_CASE exist if it looks like UPPERCASE with underscores?
It is a separate convention rather than a different transformation. CONSTANT_CASE specifically signals an identifier — a name in code — that happens to be capitalised, and it follows the snake_case word-boundary rules. UPPERCASE in this tool simply uppercases the original characters without word-splitting logic, so helloWorld becomes HELLOWORLD in UPPERCASE but HELLO_WORLD in CONSTANT_CASE.

Related tools

Character Counter
Count characters, words, sentences, paragraphs, and reading time
Lorem Ipsum Generator
Generate placeholder text in paragraphs, sentences, or words
Text Diff Checker
Compare two texts side by side with difference highlighting
Find and Replace
Bulk find and replace text with regex support
Browse other categories: Word Tools· Number Tools· Converters· Color Tools· Code Tools· Time Tools· Random Generators