Menu

Case Converter : Instantly Switch Text Between Any Case Format

Paste your text, select the output format, and get the result in under a second. This free case converter handles everything from simple uppercase and lowercase to developer-specific formats like camelCase, snake_case, and kebab-case. Works with any amount of text, with no character limits.

Case Converter

Case Converter is a free online tool that instantly changes text into UPPERCASE, lowercase, Title Case, camelCase, snake_case, and more.

Case Conversions

Click to select conversion type

Characters: 0
Words: 0
Lines: 0
Paragraphs: 0

Supported Case Formats

This tool supports all eight common text case formats used in writing, programming, and web development:

UPPERCASE
Converts every letter to a capital. Used in constants, headings, emphasis, and legal writing.
THIS IS UPPERCASE TEXT
lowercase
Converts every letter to lowercase. Used in URLs, CSS classes, and general text normalisation.
this is lowercase text
Title Case
Capitalises the first letter of each major word. Used for article titles, page headings, and book names.
This Is Title Case Text
Sentence case
Capitalises only the first letter of the first word. Used for body text, descriptions, and standard writing.
This is sentence case text
camelCase
First word lowercase, each following word capitalised, no spaces. Standard in JavaScript variables and functions.
thisIsCamelCaseText
PascalCase
Every word capitalised, no spaces. Used for class names and React component names.
ThisIsPascalCaseText
snake_case
All lowercase with underscores between words. Used in Python, Ruby, and SQL column names.
this_is_snake_case_text
kebab-case
All lowercase with hyphens between words. Used in CSS, HTML attributes, and URL slugs.
this-is-kebab-case-text

When to Use Each Case Format

Choosing the right case format is not just about preference. In programming, using the wrong convention can cause errors or make your code inconsistent with team standards.

camelCase
Variable names and function names in JavaScript, Java, and TypeScript.
PascalCase
Class names, constructor functions, and React component names.
snake_case
Variable names in Python and Ruby, and database column names in SQL.
kebab-case
CSS class names, HTML attributes, and URL slugs.
UPPERCASE
Constants in JavaScript (MAX_RETRIES, API_KEY) and environment variables.
Title Case
Page titles, blog post headlines, and navigation links.
Sentence case
Meta descriptions, subtitles, and body content.

Case Conventions in Real Code

Seeing each convention in actual code makes it clear why the right case format matters. These examples show the naming style expected in four common languages and environments.

