You've copied a heading from a Google Doc and need it as a React component name. Or you have a database column in snake_case but your API expects camelCase. Or someone sent you text in ALL CAPS and you need it readable.
Text case conversion is one of those invisible tasks developers and writers do dozens of times a day — usually by hand, usually wrong at least once.
This guide covers every case format, when to use it, and how to convert between them without touching your keyboard twice.
The 12 Case Formats Explained
Writing Formats
UPPER CASE Every character capitalised. Used for acronyms, warning labels, shouting on the internet, and the occasional legal clause that someone definitely wants you to notice.
hello world → HELLO WORLD
lower case Everything lowercase. Used in URLs, command-line arguments, email addresses, and whenever a designer says "we're going for a minimal look."
Hello World → hello world
Title Case Every word starts with a capital. Used for headings, book titles, article titles, and UI navigation items. Note: some style guides (AP, Chicago, APA) have rules about not capitalising prepositions — this tool does the simple version, which is correct for most purposes.
hello world → Hello World
Sentence case Only the first word is capitalised, like a normal sentence. Used for subtitles, descriptions, button labels in product UIs, and body copy headings that aren't meant to shout.
HELLO WORLD → Hello world
Code Formats
camelCase Words joined together, each word after the first capitalised. The default for variables and functions in JavaScript, TypeScript, Java, Swift, and Kotlin.
hello world → helloWorld
user profile image → userProfileImage
Use when: naming variables, function parameters, object properties in JS/TS.
PascalCase (UpperCamelCase) Same as camelCase but the first word is also capitalised. Used for class names, component names (React), types, interfaces, and constructors.
hello world → HelloWorld
user profile image → UserProfileImage
Use when: React components (<UserCard />), TypeScript interfaces (UserProfile), class definitions.
snake_case Words joined by underscores, all lowercase. The dominant convention in Python, Ruby, Rust, and SQL.
hello world → hello_world
user profile image → user_profile_image
Use when: Python variables and functions, database column names, Ruby methods, file names on Linux.
kebab-case (spinal-case)
Words joined by hyphens, all lowercase. The convention for URLs, CSS class names, HTML data- attributes, and file names.
hello world → hello-world
user profile image → user-profile-image
Use when: CSS classes (.nav-item), URL paths (/user-profile), HTML attributes (data-track-id), npm package names.
CONSTANT_CASE (SCREAMING_SNAKE_CASE) All uppercase, words joined by underscores. The universal convention for constants.
hello world → HELLO_WORLD
max retry count → MAX_RETRY_COUNT
Use when: constants in Python (MAX_CONNECTIONS), environment variables (DATABASE_URL), Java/C++ constants, configuration keys.
dot.case Words joined by dots, all lowercase. Used in configuration files, package names, and i18n translation keys.
hello world → hello.world
user profile image → user.profile.image
Use when: Java package names (com.company.app), config keys (app.server.port), i18n namespaces (features.dashboard.title).
Fun Formats
aLtErNaTiNg CaSe Characters alternate between lowercase and uppercase. No practical use — except winning arguments on Twitter or making your code reviewer question your sanity.
hello world → hElLo WoRlD
iNVERSE cASE Each character flips: UPPER becomes lower, lower becomes UPPER. Useful for making someone's ALL CAPS message readable, or just for chaos.
Hello World → hELLO wORLD
Naming Convention Quick Reference
| Format | Example | Where used |
|---|---|---|
| camelCase | userProfile | JS/TS variables, Java methods |
| PascalCase | UserProfile | Classes, React components, TypeScript types |
| snake_case | user_profile | Python, Ruby, SQL columns |
| kebab-case | user-profile | URLs, CSS, HTML attributes |
| CONSTANT_CASE | USER_PROFILE | Constants, env vars |
| dot.case | user.profile | Config files, i18n keys |
Common Conversion Scenarios
Scenario 1: Copying a heading into code
You have a marketing heading: "Get Started With Our Product"
- As a CSS class:
get-started-with-our-product(kebab-case) - As a React component:
GetStartedWithOurProduct(PascalCase) - As a URL slug:
get-started-with-our-product(kebab-case) - As a constant:
GET_STARTED_WITH_OUR_PRODUCT(CONSTANT_CASE)
Scenario 2: Renaming a database column for an API
A SQL column user_profile_image_url needs to be exposed in a JSON API.
- REST JSON convention:
userProfileImageUrl(camelCase) - GraphQL field:
userProfileImageUrl(camelCase) - Python dataclass field:
user_profile_image_url(snake_case, same) - Config key:
user.profile.image.url(dot.case)
Scenario 3: Converting user input to a slug
Someone typed: "My Blog Post About CamelCase"
The tool splits on word boundaries (including camelCase), so:
- URL slug:
my-blog-post-about-camel-case(kebab-case) - Filename:
my_blog_post_about_camel_case.md(snake_case)
Why Smart Word Splitting Matters
A case converter is only as good as its word tokeniser. Naive converters just split on spaces — which fails when the input is already camelCase or PascalCase.
Our converter handles all word separators:
- Spaces:
hello world→["hello", "world"] - Underscores:
hello_world→["hello", "world"] - Hyphens:
hello-world→["hello", "world"] - camelCase boundaries:
helloWorld→["hello", "world"] - PascalCase boundaries:
HelloWorld→["hello", "world"] - Abbreviations:
XMLParser→["XML", "Parser"]
This means you can feed it any format and convert cleanly to any other.
Frequently Asked Questions
Does my text get sent to a server? No. All conversion happens in your browser using JavaScript. Your text never leaves your device, making it safe for API keys, passwords, and other sensitive content.
What style guide should I follow for Title Case? It depends on context. For UI copy and general web content, capitalise every word. For journalism (AP style), skip short prepositions (of, in, at) and articles (a, the, an). For academic writing (Chicago/APA), skip words under 4 letters unless they're the first or last word. Our tool uses the simple every-word rule, which works for most situations.
Why does camelCase start lowercase but PascalCase starts uppercase? Convention, not logic. The terms come from the visual appearance of the words — both look like humps, but PascalCase (named after the Pascal programming language) always starts with a capital. Most modern languages follow these conventions for distinct reasons: PascalCase signals "this is a type/class/component," while camelCase signals "this is a value/function."
Try It Now
Paste any text into the Text Case Converter and all 12 formats appear instantly. No login, no limits, no data stored.
If you find yourself copying text between formats regularly, the converter also handles entire paragraphs — useful when you need to convert a multi-word phrase into a slug or identifier without manually rewriting it.