Ttooleras
Aa

Case Converter

Text Tools

Convert between upper, lower, title, camel, snake, kebab, Pascal, CONSTANT cases. Free, private — all processing in your browser.

Type text above to see all case conversions
Advertisement

The Case Converter transforms text between every common case style used in writing, programming, and design: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE (SCREAMING_SNAKE_CASE), dot.case, path/case, aLtErNaTiNg case, and iNvErSe case. Paste text in any format and instantly see every variant side-by-side. Essential for developers normalizing variable names, content writers formatting headings, data analysts cleaning up spreadsheet columns, or anyone who needs to switch between naming conventions.

Different programming languages and style guides use different case conventions: JavaScript and Java prefer camelCase for variables and PascalCase for classes; Python and Ruby prefer snake_case for variables and functions; CSS and URLs prefer kebab-case; environment variables and constants use CONSTANT_CASE. Manually converting between these is tedious and error-prone. This tool handles the conversion automatically, including smart word-boundary detection for compound identifiers. Runs entirely in your browser — text stays private.

Case Converter — key features

12+ case styles

Upper, lower, Title, Sentence, camel, Pascal, snake, kebab, CONSTANT, dot, path, alternating, inverse — all in one tool.

Side-by-side preview

See your text in every case style simultaneously. No need to toggle between options.

Smart word detection

Automatically recognizes word boundaries in any source format (spaces, underscores, hyphens, case changes).

Preserves non-ASCII

Unicode characters (accents, emoji, CJK) are preserved through conversions — only case rules apply to Latin letters.

Bulk conversion

Paste multiple lines and convert all at once. Each line converts independently.

Copy any variant

One-click copy for any case style. Ideal workflow for converting variable names across languages.

Live conversion

Output updates as you type. Fast iteration for testing different cases.

100% client-side

All conversion happens in your browser — your text never leaves your device.

How to use the Case Converter

  1. 1

    Paste or type text

    Drop text in the input area. Single line, multiple lines, or multiline paragraphs — all supported.

  2. 2

    See all cases

    Every case style is computed simultaneously. Scroll through to find the one you need.

  3. 3

    Copy the result

    Click Copy next to the case style you want. Paste into your code, config, or document.

  4. 4

    Bulk convert multiple lines

    If multiple lines are pasted, each line converts independently — useful for bulk renaming or list formatting.

Common use cases for the Case Converter

Programming

  • Rename variables across languages: Port code from Python (snake_case) to JavaScript (camelCase) by converting variable names wholesale.
  • Convert API response keys: External APIs return snake_case keys; your JS code expects camelCase. Convert for clean integration.
  • Standardize naming conventions: Enforce your team's case conventions by converting legacy code to the preferred style.
  • Generate multiple variable forms: Need `userName` (variable), `USER_NAME` (env var), `user_name` (DB column)? Generate all from one input.

Content and writing

  • Format headings: Convert prose to Title Case for headings and subheadings. Apply title-case rules consistently.
  • Create URL slugs: Convert page titles to kebab-case slugs: `Hello World Post` → `hello-world-post`.
  • Fix all-caps or mixed-case text: Comments, notes, forum posts often have bad case. Clean up with lowercase or Sentence case.
  • Social media post formatting: Apply specific case styles for visual impact: Title Case for impact, ALL CAPS for emphasis.

Data and databases

  • Clean spreadsheet column headers: Excel/CSV exports often have inconsistent casing. Convert to snake_case for SQL or camelCase for JSON.
  • Normalize user input: User-submitted data with mixed casing — normalize before storing or comparing.
  • Convert database column names: Migrating from one database's convention to another (Postgres snake_case vs SQL Server PascalCase).

Design and UX

  • CSS class naming: Convert design tokens to kebab-case CSS classes or BEM notation.
  • Figma layer naming: Standardize layer names across design files by applying consistent casing.
  • Component naming: Convert between PascalCase (React components) and kebab-case (HTML custom elements).

Case Converter — examples

All cases at once

One input, all variants.

Input
Hello World Example
Output
UPPERCASE: HELLO WORLD EXAMPLE
lowercase: hello world example
Title Case: Hello World Example
Sentence case: Hello world example
camelCase: helloWorldExample
PascalCase: HelloWorldExample
snake_case: hello_world_example
CONSTANT_CASE: HELLO_WORLD_EXAMPLE
kebab-case: hello-world-example
dot.case: hello.world.example

camelCase to snake_case

Convert variable naming between languages.

Input
getUserProfile
getOrderItems
saveCustomer
Output
get_user_profile
get_order_items
save_customer

snake_case to camelCase

Python to JavaScript style.

