Text Case Converter: Change Text to Any Format Instantly

By Risetop Team • April 10, 2026 • 13 min read

Whether you are a programmer following a project's style guide, a writer formatting headlines, or a data analyst cleaning messy spreadsheets, converting between text cases is a task you encounter constantly. Instead of manually retyping text or writing regex patterns every time, a dedicated text case converter handles the job instantly and accurately.

This guide covers every major text case format, explains when and where each one is used, compares naming conventions across programming languages, and shows you how our free Text Case Converter handles all these transformations in one click.

Programming Naming Conventions: A Complete Comparison

One of the most common use cases for case conversion is adapting code between languages with different naming conventions. Here is a comprehensive comparison:

FormatExampleLanguages/ContextsUsed For
camelCasemyVariableNameJavaScript, Java, C#, TypeScript, GoVariables, functions, methods
PascalCaseMyVariableNameC#, Java, TypeScript, Pascal, DelphiClasses, structs, interfaces
snake_casemy_variable_namePython, Ruby, C (libc), Rust, PHPVariables, functions, DB columns
SCREAMING_SNAKEMY_CONSTANTC, C++, Python, Ruby, Java (constants)Constants, macros, env vars
kebab-casemy-variable-nameCSS, HTML, URLs, Lisp, Kotlin filenamesCSS classes, URLs, CLI flags
Train-CaseMy-Variable-NameRare in code; some HTTP headersHeaders, some APIs
dot.casemy.variable.nameConfig files, Java packagesPackage names, config keys
flatcasemyvariablenameGo packages, some JS libsPackage names, URLs
UPPERCASEMYVARIABLENAMEC macros, Fortran, SQL keywordsMacros, constants, enums

Language-Specific Conventions in Detail

JavaScript / TypeScript

JavaScript uses camelCase for variables, functions, and object properties, and PascalCase for class declarations and constructor functions. Constants use SCREAMING_SNAKE_CASE. This convention is enforced by popular linters like ESLint with the "camelcase" rule.

// Variables and functions — camelCase
const userProfile = getUserProfile(userId);
function calculateTotal(items) { return items.reduce((sum, i) => sum + i.price, 0); }

// Classes — PascalCase
class ShoppingCart { constructor() { this.items = []; } }

// Constants — SCREAMING_SNAKE_CASE
const MAX_RETRY_ATTEMPTS = 3;
const API_BASE_URL = "https://api.example.com";

Python

Python's PEP 8 style guide mandates snake_case for functions, variables, and module names, and PascalCase for classes. Constants use SCREAMING_SNAKE_CASE. Private variables are prefixed with a single underscore, and name-mangled variables use double underscores.

# Variables and functions — snake_case
user_profile = get_user_profile(user_id)
def calculate_total(items):
    return sum(item.price for item in items)

# Classes — PascalCase
class ShoppingCart:
    def __init__(self):
        self.items = []

# Constants — SCREAMING_SNAKE_CASE
MAX_RETRY_ATTEMPTS = 3
API_BASE_URL = "https://api.example.com"

Rust

Rust has strict naming conventions enforced by the compiler itself. Functions and methods use snake_case, types and traits use PascalCase (called UpperCamelCase in Rust docs), and constants use SCREAMING_SNAKE_CASE. Static lifetime parameters use a short lowercase name like 'a.

Go

Go uses camelCase for unexported identifiers and PascalCase for exported ones (capitalization controls visibility). Package names use flatcase (lowercase, no underscores). Constants can use either camelCase or SCREAMING_SNAKE_CASE depending on whether they are exported.

C#

C# uses PascalCase for almost everything: classes, methods, properties, namespaces. Local variables and parameters use camelCase. Constants use PascalCase (unlike most other languages). Private fields may use an underscore prefix with camelCase: _privateField.

Non-Programming Text Case Formats

Title Case

Title case capitalizes the first letter of each major word. However, the exact rules differ between style guides:

Example: "the quick brown fox jumps over the lazy dog" becomes "The Quick Brown Fox Jumps over the Lazy Dog" in AP Title Case.

Sentence Case

Sentence case capitalizes only the first letter of the first word and proper nouns. Everything else is lowercase. This is the standard for body text in English and is increasingly preferred for headings in modern web design (Material Design, Apple HIG both use sentence case for section headers).

UPPERCASE / lowercase

Simple transformations: UPPERCASE converts all characters to capitals (useful for acronyms, emphasis, or data normalization). Lowercase converts everything to small letters (useful for email addresses, URL slugs, or case-insensitive comparisons).

Alternating Case (tEXt cAsE)

Also known as "SpongeBob case" or "mock case," this alternates between uppercase and lowercase characters. While mostly used humorously on social media, it has legitimate uses in testing character-handling code and creating visual variety in display typography.

Inverse Case

Swaps the case of every character: uppercase becomes lowercase and vice versa. Useful for quickly fixing text that was accidentally typed with Caps Lock on.

When You Need a Case Converter

Here are real-world scenarios where a text case converter saves significant time:

  1. Cross-language development. You are porting a JavaScript API client to Python. All the camelCase JSON keys need to become snake_case Python attributes. A converter handles this in seconds.
  2. Database migration. Moving from a schema that uses camelCase column names to one that uses snake_case (or vice versa). Converting hundreds of column names manually is error-prone and tedious.
  3. Content formatting. You receive a spreadsheet where all the article titles are in UPPERCASE and need to be converted to Title Case for a CMS import.
  4. API design. Creating consistent naming across REST endpoints (kebab-case in URLs), JSON payloads (camelCase), and database columns (snake_case).
  5. Copywriting and editing. Quickly converting headlines between title case and sentence case to test which looks better in a design mockup.
  6. Data cleaning. Standardizing user-submitted data where some entries are "john doe", others "John Doe", and still others "JOHN DOE".

Smart Word Boundary Detection

A quality case converter does more than just change letter cases — it understands word boundaries. Our Text Case Converter intelligently detects boundaries created by:

This means you can paste "XMLHttpRequest" and convert it to snake_case as "xml_http_request", to kebab-case as "xml-http-request", or to title case as "Xml Http Request" — all correctly handling the acronym boundaries.

Best Practices for Text Case in Projects

Frequently Asked Questions

What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter (myVariableName) while PascalCase starts with an uppercase letter (MyVariableName). In JavaScript and Java, camelCase is used for variables and functions, while PascalCase is used for classes and constructors.
When should I use snake_case vs kebab-case?
Use snake_case for Python, Ruby, C, Rust, and database column names. Use kebab-case for CSS classes, HTML IDs, URL paths, and CLI flags. Most programming languages do not allow hyphens in identifiers, so kebab-case is mainly used outside of code.
What is the AP style rule for title case?
AP style capitalizes the first and last words plus all major words (nouns, verbs, adjectives, adverbs, pronouns). Articles (a, an, the), coordinating conjunctions (and, but, or), and prepositions with three or fewer letters are lowercase, unless they are the first or last word of the title.
Convert text instantly! Try our free Text Case Converter →