Case Converter - Convert Text to camelCase, snake_case, Title Case & More

Convert text to camelCase, PascalCase, snake_case, kebab-case, Title Case & more — instantly in your browser, no sign-up, nothing uploaded.

camelCaseuserProfileSettings apiResponseHandler myBlogPostTitle
PascalCaseUserProfileSettings ApiResponseHandler MyBlogPostTitle
snake_caseuser_profile_settings api_response_handler my_blog_post_title
kebab-caseuser-profile-settings api-response-handler my-blog-post-title
CONSTANT_CASEUSER_PROFILE_SETTINGS API_RESPONSE_HANDLER MY_BLOG_POST_TITLE
Title CaseUser Profile Settings Api Response Handler My Blog Post Title
UPPERCASEUSER PROFILE SETTINGS API RESPONSE HANDLER MY-BLOG-POST TITLE
lowercaseuser profile settings api response handler my-blog-post title

Paste your text, pick a case style, done

Type or paste any phrase above and the case converter rewrites it instantly — no sign-up, no waiting, nothing uploaded. Switch between camelCase, snake_case, kebab-case, PascalCase, Title Case, UPPER, and lower with a single click.

How to use it

  1. Paste (or type) your text into the input box above.
  2. Click the case style you need — camelCase, snake_case, kebab-case, etc.
  3. The result appears instantly. Hit Copy to grab it.

Quick reference — every case style at a glance

The same phrase, user login count, written in every format:

Style Example Where it's used
camelCase userLoginCount JavaScript / TypeScript variables & functions
PascalCase UserLoginCount Class names in JS, C#, Java; React components
snake_case user_login_count Python variables, database column names, Ruby
kebab-case user-login-count CSS class names, HTML attributes, URL slugs
Title Case User Login Count Page titles, headings, article names
UPPERCASE USER_LOGIN_COUNT Constants in most languages (e.g. MAX_RETRIES)
lowercase user login count Email addresses, general normalisation

Worked example

Say your designer handed you this label from a Figma file:

Total Items In Cart

You need it as a JavaScript variable. Click camelCase and you get:

totalItemsInCart

Need the same value as a CSS modifier class? Click kebab-case:

total-items-in-cart

Or a Python variable? Hit snake_case:

total_items_in_cart

How to do this in code

Sometimes you need to convert case inside a script rather than by hand. Here are minimal, copy-pasteable snippets for the two most common asks.

JavaScript — snake_case to camelCase

// JavaScript
const snakeToCamel = s =>
  s.replace(/(_\w)/g, m => m[1].toUpperCase());

console.log(snakeToCamel('total_items_in_cart')); // totalItemsInCart

Python — any phrase to snake_case

# Python
import re

def to_snake(text):
    # insert underscore before uppercase letters, then lowercase everything
    s = re.sub(r'(?<=[a-z0-9])(?=[A-Z])', '_', text)
    return re.sub(r'[\s\-]+', '_', s).lower()

print(to_snake('TotalItemsInCart'))  # total_items_in_cart
print(to_snake('Total Items In Cart'))  # total_items_in_cart

For heavier lifting in Python, the inflection library and python-slugify cover edge cases like acronyms and Unicode. In JavaScript, Lodash ships _.camelCase(), _.snakeCase(), and _.kebabCase() out of the box.

How it works

The tool tokenises your input — it splits on spaces, hyphens, underscores, and the boundaries between lower-case and upper-case letters. Those tokens are then re-joined with the separator (or capitalisation pattern) the target style demands. Because everything runs in your browser, your text never leaves your device.

When to use a case converter (and when not to)

Good fits

  • Renaming variables, functions, or CSS classes to match a codebase's style guide.
  • Converting copy from a design file or spreadsheet into code-ready identifiers.
  • Generating URL slugs (kebab-case) from article titles.
  • Normalising database column names to snake_case before a migration.

Where it won't help

  • Acronyms: most converters treat HTML as a regular word, producing html or Html rather than HTML. Double-check abbreviations in your output.
  • Non-Latin scripts: Arabic, Chinese, Korean, etc. have no concept of upper/lower case — the tool won't transform them.
  • Bulk file renaming: for renaming hundreds of files at once, a shell script or a tool like rename (Linux) is faster and safer.

Naming conventions matter more than they seem — consistent casing is what lets linters, auto-importers, and code search tools work reliably. The Python PEP 8 style guide and the Google JavaScript Style Guide both spell out which cases belong where.

Takeaway: pick the style your language or framework expects, paste your phrase, and copy the result — the tool handles the busywork so you don't have to retype anything by hand.

Frequently asked questions

Is my text uploaded anywhere when I use this tool?+
No. The converter runs entirely in your browser using JavaScript. Nothing is sent to a server, so your text stays completely private.
What's the difference between camelCase and PascalCase?+
Both join words without spaces. camelCase starts with a lowercase letter (myVariable); PascalCase (also called UpperCamelCase) starts with an uppercase letter (MyVariable). PascalCase is standard for class names; camelCase is standard for variables and functions in JavaScript.
What is kebab-case used for?+
Kebab-case uses hyphens between words: my-component. It's the convention for CSS class names, HTML custom attributes, and URL slugs — anywhere a hyphen is readable but an underscore or capital letter would be awkward.
How do I convert text case in VS Code without a tool?+
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type Transform to. VS Code has built-in commands for uppercase, lowercase, and title case. For camelCase or snake_case you need an extension like Change Case by wmaurer.
How do I convert a string to snake_case in Python?+
A quick one-liner: import re; re.sub(r'[\s\-]+', '_', text).lower(). For camelCase inputs, you'll also need to insert underscores before capital letters — see the snippet in the article above.
How do I convert to camelCase in JavaScript?+
Lodash makes it one line: _.camelCase('user login count') returns 'userLoginCount'. Without a library, split on spaces/hyphens/underscores, lowercase the first word, then capitalise the first letter of each remaining word and join them.
Does it handle multiple lines or a whole block of text?+
Yes — paste as many lines as you like. Each line is converted independently, so a list of phrases stays a list, just in the new case style.
Is this case converter free? Do I need to sign up?+
Completely free, no account needed. Open the page, paste your text, and convert — that's it.