Input
user_name
first_name
email_address
Output
userName
firstName
emailAddress

Title to kebab (URL slug)

Blog post title to URL.

Input
10 Best JavaScript Libraries for 2026
Output
10-best-javascript-libraries-for-2026

UPPERCASE to Sentence case

Clean up ALL-CAPS text.

Input
HELLO! THIS IS VERY EXCITING NEWS.
Output
Hello! This is very exciting news.

Acronyms in camelCase

XMLParser to various cases.

Input
XMLParser
Output
snake_case: xml_parser
camelCase: xmlParser
kebab-case: xml-parser

Mixed input to CONSTANT_CASE

Environment variable naming.

Input
APIendpoint URL
Output
API_ENDPOINT_URL

Technical details

Each case style has specific rules for word separators, capitalization, and spacing:

UPPERCASE — All characters uppercase.
- Example: HELLO WORLD
- Use: emphasis in text, legal documents, SQL keywords

lowercase — All characters lowercase.
- Example: hello world
- Use: most text, URLs, HTML attributes

Title Case — First letter of each word uppercase (except articles, prepositions for strict Title Case).
- Example: The Quick Brown Fox
- Use: book/movie titles, headings, proper names

Sentence case — First letter of first word uppercase, rest lowercase (except proper nouns).
- Example: The quick brown fox
- Use: normal prose, body text

camelCase — First word lowercase, subsequent words capitalized, no separators.
- Example: helloWorldExample
- Use: JavaScript/Java variables and methods, Swift properties

PascalCase (UpperCamelCase) — Every word capitalized, no separators.
- Example: HelloWorldExample
- Use: classes in C#, Java, JavaScript; types in TypeScript; components in React/Vue

snake_case — All lowercase, words separated by underscores.
- Example: hello_world_example
- Use: Python/Ruby variables and functions, SQL column names, Unix filenames

CONSTANT_CASE (SCREAMING_SNAKE_CASE) — All uppercase, words separated by underscores.
- Example: HELLO_WORLD_EXAMPLE
- Use: constants, environment variables, C preprocessor macros

kebab-case — All lowercase, words separated by hyphens.
- Example: hello-world-example
- Use: CSS class names, URLs, HTML attributes, Hugo/Jekyll post slugs

dot.case — All lowercase, words separated by dots.
- Example: hello.world.example
- Use: nested config keys (Java properties), some APIs

path/case — Lowercase, words separated by slashes.
- Example: hello/world/example
- Use: file paths, URL routes

aLtErNaTiNg CaSe — Alternating upper and lower letters.
- Example: HeLlO wOrLd
- Use: meme text, playful emphasis

iNvErSe cAsE — Swap case of every character.
- Example: hELLO wORLD
- Use: reveal hidden text, mockery

Word boundary detection:

Converting between cases requires identifying word boundaries. The tool handles:

- Space-separated: hello world → splits on space
- camelCase/PascalCase: helloWorld → splits on case change
- snake_case: hello_world → splits on underscore
- kebab-case: hello-world → splits on hyphen
- Mixed: XMLParser → handles acronym-word boundaries (xml_parser or xmlParser)

Edge cases:

- Acronyms: XMLParser — typically keeps acronym as one unit in snake_case (xml_parser). Some conventions use XML_parser or x_m_l_parser.
- Numbers: hello2world — numbers are word characters; may or may not create boundaries depending on config.
- Single characters: a to camelCase is still a.
- Empty strings: Returns empty string.
- Non-ASCII characters: Accented letters, Unicode — some cases only meaningful for ASCII alphabet.

Common problems and solutions

Acronym handling inconsistency

`XMLParser` can be interpreted as `xml_parser` (acronym + word) or `x_m_l_parser` (all letters separate). Different conventions exist. Most modern style guides (Google, Airbnb) treat acronyms as single words in camelCase: `xmlParser`.

Numbers in identifiers

`hello2world` — depends on convention. Most treat numbers as part of the same word: `hello2world` stays as one word. Some split: `hello_2_world`. Specify which behavior you want.

Losing case of proper nouns

Simple lowercase/uppercase conversion lowercases everything, including names. "John Smith" becomes "john smith". Sentence case typically preserves capital at sentence start but lowercases names. Be aware of this for name fields.

Unicode and accent handling

`é` → `É` in uppercase — most tools handle this correctly. German ß is special (uppercase ẞ since 2017). Turkish İ/ı is dotless. Check edge cases if processing international text.

Title Case rules vary

Strict Title Case keeps articles, prepositions, and short words lowercase (`The Lord of the Rings`). Loose Title Case capitalizes every word. Major style guides disagree. Consistency within your project matters more than which rule.

