Case Converter

Transform the case of a string

Lowercase, uppercase, camelCase, PascalCase, snake_case, and more

Last updated: January 25, 2026
Frank Zhao - Creator
CreatorFrank Zhao
Lowercase:
Uppercase:
Camelcase:
Capitalcase:
Constantcase:
Dotcase:
Headercase:
Nocase:
Paramcase:
Pascalcase:
Pathcase:
Sentencecase:
Snakecase:
Mockingcase:

Introduction / overview

The Case Converter takes any text and instantly shows multiple casing formats side-by-side—then lets you copy the one you need with a single click. It’s designed for quick “paste → convert → copy” workflows.

The fastest way to avoid naming debates: convert the same phrase into camelCase, PascalCase, snake_case, and kebab-case and pick what matches your project conventions.

Who is this for?

  • Developers standardizing variable names, JSON keys, routes, and file names.
  • Data analysts cleaning column headers before importing into SQL/BI tools.
  • Writers and UI designers who want consistent headings and sentence-style labels.

Everything runs locally in your browser. If you’re also working with encoded payloads, you may find these tools useful too: Base64 String Encoder/Decoder, Hash Text, or UUID Generator.

How to use / quick start

You don’t need to configure anything. Paste a phrase once, and the tool generates all formats below it.

1

Enter your text

Type or paste a phrase into the “Your string” input. Think: a feature name, API field, title, or file name.

2

Scan the formats

Each row shows one casing style. The label on the left tells you what you’re looking at.

3

Copy the one you need

Click the copy button to the right of the row. You can paste it directly into your editor.

4

Share or reset

Use the Share button to send a link. Use Reset to restore the default example text.

Worked example (with indexing)

For “Mockingcase”, the output alternates uppercase and lowercase by character index. If your input is abcdef, then there aren=6n = 6 characters.

i=0i=0\RightarrowAA,,i=1i=1\Rightarrowbb,,i=2i=2\RightarrowCC,,\dotsi=5i=5\Rightarrowff

So the result is AbCdEf.

Worked example (word-based conversion)

Suppose the phrase splits into n=3n = 3 words:"project name draft". Label them asw1=projectw_1=\text{project}, w2=namew_2=\text{name}, w3=draftw_3=\text{draft}.

snake_case\text{snake\_case}==w1_w2_w3w_1\_w_2\_w_3==project_name_draft\text{project\_name\_draft}

You can read results literally: snake case uses underscores, kebab case uses hyphens, and camel case uses capitalization to separate words.

Real-world examples / use cases

Here are a few practical situations where case conversion saves time and prevents subtle inconsistencies.

API field naming

Background: your backend prefers snake_case, but your frontend preferscamelCase.

Input: customer order status

Result: customer_order_status or customerOrderStatus

How to use it: generate consistent DTO keys, then pair with Hash Text if you need deterministic identifiers for caching.

Component and file names

Background: your UI components use PascalCase, and file names usekebab-case.

Input: user profile card

Result: UserProfileCard and user-profile-card

How to use it: copy both so your import paths and component symbols stay aligned.

Routes and slugs

Background: URLs typically prefer hyphens because they’re easy to read.

Input: Account Settings Security

Result: account-settings-security

How to use it: pair with Token Generator when you’re building share links with unique IDs.

Documentation headings

Background: docs often use Header Case for readability.

Input: how to reset password

Result: How To Reset Password or How to reset password

How to use it: use Header Case for section titles, Sentence case for button labels.

Common scenarios / when to use

Case conversion is especially useful when you need consistency across systems. Here are common scenarios where it shines—and a few cases where you should be cautious.

Config keys

Normalize environment variable names and config fields.

Security reviews

Clean up identifiers before adding allowlists and policies.

Bug triage

Match log keys to source code naming conventions quickly.

Dataset columns

Prepare CSV header names for SQL or analytics dashboards.

Docs and UI copy

Generate headings and labels that look consistent and professional.

Refactors

Keep naming consistent while renaming types, fields, and constants.

