HomeFormattersTextCase Converter

Case Converter

Text

Convert text between camelCase, PascalCase, snake_case, kebab-case, Title Case, UPPER, and lower case instantly in your browser — nothing is uploaded anywhere.

Reviewed by the thecalcu.com team · Last updated July 18, 2026

What is a Case?

The Case Converter is a text formatting tool that instantly rewrites any phrase or identifier into your chosen capitalisation style, camelCase, PascalCase, snake_case, kebab-case, Title Case, UPPER CASE, or lower case. It is built for developers, writers, and data professionals who need to rename variables, generate CSS class names, prepare headings, or normalise database column names without manually editing every word.

Every programming language and style guide has its own naming convention. JavaScript uses camelCase for variables (totalAmount) and PascalCase for classes (TotalAmount). Python favours snake_case (total_amount). CSS and HTML prefer kebab-case (total-amount). Switching between these formats by hand is slow, error-prone, and interrupts your flow, especially when converting a multi-word phrase like "total investment amount" into each style.

The Case Converter solves this by detecting word boundaries automatically. It recognises spaces, hyphens, underscores, and camelCase transitions, so it can correctly parse getUserFullName, get-user-full-name, and get_user_full_name as the same four words and then reformat them into whichever style you need.

All conversion runs entirely in your browser. Nothing you type is sent to a server or stored anywhere, making it safe to use with proprietary variable names, internal identifiers, or sensitive schema fields. You can also try the Text to Slug Converter if you need URL-safe lowercase output with hyphen separators.

Why Use a Case Converter?

Writing identifiers by hand in the correct case is a constant, low-level friction point in software development. When renaming a field across layers of a stack, from a database column in snake_case to a JSON API key in camelCase to a React prop in camelCase to a CSS class in kebab-case, the same concept appears in four different formats. A mistake in any one of them causes a silent bug or a broken reference.

Content teams face the same issue when producing headings, tag names, and slug URLs from the same source phrase. A case converter makes the transformation deterministic and instant, removing the chance of a typo introducing getUsername instead of getUsername.

The tool is also useful for code review: if you spot an inconsistently named identifier, you can quickly verify the correct cased form before leaving a comment, rather than eyeballing the capitalisation.

Who Should Use This Formatter?

Front-end developers spend a large part of their day naming things, components, props, CSS classes, URL paths. The Case Converter handles the mechanical part of that job, letting you focus on the name itself rather than the capitalisation.

Back-end and full-stack engineers often need to translate between snake_case (Python, SQL, Ruby) and camelCase (JavaScript, Go, Java) as data crosses API boundaries. Pasting a schema field into the converter and switching case takes two seconds rather than thirty.

Data analysts and database engineers frequently need column names in multiple formats, snake_case in SQL, camelCase in a JSON export, Title Case in a report header. Use the converter alongside the JSON Formatter when working with API responses or data pipelines.

Technical writers and content creators use Title Case for headings and need lowercase or kebab-case versions for URL slugs. The converter handles both without a second tool.

What Insights Does the Case Converter Give You?

The primary output is the converted text in your chosen case, ready to copy. Each style option reflects a different set of trade-offs:

  • camelCase / PascalCase, no separators, so identifiers are compact. PascalCase signals a type or class; camelCase signals a value or function.
  • snake_case, the most readable for long names because underscores provide clear visual separation. Preferred in Python, SQL, and configuration files.
  • kebab-case, similar readability to snake_case but uses hyphens, which are conventional in HTML/CSS and URLs. Cannot be used directly as a JavaScript variable name (hyphens are subtraction operators).
  • Title Case, for human-readable labels and headings where every word needs prominence.
  • UPPER CASE / lower case, for constants, environment variable names, or normalising input before further processing.

How to use this Case calculator

  1. Paste your text into the Input Text box, this can be a plain English phrase, an existing identifier in any case style, or a list of words.
  2. Open the Target Case dropdown and select the style you want: camelCase, PascalCase, snake_case, kebab-case, Title Case, UPPER CASE, or lower case.
  3. The Converted Text output updates instantly, no button press needed.
  4. Click the Copy button beneath the output to copy the result to your clipboard.
  5. Switch the Target Case dropdown to compare how the same phrase looks in different styles without re-pasting.

Formula & Methodology

The converter splits the input on all recognised word boundaries before rejoining in the target format. Word boundaries are detected at:

- Whitespace runs (spaces, tabs, newlines)
- Underscores (_) and hyphens (-)
- camelCase transitions: a lowercase letter immediately followed by an uppercase letter (a→B), and a run of uppercase letters followed by an uppercase-then-lowercase pair (ABCDefABC + Def)

Once split into a word array, the converter applies the target case rules:

| Target | Rule |
|---|---|
| camelCase | First word all-lowercase; subsequent words capitalise first letter, rest lowercase |
| PascalCase | Every word capitalises first letter, rest lowercase |
| snake_case | All words lowercase, joined with _ |
| kebab-case | All words lowercase, joined with - |
| Title Case | Every word capitalises first letter, rest lowercase, joined with space |
| UPPER CASE | text.toUpperCase() applied to entire input |
| lower case | text.toLowerCase() applied to entire input |

Before: getUserFullName
After (snake_case): get_user_full_name

Before: monthly investment amount
After (camelCase): monthlyInvestmentAmount

Frequently Asked Questions

A case converter is a tool that transforms text from one capitalisation style to another, for example, turning a plain English sentence into camelCase for use as a JavaScript variable name, or into snake_case for a Python function. It automates what would otherwise be tedious manual editing, especially when renaming identifiers across a codebase. The Case Converter on thecalcu.com supports seven common styles: camelCase, PascalCase, snake_case, kebab-case, Title Case, UPPER CASE, and lower case.
Both camelCase and PascalCase run words together without spaces, but they differ in how the first word is handled. In camelCase, the first word starts with a lowercase letter (e.g. `getUserName`), whereas in PascalCase every word, including the first, starts with an uppercase letter (e.g. `GetUserName`). camelCase is conventional for variables and functions in JavaScript, Java, and Swift; PascalCase is standard for class names and React component names.
snake_case separates words with underscores and keeps all letters lowercase, for example, `monthly_investment_amount`. It is the dominant naming convention in Python for variable and function names, as well as in database column names and URL slugs where hyphens might be ambiguous. Some configuration file formats (YAML, TOML) also favour snake_case for readability.
kebab-case joins words with hyphens and uses all lowercase letters, producing names that look like words on a skewer, for example, `primary-button-color`. It is the standard convention for HTML class names, CSS custom properties, URL paths, and npm package names. Unlike camelCase, kebab-case is immediately readable in source without any special tooling.
Paste your text into the Input Text box, then choose your target case from the Target Case dropdown. The converter updates the output instantly, no button press required. Click the Copy button below the output to copy the result to your clipboard.
Yes. The Case Converter processes all words in the pasted text together, treating newlines as word separators. This works well for converting a list of words or a short paragraph. For converting identifiers that already have a mix of camelCase and snake_case, the tool first splits on all known word boundaries before rejoining in the target case.
Yes, that is one of its most common uses. If you have a variable like `getUserName` that you want to rename to `get_user_name` for a Python port, paste it in, choose snake_case, and copy the result. For renaming across a codebase you will still need to search-and-replace in your editor, but the converter gives you the correctly cased target string instantly.
Nothing is sent anywhere. All conversion happens entirely in your browser using JavaScript. The text you paste is never sent to a server, stored, or logged. You can use the Case Converter with sensitive variable names, internal identifiers, or proprietary content without any privacy risk.
The tool runs client-side, so once the page has loaded, it works without an internet connection. If you refresh the page while offline it will not load, but an already-open tab will continue to function normally.
Numbers are treated as part of the preceding word, `user123` stays as `user123` rather than being split. Special characters such as `@`, `#`, and `!` are treated as word separators and removed in the output, since they are not valid inside most identifier naming conventions. Accented characters (é, ü) are passed through unchanged.
Yes, kebab-case is exactly the right format for CSS class names. Paste a descriptive phrase like `primary call to action button`, choose kebab-case, and get `primary-call-to-action-button` in one click. You can also use the [Text to Slug Converter](/text-to-slug-formatter/) if you need URL-safe output with additional cleaning.
Title Case capitalises the first letter of every word, for example, `the quick brown fox` becomes `The Quick Brown Fox`. It is used for headings, titles, and product names. Note that this tool applies simple Title Case (all words capitalised), not the editorial convention that keeps prepositions and conjunctions lowercase.
Also known as
text case changerconvert to uppercaseconvert to lowercasetitle case formattercamelCase formattersnake_case converter