Empty words in snake_case

Consecutive separators `hello__world` or `hello--world` should resolve to `hello_world`. Most tools handle this but edge cases exist with non-ASCII characters.

Leading digits in identifiers

Many languages don't allow identifiers starting with digits. `123abc` converted to camelCase produces invalid JavaScript. Filter or prefix as needed.

Preserving existing case conventions

Mass conversion can break code if variable names have special meaning (e.g., React `Props` convention, RFCs like `RFC 7231`). Review changes before applying to a large codebase.

Case Converter — comparisons and alternatives

camelCase vs snake_case vs kebab-case: Different language communities prefer different conventions. JavaScript/Java use camelCase; Python/Ruby use snake_case; CSS/URLs use kebab-case. These are conventions, not rules — mixing within a project is discouraged but possible.

Title Case vs Sentence case: Title Case capitalizes each word (like book titles); Sentence case capitalizes only the first word and proper nouns (like normal writing). Style guides vary: AP prefers sentence case for headlines; Chicago uses Title Case.

ALL CAPS vs lowercase: All caps is slower to read and can come across as shouting. Use sparingly for emphasis. Lowercase is neutral and matches body text expectations.

camelCase vs PascalCase: camelCase starts lowercase; PascalCase (UpperCamelCase) starts uppercase. Used for different purposes: camelCase for variables/functions, PascalCase for classes/types/components.

snake_case vs CONSTANT_CASE: snake_case is lowercase with underscores for variables/functions. CONSTANT_CASE is uppercase with underscores for constants/environment variables. Same underscore convention, different visual weight.

kebab-case vs snake_case: Both use separators. kebab-case uses hyphens, better for URLs and HTML (which don't like underscores). snake_case uses underscores, better for programming (many languages don't allow hyphens in identifiers).

Frequently asked questions about the Case Converter

Which case should I use in my code?

Follow your language's convention: JavaScript/TypeScript/Java/C#: camelCase for variables and methods, PascalCase for classes and types. Python/Ruby: snake_case for variables and functions, PascalCase for classes. Go: mixedCase (lowercase if private, uppercase if exported). Rust: snake_case for functions, CamelCase for types. CSS/URLs: kebab-case.

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter: firstName. Used for variables and functions. PascalCase (also called UpperCamelCase) starts with an uppercase letter: FirstName. Used for classes, types, and components. Both have no separators between words.

What is kebab-case for?

Hyphen-separated lowercase: my-class-name. Used for CSS class names (<div class="my-class">), URLs (/my-page-slug), HTML custom elements (<my-component>), command-line flags (--long-option). Not valid as identifiers in most programming languages (hyphen means subtraction).

What is snake_case used for?

Underscore-separated lowercase: my_variable. Used for Python variables and functions (PEP 8), Ruby methods, SQL column names, database field names, Unix file names. Valid as identifiers in every programming language.

What is CONSTANT_CASE?

Uppercase underscore-separated: MAX_RETRIES. Used for constants in most languages (JavaScript const MAX_RETRIES = 3), environment variables (DATABASE_URL), C preprocessor macros (#define MAX 100). Conveys: don't change this value.

What is Title Case?

First letter of each word uppercase. Examples: Hello World, The Quick Brown Fox. Used for book/movie titles, headings, proper names. Strict Title Case keeps articles, prepositions, and conjunctions lowercase (The Lord of the Rings). Loose Title Case capitalizes everything.

How are acronyms handled in camelCase?

Two approaches: Keep as acronymXMLParser, APIKey (treats acronyms as single words). Lowercase subsequent lettersXmlParser, ApiKey (treats acronyms like regular words). Modern style guides (Google, Airbnb) prefer the second: apiKey, xmlParser. Pick one and be consistent.

Is this converter safe for sensitive data?

Yes. All conversion happens in your browser. Variable names from private codebases, customer data, confidential documents — all stay on your device. No network interaction.

What if my text has non-ASCII characters?

Unicode characters are preserved. Simple uppercase/lowercase work correctly for most scripts (Latin with accents, Cyrillic, Greek). Some special cases: German ß → uppercase ẞ (since 2017), Turkish i/İ (dotted) vs ı/I (dotless). Case rules only apply to letters — numbers, punctuation, emoji pass through unchanged.

Can I batch-convert a list of names?

Yes. Paste multiple lines, one per line. Each converts independently. Useful for bulk renaming variable lists, column headers, or file names.

Additional resources

Advertisement

Related tools

All Text Tools

Learn more

Explore more tools

200+ free tools that run in your browser.

Browse all tools →