Case Converter

Convert text between any case format instantly. Click a case button below β€” output updates live. Supports 8 formats including camelCase, snake_case and kebab-case.

select a case
Input text
Converted output (click to copy)

When to use each case format

camelCase & PascalCase
Used in JavaScript, Java, and Swift. camelCase for variables and functions; PascalCase for class names and components.
snake_case & kebab-case
snake_case is common in Python and databases. kebab-case is standard for CSS class names, HTML attributes, and URL slugs.
Title Case
Used for headings, article titles, product names, and navigation labels. Capitalises the first letter of each word.

How to Use the Case Converter

  1. Paste or type your text β€” enter any text you want to convert.
  2. Select the target case β€” choose from uppercase, lowercase, title case, sentence case, camelCase, PascalCase, snake_case, kebab-case, or CONSTANT_CASE.
  3. Click convert β€” the result appears instantly.
  4. Copy the result β€” use the copy button to copy to clipboard.
  5. Batch convert β€” paste multiple lines of text for simultaneous conversion of all lines.
⌨️ Keyboard shortcut equivalents: In most text editors: Ctrl+Shift+U (Linux) or select text then Shift+F3 (Word) toggles case. However, programming-specific cases (camelCase, snake_case, PascalCase) require a dedicated converter like this tool β€” no keyboard shortcut produces them automatically.

Understanding Text Cases in Programming

πŸͺ camelCase
First word lowercase, subsequent words capitalised: firstName, getUserById, totalAmountDue. Standard for variables and function names in JavaScript, Java, Swift, Kotlin, and most C-family languages. The most common convention in front-end development.
πŸ›οΈ PascalCase
Every word capitalised: FirstName, GetUserById, TotalAmountDue. Used for class names, component names, and type names in most languages. React components must be PascalCase. C# uses PascalCase for all public members and methods.
🐍 snake_case
All lowercase with underscores: first_name, get_user_by_id, total_amount_due. Standard in Python (PEP 8 style guide), Ruby, PHP variables, and SQL column names. Database column names almost universally use snake_case.
🍒 kebab-case
All lowercase with hyphens: first-name, get-user-by-id, total-amount-due. Used for HTML attributes, CSS class names, URL slugs, and file names. Cannot be used for programming variable names (hyphen is interpreted as minus sign).
πŸ“’ CONSTANT_CASE
All uppercase with underscores: MAX_RETRY_COUNT, API_BASE_URL. Used for constants and environment variables in virtually all programming languages. Makes constants visually distinct from variables at a glance.
πŸ“– Title Case
First letter of each major word capitalised: The Quick Brown Fox. Used for headings, titles, and proper names. Rules vary: most prepositions and articles (the, a, in, of) are typically lowercase unless first or last word in the title.

Case Conventions Across Technologies

Consistency is more important than which convention

The most important rule about naming conventions: pick one and enforce it consistently throughout a codebase. A project using camelCase for some variables and snake_case for others creates cognitive friction for every developer who reads the code. Linters (ESLint, Pylint) can enforce naming conventions automatically β€” set them up and eliminate manual convention checking from code reviews.

Case conversion in data processing

Data from different sources uses different case conventions. A CSV exported from a database uses snake_case columns. A JavaScript frontend expects camelCase properties. A Python backend uses snake_case internally. Case conversion is a constant reality in data pipelines and API integrations. Libraries handle this automatically: Python's pydantic converts between snake_case and camelCase, JavaScript's lodash provides _.camelCase() and _.snakeCase() utilities.

SEO and URL case

URLs should always use lowercase and kebab-case for separating words: toolsnova.net/json-formatter not toolsnova.net/JsonFormatter or toolsnova.net/json_formatter. Google treats uppercase and lowercase URLs as different pages, potentially splitting link equity. Hyphens are preferred over underscores in URLs β€” Google treats hyphens as word separators but treats underscores as word joiners (json_formatter = one word 'jsonformatter' to Google).

⌨️ IDE case shortcuts: VS Code: select text, then Ctrl+Shift+P β†’ 'Transform to...' for any case. JetBrains IDEs: Ctrl+Shift+U toggles upper/lower case. Vim: gU (uppercase), gu (lowercase), g~ (toggle case). These shortcuts handle simple case changes; use this converter for programming-specific cases that IDEs don't natively support.

Frequently Asked Questions

When should I use camelCase vs PascalCase?
Use camelCase for variable and function names in JavaScript, Java, and Swift. Use PascalCase for class names, constructor functions, and React component names.
What is snake_case used for?
snake_case is standard in Python for variable and function names (per PEP 8). Also used for database column names and file names.
What is kebab-case used for?
kebab-case is standard for CSS class names, HTML element IDs, URL slugs, and file names in front-end projects. Example: my-component.css.
What is CONSTANT_CASE?
CONSTANT_CASE (SCREAMING_SNAKE_CASE) is used for constants and environment variables: MAX_RETRY_COUNT, API_BASE_URL, NODE_ENV.