When it might not be a fit

  • If your input contains important non-letter symbols (like $ or/), some formats may simplify them.
  • For locale-specific casing rules (certain languages), results may differ from your expectations.

Tips & best practices

Start from a human-readable phrase

A good trick: write the concept as plain English first (with spaces). Then pick the casing you need.

Be consistent across layers

If your database uses snake_case and your API usescamelCase, decide where the mapping happens and stick to it.

Avoid subtle mismatches

A single missing underscore can break a serializer. Copy-paste from a converter is faster than re-typing.

Pro tip: When creating IDs or secrets, don’t rely on casing—use the Token Generator or ULID Generator instead.

Calculation method / formula explanation

Case conversion is less about “math” and more about predictable text rules. Still, it helps to think in terms of tokens (words) and transformations.

Tokenization idea

The tool first splits your text into words. Conceptually, you can think of it as producing a sequence:

{w1,w2,,wn}\{w_1, w_2, \dots, w_n\}

Then each case format is just a different way to join and capitalize these tokens.

Common joining rules

snake_case\text{snake\_case}==w1_w2__wnw_1\_w_2\_\dots\_w_n
kebab-case\text{kebab-case}==w1w2wnw_1-w_2-\dots-w_n
camelCase\text{camelCase}==lower(w1)Cap(w2)Cap(wn)\mathrm{lower}(w_1)\,\mathrm{Cap}(w_2)\,\dots\,\mathrm{Cap}(w_n)
PascalCase\text{PascalCase}==Cap(w1)Cap(w2)Cap(wn)\mathrm{Cap}(w_1)\,\mathrm{Cap}(w_2)\,\dots\,\mathrm{Cap}(w_n)

Mockingcase rule

Mockingcase alternates letter casing by index. For characterss0,s1,,sn1s_0, s_1, \dots, s_{n-1}, the output is:

ri={upper(si)if i is evenlower(si)if i is oddr_i = \begin{cases} \mathrm{upper}(s_i) & \text{if } i \text{ is even}\\ \mathrm{lower}(s_i) & \text{if } i \text{ is odd} \end{cases}

Related concepts / background info

What is “case” in naming?

In programming, “case” usually means two things: whether letters are uppercase/lowercase, and the pattern used to separate words (underscores, hyphens, or capitalization).

If your naming rule is described as a mapping from words to a final identifier, you can represent it as a function f({wi})f(\{w_i\}).

Quick glossary

  • Delimiter: the character used between words, like _ or -.
  • Token: one word unit wiw_i after splitting.
  • Capitalize: turning ww into a leading-uppercase form (used by Pascal and Header case).

Frequently asked questions (FAQs)

Which casing should I use for database columns?

A common convention is snake_case. It stays readable and avoids case-sensitive issues.

Why do I see both “Sentencecase” and “Capitalcase”?

They’re used for different writing styles. Sentence case reads like normal prose; capital/title case capitalizes words more aggressively.

Does the converter keep punctuation and symbols?

Many case formats focus on letters and word boundaries. If punctuation is meaningful in your identifier, treat the output as a starting point.

Is mockingcase random?

No. It’s deterministic based on index parity: imod2i\bmod 2 decides whether a character is upper or lower.

Can I share a link with my input included?

Yes—use Share and choose the “include results” option (when available). This creates a URL with your input encoded as a query parameter.

How do I verify my transformed key is safe for a URL?

Kebab-case is usually a good default for paths. If you’re putting values into query strings, you may also want to use an encoder.

Limitations / disclaimers

This tool helps with formatting and consistency, but it can’t know your team’s rules (like reserved words, maximum length, or special acronyms). Always sanity-check before shipping.

  • Some inputs may be simplified when converting (especially if they contain many symbols).
  • Locale-specific casing is tricky; results are intended for general developer workflows.
  • This is not a security tool. Don’t assume converted text is “safe” for untrusted contexts.

External references / sources

If you want a deeper background on naming conventions and casing styles, these references are a good starting point:

For practical workflow helpers, you can also browse our “Other” tools category.

Case Converter - camelCase, PascalCase, snake_case, etc