Text Case Converter
Convert text between any case format — camelCase, snake_case, PascalCase, kebab-case, slugs, and more — instantly in your browser
Input Text
Select Conversion
Output — UPPER CASE
What Is a Text Case Converter?
A text case converter transforms text between different capitalization and formatting styles used in writing, programming, and web development. Whether you need to normalize variable names to camelCase, generate a URL-friendly slug, or format a title consistently, this tool handles all common case conventions with a single click.
The tool supports 13 case formats, displays a live character and word count, and shows every conversion at the same time so you can compare results side by side.
Naming Conventions in Programming
Different programming languages and style guides mandate different naming conventions. Mixing conventions in a codebase creates inconsistencies and can even cause bugs in case-sensitive systems. This tool helps you convert between conventions instantly.
camelCase
camelCase writes compound words with the first word lowercase and subsequent words capitalized, with no separators:
hello world → helloWorld
user profile name → userProfileName
Used in: JavaScript variables and functions, Java, C#, JSON keys, Swift, TypeScript.
PascalCase (UpperCamelCase)
PascalCase capitalizes every word including the first:
hello world → HelloWorld
user profile name → UserProfileName
Used in: React components, TypeScript interfaces and types, C# classes, Python classes, .NET namespaces.
snake_case
snake_case separates words with underscores and uses all lowercase:
hello world → hello_world
user profile name → user_profile_name
Used in: Python (variables, functions, file names), Ruby, PHP, Rust, PostgreSQL column names, C/C++ (some styles).
CONSTANT_CASE (SCREAMING_SNAKE_CASE)
CONSTANT_CASE is the uppercase variant of snake_case, used for values that should not change:
hello world → HELLO_WORLD
max retry count → MAX_RETRY_COUNT
Used in: Constants in JavaScript/TypeScript (const MAX_SIZE = 100), Python (MAX_RETRIES), Java (static final), environment variables.
kebab-case
kebab-case separates words with hyphens and uses all lowercase:
hello world → hello-world
user profile name → user-profile-name
Used in: CSS class names, HTML custom attributes, URL slugs, file names in many projects, Lisp conventions, npm package names.
dot.case
dot.case uses dots as separators:
hello world → hello.world
user profile → user.profile
Used in: Configuration file keys (app.server.port), Java package names (com.example.myapp), logging namespaces.
URL Slugs
A URL slug is a URL-friendly version of a string — lowercase, with hyphens instead of spaces, and all special characters removed:
Hello World! → hello-world
Crêpes & Café → crepes-cafe
Slugs are used in blog post URLs, product pages, and any content-addressed URL. This tool:
- Lowercases all characters
- Removes accents (é → e, ñ → n)
- Strips special characters
- Collapses multiple separators into a single hyphen
- Removes leading and trailing hyphens
Title Case vs. Sentence Case
Title Case capitalizes the first letter of every word:
the quick brown fox → The Quick Brown Fox
Title Case is used in article headlines, book titles, and UI headings. It is different from proper AP or Chicago style (which have rules for articles and prepositions), but suitable for most developer use cases.
Sentence case capitalizes only the first letter of the first word in each sentence:
hello world. this is a test. → Hello world. This is a test.
Sentence case matches standard written English and is appropriate for UI labels, notification messages, and alt text.
Alternating Case and Inverse Case
Alternating case switches between lowercase and uppercase character by character:
hello world → hElLo wOrLd
It is commonly used in internet culture (the “mocking SpongeBob” meme) but also appears in visual design and branding.
Inverse case (also called toggle case) swaps every character to the opposite case:
Hello World → hELLO wORLD
Inverse case is useful for debugging text transformations or for creative typography.
Converting Between Conventions
This tool detects word boundaries automatically when converting from one convention to another. It handles:
- Whitespace-delimited text:
hello world→ any format - camelCase / PascalCase input:
helloWorldsplits at uppercase letters - snake_case / kebab-case / dot.case input: splits at
_,-,. - Mixed input: handles combinations gracefully
For example, myVariableName → snake_case correctly produces my_variable_name, not myvariablename.
Text Statistics
The stats bar shows:
- Characters: the total number of characters (including spaces and punctuation)
- Words: the number of space-separated word tokens
- Lines: the number of newline-separated lines
These are useful for quickly checking content length for APIs, form fields, or character-limited systems.
Common Developer Use Cases
Variable Naming When Copying from Documentation
API documentation often uses human-readable names. Convert "User Profile ID" to user_profile_id (Python), userProfileId (JavaScript), or UserProfileId (C#) instantly.
Database Column Names
SQL databases conventionally use snake_case. Convert natural-language column descriptions to the correct format before creating migrations.
CSS Class Names
BEM (Block Element Modifier) and Tailwind-style class names use kebab-case. Convert your component names from PascalCase to kebab-case for consistent CSS selectors.
Environment Variable Names
Environment variables are almost universally CONSTANT_CASE. Convert configuration keys to the correct format for .env files.
URL Generation
When creating pages or posts, convert the title to a slug to generate the URL. "How to Use camelCase in JavaScript" → how-to-use-camelcase-in-javascript.
Internationalized Text Normalization
The slug conversion removes diacritical marks (accents), making it suitable for normalizing user-provided text from non-English languages into ASCII-safe identifiers.
Frequently Asked Questions
Does this tool work with text in other languages? Yes, for most case conversions (uppercase, lowercase, title case, sentence case). Slug generation normalizes accented Latin characters (é, ñ, ü, etc.) to their ASCII equivalents. Languages that don’t use the Latin alphabet (Chinese, Japanese, Arabic, etc.) are preserved as-is in most modes.
What happens to numbers in the text?
Numbers are treated as word separators in programmer cases (camelCase, snake_case, etc.). For example, user123name → user 123 name boundary detection applies, producing user_123_name in snake_case.
Is the conversion reversible? Some conversions are lossy (case information is discarded in lowercase/slug), so converting back from snake_case to the original sentence may not perfectly restore the original casing. For round-tripping, use the original text as your source of truth.
Is my text sent to any server? No. All processing happens in your browser using JavaScript. No data is transmitted anywhere. The tool works offline once the page has loaded.