JavaScript / TypeScript
// camelCase for variables and functions const maxRetries = 3; function getUserProfile() {} // PascalCase for classes and components class UserService {} function LoginButton() {} // UPPERCASE for constants const API_BASE_URL = "https://...";
Python
# snake_case for variables and functions user_first_name = "Alice" def get_user_profile(): pass # PascalCase for class names class UserService: pass # UPPERCASE for constants MAX_CONNECTIONS = 100
CSS
/* kebab-case for class names */ .nav-menu {} .hero-section {} .btn-primary {} /* kebab-case for custom properties */ :root { --font-size-base: 16px; --color-text-primary: #333; }
SQL
-- snake_case for table and column names CREATE TABLE user_accounts ( user_id UUID, first_name TEXT, email_address TEXT, created_at TIMESTAMP );

How to Use This Case Converter

Converting your text takes just a few seconds. No setup or login required.

  1. Paste or type your text into the input box.
  2. Click the button for the case format you need.
  3. The converted text appears instantly.
  4. Click Copy to copy it to your clipboard.
💡 Tip

You can convert the same input into multiple formats. Just click different buttons without re-entering your text. This is useful when you need to compare formats or generate versions for different environments.

Best Practices for Text Case in Code

Following these conventions prevents the most common naming errors and keeps codebases consistent across teams.

  • Always follow the convention of the language you are working in. Python uses snake_case for variables; JavaScript uses camelCase. Mixing conventions in a single codebase breaks readability and can confuse linters and style checkers.
  • Use UPPERCASE only for true constants, not for all variables. In JavaScript and Python, UPPERCASE signals that a value should never be reassigned. Using it for regular variables creates misleading expectations for other developers reading the code.
  • Use kebab-case for all CSS class names and HTML attributes. CSS is case-insensitive but the community standard is kebab-case. Mixing camelCase into CSS class names causes inconsistency when class names appear in both CSS files and JavaScript selectors.
  • Apply sentence case to UI text, not title case. Most modern style guides (including Google, Apple, and Microsoft) recommend sentence case for buttons, labels, and descriptions. Title case is reserved for page headings and navigation items.
  • Be consistent with acronyms in camelCase and PascalCase. The convention varies: some teams write getUserID and others write getUserId. Pick one approach and apply it everywhere in the codebase.
  • Use a linter or formatter to enforce case conventions automatically. ESLint, Pylint, and Stylelint all have rules for naming conventions. Automating this check removes the need to catch case violations in code review.

Common Case Convention Mistakes

These are the naming errors that appear most often in code reviews and style audits.

Using snake_case in JavaScript

Writing user_first_name in JavaScript is technically valid but breaks the language convention. JavaScript uses camelCase: userFirstName. Mixing in snake_case makes the codebase inconsistent and harder to read.

Using camelCase in Python

Writing getUserProfile() in Python violates PEP 8, which requires get_user_profile(). Python linters flag camelCase function names as style violations. The only exception is class names, which use PascalCase.

Using underscores in CSS class names

Writing .nav_menu in CSS is valid but goes against the universal kebab-case convention. It also conflicts with BEM methodology if your team uses it. Use .nav-menu instead.

Applying Title Case to button text

Writing button labels as "Submit Your Request" instead of "Submit your request" goes against modern UI style guides. Sentence case is the standard for interactive elements. Title case is reserved for page-level headings.

Frequently Asked Questions

What case formats does this converter support?

This tool supports uppercase, lowercase, title case, sentence case, camelCase, PascalCase, snake_case, and kebab-case. All eight common text case formats used in writing and programming are covered.

What is the difference between camelCase and PascalCase?

In camelCase, the first word is lowercase and each subsequent word starts with a capital: myVariableName. In PascalCase, every word is capitalised including the first: MyVariableName. PascalCase is typically used for class and component names. camelCase is used for variables and functions.

What is the difference between snake_case and kebab-case?

Both are all-lowercase with a separator between words. snake_case uses underscores (user_first_name) and is the standard in Python, Ruby, and SQL. kebab-case uses hyphens (user-first-name) and is the standard in CSS, HTML attributes, and URL slugs. Underscores are not valid in URLs, which is why CSS and URLs use hyphens.

What is snake_case used for?

snake_case is the standard naming convention in Python, Ruby, and SQL. All letters are lowercase with underscores separating words. For example: user_first_name or created_at.

When should I use title case versus sentence case?

Title case (capitalising the first letter of each major word) is appropriate for page headings, blog post titles, and navigation menu items. Sentence case (capitalising only the first word) is preferred for button labels, form field labels, descriptions, and most UI text. Modern style guides from Google, Apple, and Microsoft recommend sentence case for interface elements.

Can I use this tool to convert code variable names?

Yes. Paste any variable name or phrase and convert it to the case format required by your language or framework. For example, paste a database column name in snake_case and convert it to camelCase for use in a JavaScript object, or to PascalCase for a TypeScript interface property.

Is there a character limit?

No. This tool has no character limit. You can paste entire documents and convert them instantly.

Does the converter handle special characters and numbers?

Yes. The converter preserves numbers and most special characters in the output. For programming case formats like camelCase and snake_case, special characters that are not valid in identifiers are handled based on the target format. Always review the output before pasting directly into code.

The Right Case Format, Every Time

Whether you're naming a JavaScript variable, writing a blog headline, or setting up a CSS class, using the correct case convention keeps your code consistent and your content professional.

This free case converter handles all eight formats instantly. Paste your text once and convert it into any format you need, with no setup required.