Case Converter

Paste or type your text, then choose a case format. Instant conversion with copy to clipboard.

Characters: 0
Words: 0

How to Use the Case Converter

  1. Enter your text in the input field. Paste a paragraph, a single word, or an entire document. The character and word counts update in real time.
  2. Click a case format button from the 12 available options. The converted text instantly appears in the output area below.
  3. Copy the result by clicking the Copy button next to the output. The text is copied to your clipboard and ready to paste anywhere.

How It Works

Each case format uses a specific algorithm to transform your text. Simple formats like UPPERCASE and lowercase use JavaScript's built-in toUpperCase() and toLowerCase() methods. Title Case capitalizes the first letter of every word.

Programming-style cases like camelCase, PascalCase, snake_case, and kebab-case work by splitting text on whitespace and special characters, then joining words with the appropriate separator and capitalization. camelCase removes separators and lowercases the first word. PascalCase is the same but capitalizes the first word. snake_case joins with underscores. kebab-case joins with hyphens.

The alternating case and inverse case options transform each character individually. Alternating toggles between lower and upper for every letter. Inverse inverts the case of every character (uppercase becomes lowercase and vice versa).

Common Use Cases

  • Programming - Convert variable names between camelCase (JavaScript), snake_case (Python), and kebab-case (CSS) naming conventions
  • Writing and editing - Fix accidental caps lock text, standardize heading capitalization, or convert sentence case to title case
  • Data cleaning - Normalize inconsistent text data in spreadsheets, databases, or CSV files
  • Social media - Create aesthetic text styles using alternating case or generate formatted titles for posts

Naming Convention Guide

Format Example Used In
camelCase myVariableName JavaScript, Java, C#
PascalCase MyClassName C#, TypeScript classes
snake_case my_variable_name Python, Ruby, SQL
kebab-case my-variable-name CSS, URLs, HTML attrs
CONSTANT_CASE MY_CONSTANT Constants in most languages

Programming Naming Conventions

Each programming language has its own naming convention. Use this reference when converting variable and function names between languages.

Language Convention Example
JavaScript camelCase getUserData
TypeScript camelCase / PascalCase UserProfile (class)
Python snake_case get_user_data
Java camelCase / PascalCase ArrayList (class)
C# PascalCase GetUserData
Go camelCase / PascalCase httpHandler (unexported)
Rust snake_case / PascalCase get_user_data
Ruby snake_case user_profile
CSS / HTML kebab-case nav-bar, data-tooltip
SQL snake_case (columns) created_at, user_id
Environment Variables CONSTANT_CASE API_KEY, DATABASE_URL

When to Use Each Case

Choosing the right case format depends on context: the language, the platform, and the type of identifier.

Format Best For Example
camelCase Variables, functions, methods in JS/TS/Java fetchUserData()
PascalCase Classes, components, types, interfaces UserProfile.tsx
snake_case Python/Ruby variables, DB columns, API fields user_profile
kebab-case URLs, CSS classes, HTML attributes, file names user-profile-card
CONSTANT_CASE Constants, env variables, config keys MAX_RETRY_COUNT
dot.case Config keys, nested object paths, Java packages com.example.app

Case Conversion Examples

See how the input "hello world" transforms into every available format.

Format Output
UPPERCASE HELLO WORLD
lowercase hello world
Title Case Hello World
Sentence case Hello world
camelCase helloWorld
PascalCase HelloWorld
snake_case hello_world
kebab-case hello-world
CONSTANT_CASE HELLO_WORLD
dot.case hello.world
aLtErNaTiNg hElLo wOrLd
iNVERSE cASE HELLO WORLD

Frequently Asked Questions

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter (e.g., "myVariableName") while PascalCase starts with an uppercase letter (e.g., "MyVariableName"). Both remove spaces and capitalize the first letter of each word except the first in camelCase.

When should I use snake_case vs kebab-case?

snake_case (underscores) is commonly used in Python, Ruby, and database column names. kebab-case (hyphens) is standard for URLs, CSS class names, and HTML attributes. Choose based on the conventions of your programming language or platform.

Does the case converter handle special characters?

Yes. Uppercase and lowercase conversions preserve all special characters exactly. For code-style cases (camelCase, snake_case, kebab-case), special characters are removed and words are reformatted according to the selected convention.

Is this tool useful for programming?

Absolutely. Developers frequently need to convert between naming conventions when working across languages. For example, JavaScript uses camelCase for variables, Python uses snake_case, and CSS uses kebab-case. This tool makes those conversions instant.

What is CONSTANT_CASE used for?

CONSTANT_CASE (all uppercase with underscores) is used for constants and environment variables in most programming languages. Examples include API_KEY, MAX_RETRIES, or DATABASE_URL. It signals that a value should not be changed during program execution.

More Free Tools

Explore our collection of free online tools

Text Tools

Generators

Calculators