🧰 ToolPilot

Case Converter

Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, and kebab-case. Free, instant, and works entirely in your browser.

What Is a Case Converter?

A case converter is a text transformation tool that changes the capitalization pattern of letters in your text. It handles both natural language cases (uppercase, lowercase, title case, sentence case) and programming naming conventions (camelCase, snake_case, kebab-case). Instead of manually retyping text, you paste it once and convert it to any case with a single click.

Text case matters more than most people realize. Accidentally leaving Caps Lock on while typing an email, needing to convert a headline to title case for a publication, or reformatting variable names when switching between programming languages are all common scenarios where manual conversion is tedious and error-prone. A case converter eliminates that friction.

This tool runs entirely in your browser using JavaScript string methods. No text is sent to any server, making it safe for converting confidential content, proprietary code, or sensitive business documents.

How Text Case Conversion Works

At the character level, case conversion relies on Unicode mapping tables that define the uppercase and lowercase equivalents of every letter across all writing systems. In JavaScript, the built-in toUpperCase() and toLowerCase() methods handle this mapping for the entire Unicode character set, including accented characters, Cyrillic, Greek, and other scripts.

Title case conversion capitalizes the first letter of every word by detecting word boundaries (spaces, hyphens, and other separators). Sentence case is more nuanced: it capitalizes only the first letter after sentence-ending punctuation (periods, exclamation marks, question marks) while keeping everything else lowercase. This requires regex pattern matching to identify sentence boundaries accurately.

Programming cases like camelCase, snake_case, and kebab-case first normalize the input to lowercase, then apply specific rules: camelCase removes spaces and capitalizes the first letter of each word except the first; snake_case replaces spaces with underscores; kebab-case replaces spaces with hyphens. Each convention exists because different programming ecosystems have different readability preferences and technical constraints.

Supported Cases Explained

  • UPPERCASE — Every letter is capitalized. Used for acronyms (NASA, HTML), constants in code (MAX_RETRIES), headings in legal documents, and emphasizing text where bold formatting is unavailable.
  • lowercase — Every letter is lowercase. Used for normalizing user input, email addresses, URLs, and search queries where case should not matter.
  • Title Case — The first letter of each word is capitalized. Standard for book titles, article headlines, and headings in APA and Chicago style guides. Note that strict title case rules (like keeping articles and prepositions lowercase) vary by style guide.
  • Sentence case — Only the first letter of each sentence is capitalized. This is the default for body text in most English writing. It reads more naturally than Title Case for longer passages.
  • camelCase — Words are joined without separators, and each word after the first starts with an uppercase letter. The standard naming convention for variables and functions in JavaScript, Java, C#, and TypeScript. Examples: getUserName, isLoggedIn, totalPrice.
  • snake_case — Words are separated by underscores and all letters are lowercase. The dominant convention in Python, Ruby, Rust, and SQL. Examples: user_name, created_at, max_retry_count.
  • kebab-case — Words are separated by hyphens and all letters are lowercase. Commonly used in URLs, CSS class names, HTML attributes, and CLI command flags. Examples: main-content, user-profile, --no-cache.

Common Use Cases

  • Fixing accidental Caps Lock — Typed a full paragraph with Caps Lock on? Convert it to sentence case instantly instead of retyping everything.
  • Formatting headlines — Content editors frequently convert draft headlines to Title Case before publishing articles, blog posts, or email subject lines.
  • Refactoring variable names — When migrating code between languages (e.g., Python to JavaScript), developers need to convert snake_case identifiers to camelCase or vice versa.
  • Creating URL slugs — Convert article titles to kebab-case for clean, SEO-friendly URLs. "How to Build a Web App" becomes how-to-build-a-web-app.
  • Database column naming — SQL databases conventionally use snake_case for column names. Converting a list of field names from a spec document to snake_case saves time during schema design.
  • Normalizing user input — Convert email addresses and usernames to lowercase before storing them to prevent duplicate entries caused by case differences.
  • Legal and formal documents — Contract headers and section titles often require UPPERCASE formatting by convention.

Tips and Best Practices

  • Be consistent within a project. Choose one naming convention for your codebase and stick with it. Mixing camelCase and snake_case in the same project hurts readability and causes bugs when developers assume the wrong format.
  • Follow language conventions. Use camelCase in JavaScript/TypeScript, snake_case in Python/Ruby, PascalCase for React components and C# classes, and kebab-case for CSS and URLs.
  • Title case is not universal. Different style guides (APA, MLA, Chicago, AP) have different rules for which words to capitalize. This tool capitalizes every word, which is a good starting point but may need adjustment for formal publications.
  • Preserve acronyms manually. Converting "NASA launches API" to camelCase produces nasaLaunchesApi. If you need to preserve acronyms (NASALaunchesAPI), you will need to adjust the output manually.
  • Test edge cases. Numbers, special characters, and multi-byte Unicode characters can behave unexpectedly in case conversions. Always verify the output when converting text that contains non-alphabetic characters.

Case Converter vs Alternatives

Text editors like VS Code and Sublime Text have built-in case conversion commands (e.g., Transform to Uppercase). These work well within the editor but require you to select text, run a command palette action, and only support basic cases. This online tool supports all seven cases in one place and works from any device without installing software.

Programming libraries like Lodash (_.camelCase(), _.snakeCase()) and Python's string methods provide case conversion in code. These are the right choice for automated, programmatic conversion in production applications. This tool is better suited for one-off manual conversions during writing, editing, or development work.

For bulk file renaming or converting case across an entire codebase, specialized CLI tools like rename, sed, or IDE refactoring features are more appropriate. This tool is designed for quick, interactive text conversion in the browser.

Frequently Asked Questions

Related Tools