Case Converter
Convert text between uppercase, lowercase, title case, camelCase, snake_case, and more.
Enter Your Text
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
the quick brown fox jumps over the lazy dog
The Quick Brown Fox Jumps Over The Lazy Dog
The quick brown fox jumps over the lazy dog
theQuickBrownFoxJumpsOverTheLazyDog
TheQuickBrownFoxJumpsOverTheLazyDog
the_quick_brown_fox_jumps_over_the_lazy_dog
the-quick-brown-fox-jumps-over-the-lazy-dog
THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
the.quick.brown.fox.jumps.over.the.lazy.dog
the/quick/brown/fox/jumps/over/the/lazy/dog
tHe qUiCk bRoWn fOx jUmPs oVeR ThE LaZy dOg
tHE qUICK bROWN fOX jUMPS oVER tHE lAZY dOG
Tip: Different case styles are used in programming (camelCase, snake_case), titles (Title Case), and URLs (kebab-case).
What Is a Case Converter?
A case converter is a text transformation tool that instantly converts any string of text into one of many different case formats — uppercase, lowercase, title case, camelCase, snake_case, kebab-case, and more. Instead of manually retyping or editing text character by character, a case converter applies deterministic rules to produce the exact format you need in milliseconds.
Text case formatting matters across nearly every domain of modern work. Developers need camelCase for JavaScript variables, snake_case for Python functions, and CONSTANT_CASE for environment variable names. Content writers rely on Title Case for headlines and Sentence case for body copy. SEO specialists and web developers use kebab-case for URL slugs and path/case for file routes. Having a single tool that handles all thirteen conversion formats eliminates manual errors and saves significant time during development, writing, and data processing workflows.
This online case converter accepts any plain text input — a single word, a full sentence, or a multi-word identifier — and simultaneously outputs every supported case format. You can copy any individual result to your clipboard with one click, making it fast to paste directly into your code editor, CMS, or spreadsheet.
Understanding when and why to use each case format is just as important as being able to produce them. The sections below explain every format supported by this tool, the transformation rules that produce each one, practical programming naming conventions, URL best practices, and tips for choosing the right case for your project.
All 13 Case Formats Explained
This case converter supports thirteen distinct text case formats. Each format follows a specific transformation rule applied to the input string. The table below summarizes every supported format, its transformation rule, and a concrete example derived from the input "hello world example".
| Format | Transformation Rule | Example Output |
|---|---|---|
| UPPERCASE | Every character converted to its uppercase equivalent | HELLO WORLD EXAMPLE |
| lowercase | Every character converted to its lowercase equivalent | hello world example |
| Title Case | First letter of each word uppercased, remaining letters lowercased | Hello World Example |
| Sentence case | Only the very first character uppercased, rest all lowercase | Hello world example |
| camelCase | First word lowercase, each subsequent word starts uppercase, no separators | helloWorldExample |
| PascalCase | Every word starts uppercase, no separators | HelloWorldExample |
| snake_case | All lowercase, spaces replaced by underscores, special chars removed | hello_world_example |
| kebab-case | All lowercase, spaces replaced by hyphens, special chars removed | hello-world-example |
| CONSTANT_CASE | All uppercase, spaces replaced by underscores, special chars removed | HELLO_WORLD_EXAMPLE |
| dot.case | All lowercase, spaces replaced by dots, special chars removed | hello.world.example |
| path/case | All lowercase, spaces replaced by forward slashes, special chars removed | hello/world/example |
| aLtErNaTiNg | Even-indexed characters lowercased, odd-indexed characters uppercased | hElLo WoRlD eXaMpLe |
| iNVERSE | Each uppercase letter becomes lowercase and vice versa | HELLO WORLD EXAMPLE |
Note that alternating case treats every character position — including spaces and punctuation — as part of the index sequence. Character at index 0 is lowercased, index 1 is uppercased, and so on, producing the distinctive wavy pattern often used humorously online. Inverse case independently swaps the case of every alphabetic character, leaving non-alphabetic characters unchanged.
camelCase Transformation
Where:
- s= The original input string
- /[^a-zA-Z0-9]+(.)/g= Regex matching one or more non-alphanumeric characters followed by any character (the next word's first letter)
- chr → chr.toUpperCase()= Replacement function that uppercases the captured first letter of each subsequent word
- /^[A-Z]/= Regex matching an uppercase first character, lowercased to ensure the result truly starts with a lowercase letter
Programming Naming Conventions
Every major programming language and framework has established naming conventions that developers follow to write readable, maintainable code. Using the wrong case in the wrong context is not just a style violation — it can cause runtime errors in some languages, fail linting checks, and make code harder to understand for teammates. This text case converter makes it trivial to switch between programming naming styles.
camelCase — JavaScript, Java, TypeScript
camelCase is the dominant convention for variable names, function names, and object properties in JavaScript, TypeScript, and Java. The first word is entirely lowercase and each subsequent word begins with an uppercase letter, with no separator characters. Examples: getUserData, isLoggedIn, maxRetryCount. React component props, useState hooks, and most npm package APIs follow camelCase throughout.
PascalCase — Classes, React Components, Types
PascalCase (also called UpperCamelCase) is identical to camelCase except the very first character is also uppercased. It is universally used for class names in object-oriented languages (Java, C#, TypeScript), React component names (UserProfile, NavigationBar), TypeScript interfaces and type aliases, and constructor functions in JavaScript. Linters will flag a React component that does not start with a capital letter because JSX cannot distinguish it from a plain HTML element.
snake_case — Python, Databases, APIs
snake_case separates words with underscores and keeps all letters lowercase. It is the standard naming convention for variables and functions in Python (as specified by PEP 8), database column and table names in SQL, and many REST API response field names. Python's standard library, Django's ORM, and SQLAlchemy all use snake_case extensively. Some API providers (Stripe, Twilio) use snake_case for JSON payload keys to maintain consistency with their backend systems.
CONSTANT_CASE — Environment Variables, Constants
CONSTANT_CASE (all uppercase with underscores) is the universal convention for constants whose values do not change at runtime. This includes environment variables (DATABASE_URL, API_SECRET_KEY), configuration constants in most languages, and compile-time macros in C and C++. The visual distinction of all-caps immediately signals to a reader that this value is fixed and should not be reassigned, which is a valuable communication tool in codebases with many collaborators.
URL Slugs, File Paths, and SEO Case Formats
Beyond programming identifiers, text case formatting plays a critical role in how web content is structured, discovered, and indexed. Choosing the right case format for URLs, file paths, CSS class names, and configuration files has real consequences for SEO performance, site maintainability, and user experience.
kebab-case for URL Slugs
kebab-case is the gold standard for URL slugs and is strongly recommended by Google's own documentation. Search engines parse hyphenated words in URLs as separate terms, meaning a URL like /blog/case-converter-online-tool signals the keywords "case," "converter," "online," and "tool" individually. Underscores, by contrast, cause Google to treat the entire underscore-connected string as a single token. This makes kebab-case the clear winner for organic search visibility. Most CMS platforms — WordPress, Ghost, Contentful — generate kebab-case slugs by default for exactly this reason.
path/case for File System Routes
path/case mirrors the structure of Unix-style file paths and directory hierarchies. It is commonly used to represent resource paths in APIs and file routing systems. For example, a Next.js file at src/pages/tools/case-converter.js maps directly to the path case representation tools/case-converter. Understanding path/case helps developers quickly translate between human-readable descriptions and actual file system locations.
dot.case for Configuration and Namespacing
dot.case is widely used in configuration files, Java package names (com.company.product), and property key namespacing. Many logging frameworks, Spring Boot configuration files (application.properties), and JSON configuration schemas use dot-separated keys to create logical groupings without nesting full objects. Converting a descriptive phrase to dot.case gives you ready-to-use configuration key candidates.
CSS Naming: kebab-case by Convention
CSS class names and custom property names (CSS variables) conventionally use kebab-case because the CSS specification treats the hyphen as a valid identifier character. Standard CSS frameworks like Bootstrap, Tailwind CSS, and Bulma all use kebab-case for utility classes (text-center, font-bold, border-radius). Writing CSS class names in camelCase or PascalCase is valid but unconventional and can cause confusion when switching between stylesheets and JavaScript that references those classes.
Title Case, Sentence Case, and Writing Conventions
While programming conventions dominate the discussion around text case, title case and sentence case are equally essential in content writing, publishing, and user interface design. Correctly applying these formats improves readability, conveys professionalism, and meets style guide requirements.
Title Case in Publishing and UI
Title Case capitalizes the first letter of every word and lowercases the rest. This case converter uses a simple and broadly applicable rule: the regex /wS*/g matches each word token (including any attached non-whitespace characters like apostrophes), capitalizes the first character, and lowercases the remainder. This produces consistently formatted headings that work well for article titles, UI button labels, navigation menu items, and product names.
Different style guides have varying opinions on which words to capitalize in a title — the Chicago Manual of Style, the AP Stylebook, and APA all have slightly different rules about capitalizing prepositions, conjunctions, and articles. This tool applies a straightforward "capitalize every word" rule, which is the safest default for most general use cases and is what most readers expect.
Sentence Case for Body Copy and UX
Sentence case mirrors the capitalization pattern of a normal sentence: only the very first character is uppercased, and everything else is lowercased. Many modern user interfaces — Google's Material Design, Apple's Human Interface Guidelines, and most SaaS products — use Sentence case for button labels, form field labels, and tooltip text. Studies in UX research have found that Sentence case is slightly easier to read than Title Case for short UI labels because it reduces visual noise. This converter's sentence case transformation takes the first character to uppercase and lowercases the entire remaining string in a single operation.
UPPERCASE and Alternating Case
UPPERCASE text is used sparingly — in headings for maximum visual emphasis, for acronyms and initialisms (HTML, CSS, API), and in legal documents where certain terms require consistent capitalization. Overusing uppercase in body copy significantly reduces readability and is widely interpreted online as "shouting."
Alternating case (sometimes called mock sponge-bob case or sArCaStIc TeXt) alternates between lowercase at even character positions and uppercase at odd positions. It became a popular internet meme format in the late 2010s to convey sarcasm or mockery. While it has no professional application, it is a frequently requested text transformation for social media and creative content.
How to Use This Case Converter
Using this online case converter tool requires no account, no installation, and no configuration. The process is straightforward: type or paste your text into the input area, and all thirteen case conversions are displayed and updated in real time below the input field.
- Enter your text — Type directly into the text area or paste content from any source. The tool accepts any Unicode text, though the case transformation rules apply primarily to ASCII alphabetic characters.
- Review the results — Every supported case format is shown in its own labeled row beneath the input. Each row displays the format name, a short description of the transformation rule, and the converted output in a monospace font for easy reading.
- Copy the result you need — Click the Copy button next to any format to copy that specific output to your clipboard. The button briefly changes to Copied! to confirm the action. You can copy from multiple formats without clearing the input.
- Use the Sample Text button — If you want to explore what the tool does before entering your own content, click Sample Text to load the classic pangram "The Quick Brown Fox Jumps Over The Lazy Dog," which contains every letter of the alphabet and demonstrates all transformations clearly.
- Clear and convert again — Click Clear to reset the input and start fresh with new text.
The converter handles edge cases gracefully. Input that already contains mixed casing is normalized by each transformation rule independently — for example, "the QUICK Brown FOX" will still produce correct camelCase, snake_case, and title case outputs because each transformation starts by applying its own normalization (lowercasing or uppercasing) before any further rules are applied. Special characters and punctuation that are not valid in identifier formats (like snake_case or kebab-case) are automatically stripped from those outputs, while formats like UPPERCASE and Title Case preserve them.
Worked Examples
Converting a Variable Name for Programming
Problem:
You have the phrase 'user profile data' and need to use it as a variable name in JavaScript, a database column in SQL, and a constant in a config file.
Solution Steps:
- 1Start with input text: 'user profile data'
- 2For JavaScript (camelCase): lowercase all letters → 'user profile data', then uppercase the first letter after each space or non-alphanumeric character → 'userProfileData', check that first character is already lowercase → result is 'userProfileData'
- 3For SQL column (snake_case): lowercase all → 'user profile data', replace each space with an underscore → 'user_profile_data', remove any remaining non-alphanumeric/non-underscore characters → result is 'user_profile_data'
- 4For config constant (CONSTANT_CASE): uppercase all → 'USER PROFILE DATA', replace each space with an underscore → 'USER_PROFILE_DATA', remove any remaining non-alphanumeric/non-underscore characters → result is 'USER_PROFILE_DATA'
Result:
camelCase → userProfileData | snake_case → user_profile_data | CONSTANT_CASE → USER_PROFILE_DATA
Generating a URL Slug for a Blog Post
Problem:
You have the article title 'My Top 10 Tips for Writing Clean Code!' and need a URL-safe slug for use as a page path.
Solution Steps:
- 1Start with input text: 'My Top 10 Tips for Writing Clean Code!'
- 2Convert to all lowercase: 'my top 10 tips for writing clean code!'
- 3Replace all whitespace sequences with hyphens: 'my-top-10-tips-for-writing-clean-code!'
- 4Remove all characters that are not alphanumeric or a hyphen (the exclamation mark is removed): 'my-top-10-tips-for-writing-clean-code'
- 5Result is a clean, URL-safe kebab-case slug ready to use in your CMS or Next.js file router
Result:
kebab-case → my-top-10-tips-for-writing-clean-code
Normalizing Mixed-Case Input to Title and Sentence Case
Problem:
An editor has submitted the heading 'the IMPORTANCE of clean CODE in production systems' with inconsistent capitalization. You need both a formatted headline and a clean sentence-case version.
Solution Steps:
- 1Start with input: 'the IMPORTANCE of clean CODE in production systems'
- 2For Title Case: the regex /\w\S*/g matches each word token ('the', 'IMPORTANCE', 'of', 'clean', 'CODE', 'in', 'production', 'systems'); for each match, take charAt(0).toUpperCase() and concatenate with substr(1).toLowerCase()
- 3'the' → 'The', 'IMPORTANCE' → 'Importance', 'of' → 'Of', 'clean' → 'Clean', 'CODE' → 'Code', 'in' → 'In', 'production' → 'Production', 'systems' → 'Systems'
- 4Reassemble to get Title Case result: 'The Importance Of Clean Code In Production Systems'
- 5For Sentence case: take charAt(0).toUpperCase() ('T') and concatenate with slice(1).toLowerCase() ('he importance of clean code in production systems') → 'The importance of clean code in production systems'
Result:
Title Case → The Importance Of Clean Code In Production Systems | Sentence case → The importance of clean code in production systems
PascalCase for a React Component Name
Problem:
Your design file refers to a UI element as 'navigation sidebar toggle button'. You need a valid React component name in PascalCase.
Solution Steps:
- 1Start with input: 'navigation sidebar toggle button'
- 2Apply the same title case regex (/\w\S*/g) to capitalize the first letter of each word and lowercase the rest: 'Navigation Sidebar Toggle Button'
- 3Remove all whitespace characters (replace /\s+/g with empty string): 'NavigationSidebarToggleButton'
- 4Verify the first character is uppercase (it is: 'N') — this is a valid React component name that JSX will treat as a custom component rather than an HTML element
Result:
PascalCase → NavigationSidebarToggleButton
Tips & Best Practices
- ✓Use kebab-case for all URL slugs and page routes — Google treats hyphens as word separators, which improves keyword indexing compared to underscores.
- ✓For JavaScript variables and function names, always use camelCase; reserve PascalCase exclusively for class names and React component names so readers immediately understand the type.
- ✓When naming database columns, stick to snake_case — it is the most readable format in SQL queries and is the default convention for PostgreSQL, MySQL, and most ORMs.
- ✓Use CONSTANT_CASE for any value defined at the top of a file or in an environment file that should never change — the visual weight of all-caps is a powerful signal to other developers.
- ✓Paste multi-word phrases or entire sentences into the converter to quickly generate all possible identifier formats at once, then pick the one that matches your target language's convention.
- ✓Title Case is best reserved for headings and proper nouns in written content; avoid it for UI labels and button text, where Sentence case reads more naturally in modern interfaces.
- ✓When converting text for CSS class names, use kebab-case — all major CSS frameworks (Tailwind, Bootstrap, Bulma) use hyphen-separated class names and mixing conventions can cause confusion.
- ✓dot.case is useful when defining nested configuration keys in properties files (like Java's application.properties or .env files) — it creates a natural namespace hierarchy without requiring JSON nesting.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-05
Help us improve!
How would you rate the Case Converter?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Standard Mathematical References
by Various