Text Tools

Case Converter

Convert text between uppercase, lowercase, title case, sentence case, camelCase, snake_case, kebab-case, and PascalCase instantly.

Free to use No registration Mobile friendly Unlimited usage

What is the Case Converter?

String capitalization conventions represent a foundational pillar of modern software engineering, database modeling, and technical writing. Different programming languages, architectural frameworks, and styling systems mandate specific casing rules to maintain syntactical validity and code readability. A variable represented as userProfile in JavaScript must be mapped to user_profile in PostgreSQL and styled as .user-profile in CSS. Manually retyping variable names or headline capitalization is tedious and introduces avoidable syntax bugs.

The TU Web Tools Case Converter delivers an instantaneous, client-side casing transformation utility. It allows developers, copywriters, and content editors to convert single identifiers or multi-paragraph documents into eight industry-standard casing formats with a single click.

The Complete Casing Specification Matrix

Casing Style Example Identifier Delimiter Rule Primary Ecosystem Standards
camelCase userAccountBalance First word lowercase; all subsequent words capitalized. JavaScript, TypeScript, Java variables, Swift, JSON properties.
PascalCase UserAccountBalance Every word begins with an uppercase letter; no delimiters. C#, .NET classes, React/Vue components, Java class names.
snake_case user_account_balance All lowercase words separated by underscores (_). Python (PEP 8), Rust, Ruby, PostgreSQL/MySQL column identifiers.
kebab-case user-account-balance All lowercase words separated by hyphens (-). CSS class selectors, HTML custom attributes, URL slugs, REST endpoints.
CONSTANT_CASE USER_ACCOUNT_BALANCE All uppercase words separated by underscores (_). Global environment variables, immutable constants across all languages.
Title Case User Account Balance Capitalizes major words; leaves minor prepositions lowercase. Editorial article headlines, page titles, navigation menus.

Lexical Tokenization & Edge Case Resolution

Converting between case styles is far more complex than simple string replacement. High-quality case conversion engines must resolve several tricky boundary conditions:

  1. Acronym Preservation: Naive converters break consecutive uppercase letters, converting parseHTTPResponse into parse-h-t-t-p-response. Our algorithm recognizes acronym clusters and tokenizes them cleanly as parse-http-response.
  2. Mixed Delimiter Normalization: Raw strings often mix spaces, underscores, hyphens, and camelCase transitions (e.g., user_profile-cardData). Our engine normalizes all delimiters into a unified token stream before applying target capitalization rules.
  3. Numeric Boundaries: Tokens like ipv6Address or utf8Encoding contain numbers adjacent to letters. The engine treats alphanumeric boundaries cleanly without inserting accidental hyphens or spaces.

Programmatic Implementation in Python

import re

def to_snake_case(name: str) -> str:
    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
    s2 = re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1)
    return re.sub(r'[\s\-]+', '_', s2).lower()

def to_kebab_case(name: str) -> str:
    return to_snake_case(name).replace('_', '-')

def to_camel_case(name: str) -> str:
    words = re.split(r'[\s_\-]+', name)
    if not words:
        return ""
    return words[0].lower() + "".join(w.capitalize() for w in words[1:])

100% Client-Side Privacy Guarantee

Variable names, code refactorings, internal database schema definitions, and draft blog headlines are never transmitted across the network. All transformation logic executes in your browser sandbox with zero server dependencies.

Benefits of using the Case Converter

Twelve formats in one place

Prose cases and programming cases together, so you are not switching tools when you move between writing and code.

Converts in any direction

Existing capitals are read as word boundaries, so camelCase to snake_case works as easily as the reverse.

Bulk conversion for code

The programming formats process each line separately, so a whole column of names converts in one pass.

Fixes caps lock accidents

Inverse case restores text typed with caps lock on, including the wrongly lowercased first letter.

How to use the tool

Step 1

Paste the text you want to reformat

Step 2

Pick a format from the dropdown - prose cases are listed first, code cases after

Step 3

Press Convert Case to see the result

Step 4

Copy the output, or change the format to compare two options

Popular use cases

  • Fixing ALL CAPS product feeds
  • Headline and title formatting
  • Variable naming in code
  • URL slugs and CSS class names
  • Database column naming
  • Environment variable keys
  • Porting code between languages
  • Cleaning up imported spreadsheet headers

Frequently asked questions

camelCase capitalizes every word except the first with no spaces (common in JavaScript/TypeScript variables). PascalCase capitalizes the first letter of every word (used for classes in C#, Java, and React components). snake_case uses all lowercase letters separated by underscores (standard in Python and SQL columns). kebab-case uses lowercase letters separated by hyphens (standard in CSS classes and URL slugs).

Yes. You can paste hundreds of lines containing variable names, database column identifiers, or class declarations. Selecting your target case transforms every line instantaneously, making large code refactors and schema conversions fast and effortless.

Ready to start using TU Web Tools?

Free, browser based utilities for developers, SEO professionals, students and businesses.

Free to use  •  Mobile friendly  •  No installation required