Stax
Tools

Text Case Converter

Convert text to camelCase, PascalCase, snake_case, kebab-case, and more.

UPPER CASE
lower case
Title Case
Sentence case
camelCase
PascalCase
snake_case
kebab-case
CONSTANT_CASE
dot.case

When to use each case

  • camelCase: JavaScript/TypeScript variables and functions
  • PascalCase: class names, React components, TypeScript types
  • snake_case: Python variables, Ruby, database column names
  • kebab-case: CSS class names, URL slugs, HTML attributes
  • CONSTANT_CASE: environment variables, config constants
  • dot.case: configuration keys, Java packages
  • Title Case: headings, book titles, product names
  • Sentence case: UI labels, descriptions, body text

Why case matters in programming

Most programming languages are case-sensitive — myVariable and MyVariable are two completely different identifiers. Following the naming convention of your language and codebase is essential for consistency and readability. This tool lets you quickly reformat any string to match any convention without manual editing.

Common use cases for text case conversion

Developers use this tool when renaming variables from a Python codebase (snake_case) to a JavaScript project (camelCase). Content writers use Title Case for blog post headlines and Sentence case for body copy. Database engineers use it to convert column names from mixed-case exports into snake_case for SQL. API designers use kebab-case for URL endpoints and camelCase for JSON field names.

Tips for best results

For code identifiers, paste the full variable name and the converter handles multi-word detection automatically by splitting on spaces, underscores, and hyphens. For titles, use Title Case first then manually lowercase prepositions (of, in, at, by, for) and articles (a, an, the) that shouldn't be capitalised. CONSTANT_CASE is best applied to strings that have already been converted to snake_case to ensure correct underscore placement.

Case sensitivity bugs in real projects

Case-related bugs are more common than they seem. File systems on macOS are case-insensitive by default, meaning MyComponent.tsx and mycomponent.tsx are the same file — but Linux (and therefore most production servers) is case-sensitive, causing 404 errors on deploy. URL slugs should always be lowercase to avoid duplicate content penalties in SEO. Environment variable names are case-sensitive on Unix; API_KEY and api_key are completely different variables.

Frequently asked questions

What is camelCase?
camelCase starts with a lowercase letter and capitalizes the first letter of each subsequent word with no spaces or separators. Example: 'hello world' → 'helloWorld'. Used in JavaScript variables and function names.
What is PascalCase?
PascalCase (also called UpperCamelCase) capitalizes the first letter of every word including the first one. Example: 'hello world' → 'HelloWorld'. Used for class names in most languages.
What is snake_case vs kebab-case?
snake_case joins words with underscores: 'hello_world'. Used in Python variables, database columns, and file names. kebab-case joins words with hyphens: 'hello-world'. Used in CSS classes, HTML attributes, and URL slugs.
What is CONSTANT_CASE?
CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) is all uppercase with underscores. Example: 'api key' → 'API_KEY'. Used for constants in most programming languages.

Related tools