Writing

Text Case Converter

Convert text to any case format instantly

What Is a Text Case Converter?

A text case converter transforms written text between different capitalisation formats instantly. Rather than retyping or manually editing every word, you paste text once and click a format to get the exact case style you need β€” whether that is a headline, a code variable name, or a URL slug.

This converter supports ten formats covering everyday writing needs as well as programming conventions: UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, and dot.case.

When to Use Each Case Style

Here is a quick reference guide for choosing the right case format:

  • UPPER CASE β€” Emphasis, acronyms, brand names, legal headings, keyboard shortcuts.
  • lower case β€” Normalising data before storage, email addresses, URL slugs when not using kebab-case.
  • Title Case β€” Blog headlines, article titles, book/movie names, navigation menus, page headings.
  • Sentence case β€” UI button labels, notification messages, body-copy headings, alt text, email subjects.
  • camelCase β€” JavaScript and TypeScript variable/function names, JSON property keys, React prop names.
  • PascalCase β€” Class names, React and Vue component names, TypeScript interfaces, C# types.
  • snake_case β€” Python variables and functions, Ruby methods, SQL column names, file names in many frameworks.
  • kebab-case β€” HTML attributes, CSS class names, URL slugs, npm package names, CLI flags.
  • CONSTANT_CASE β€” Environment variables, config constants, Redux action types.
  • dot.case β€” Configuration keys (e.g., app.database.host), logging namespaces, package identifiers.

Case Conversion in Programming

Every major programming language has a naming convention enforced by style guides and linters:

  • JavaScript / TypeScript: camelCase for variables and functions; PascalCase for classes and components; CONSTANT_CASE for module-level constants.
  • Python: snake_case for variables, functions, and modules (PEP 8); PascalCase for class names; CONSTANT_CASE for constants.
  • CSS / HTML: kebab-case for class and ID names.
  • SQL: snake_case for tables and columns; UPPER CASE for SQL keywords (a widely followed convention).
  • Java / C#: PascalCase for class and method names; camelCase for local variables; CONSTANT_CASE for constants/enums.

Consistent naming makes codebases easier to read, search, and maintain. Use this tool when onboarding data from external sources, renaming bulk variables, or generating slugs from user-supplied text.

Title Case Rules Explained

Title Case is more nuanced than simply capitalising every word. Style guides (APA, Chicago, AP) agree on the core principle: capitalise major words, lowercase minor ones. This converter follows the widely adopted rule of keeping short prepositions (in, on, at, by, of, up, to), conjunctions (and, but, or, nor, for), and articles (a, an, the) lowercase β€” except when they appear as the first or last word of a title.

Examples:

  • The Lord of the Rings β€” "of" and "the" are lowercase; "The" capitalised because it is first.
  • War and Peace β€” "and" is lowercase.
  • All Quiet on the Western Front β€” "on" and "the" are lowercase.

Frequently Asked Questions

What is Title Case and when should I use it?
Title Case capitalises the first letter of most words in a headline or title, while leaving short connecting words (a, an, the, and, or, but, for, in, on, at, by, of) lowercase unless they appear first or last. Use it for article headlines, book titles, movie titles, and page headings.
What is the difference between camelCase and PascalCase?
Both formats remove spaces and capitalise word boundaries. camelCase starts with a lowercase letter β€” commonly used for JavaScript variable names and JSON keys (e.g., firstName, totalAmount). PascalCase starts with an uppercase letter β€” used for class names, React components, and TypeScript interfaces (e.g., FirstName, UserProfile).
What is snake_case used for?
snake_case separates words with underscores and keeps all letters lowercase. It is the standard naming convention in Python (variables and functions), Ruby, SQL column names, and many database schemas. CONSTANT_CASE (all caps with underscores) is the variant used for constants and environment variables.
What is kebab-case used for?
kebab-case separates words with hyphens and uses all lowercase. It is the default naming convention for HTML attributes, CSS class names, URL slugs, and npm package names. Hyphens are readable by both humans and search engines, making kebab-case ideal for SEO-friendly URLs.
How does Sentence case differ from lower case?
Lower case converts every letter to lowercase with no exceptions. Sentence case capitalises only the first letter of each sentence (after a period, exclamation mark, or question mark), as well as the very first character in the text β€” exactly as you would write a normal English sentence.
Can I convert camelCase or PascalCase back to readable words?
Yes. This converter automatically detects camelCase and PascalCase boundaries when tokenising input. Typing "helloWorld" or "HelloWorld" and choosing "Title Case" or "lower case" will correctly split the words β€” outputting "Hello World" or "hello world" respectively.