Aa Case Converter

Convert text between camelCase, PascalCase, snake_case, kebab-case, UPPER_CASE, and more. Instant conversion for variable names and identifiers. Free online case converter.

How to Use

1

Paste your text

Type or paste any text — sentences, variable names, or any format. The tool detects the input format automatically.

2

All formats update instantly

camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE, Title Case, UPPERCASE, lowercase and more are shown at once.

3

Copy any format

Click the Copy button next to any format to copy it to your clipboard.

Frequently Asked Questions

What is camelCase? +
camelCase writes compound words without spaces, capitalizing the first letter of each word except the first: "myVariableName". It is widely used in JavaScript, Java, and Swift for variable and function names.
What is the difference between snake_case and kebab-case? +
Both separate words with a delimiter in lowercase. snake_case uses underscores (my_variable) and is common in Python and databases. kebab-case uses hyphens (my-variable) and is common in CSS class names and URLs.
What is PascalCase used for? +
PascalCase capitalizes the first letter of every word with no separator: "MyClassName". It is the standard for class names in most object-oriented languages including JavaScript, C#, Java, and PHP.
Can I convert sentences and paragraphs? +
Yes. The tool intelligently splits on spaces, underscores, hyphens, dots, and camelCase/PascalCase boundaries — so any format works as input. Multi-line text and sentences are fully supported.
Is my text sent to a server? +
No. All conversions happen instantly in your browser using JavaScript. Your text never leaves your device.


Complete Guide: Case Converter

Naming conventions are one of the most fundamental aspects of code style, and different languages, frameworks, and contexts each have strong conventions. A case converter lets you instantly transform text between any naming style — essential when mapping between systems that use different conventions, like converting database column names to JSON API keys.

The Major Naming Conventions

When Each Convention is Used

Knowing which convention to use in which context prevents code review comments and style inconsistencies:

// JavaScript — camelCase for variables, PascalCase for classes
const userName = 'alice';
class UserProfile { }

// Python — snake_case for everything except classes
user_name = 'alice'
class UserProfile:
    pass

/* CSS — kebab-case */
.user-profile-card { color: red; }

-- SQL — UPPER_SNAKE for keywords, snake_case for identifiers
SELECT user_id, first_name FROM user_profiles WHERE is_active = TRUE;

Converting Database Column Names to API JSON Keys

A common real-world use case: your database uses snake_case column names (first_name, created_at), but your REST API returns camelCase JSON keys (firstName, createdAt). Many ORMs handle this automatically, but when they don't, you need a reliable conversion function.

Regex Patterns for Word Boundary Splitting

Programmatic case conversion relies on correctly identifying word boundaries. Different input formats require different splitting strategies:

// Split snake_case or kebab-case
const words = 'user_profile_id'.split(/[-_]+/);

// Split camelCase or PascalCase
const words2 = 'userProfileId'.split(/(?=[A-Z])/);

// Universal splitter (handles all common formats)
function toWords(str) {
  return str
    .replace(/([a-z])([A-Z])/g, '$1 $2')
    .replace(/[-_]+/g, ' ')
    .toLowerCase()
    .split(' ')
    .filter(Boolean);
}

Unicode-Aware Case Conversion Pitfalls

Standard toUpperCase() and toLowerCase() handle most Latin characters correctly, but some languages have special rules. The most famous example is Turkish: the dotted İ (capital I with dot) and dotless ı (lowercase i without dot) are separate letters. 'i'.toUpperCase() returns I in English locale but should return İ in Turkish locale:

// Use locale-aware methods for Turkish content
'istanbul'.toLocaleUpperCase('tr-TR'); // → 'İSTANBUL'
'İSTANBUL'.toLocaleLowerCase('tr-TR'); // → 'istanbul'
🧰 50+ Tools