Skip to content
Toolcroft

Text Tools

Case Converter

Convert text to uppercase, lowercase, title case, sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, and more - all at once.

UPPERCASE

HELLO WORLD

lowercase

hello world

Title Case

Hello World

Sentence case

Hello world

camelCase

helloWorld

PascalCase

HelloWorld

snake_case

hello_world

kebab-case

hello-world

CONSTANT_CASE

HELLO_WORLD

dot.case

hello.world

aLtErNaTiNg

hElLo wOrLd

rEVERSE cASE

hELLO wORLD

When to use each case style

Different programming languages, frameworks, and contexts have different naming conventions. Using the wrong case style can cause code to fail (CSS class names with underscores don't work the same as with hyphens) or simply look inconsistent with the surrounding codebase.

  • camelCase: JavaScript and TypeScript variables, functions, and methods; Java and C# fields; JSON property names; CSS custom properties (--myColor).
  • PascalCase: Class names in JavaScript, TypeScript, Java, C#; React components; C# namespaces and types; Dart classes.
  • snake_case: Python variables and functions; Ruby methods and variables; Go package names (no separators, but lowercase); SQL column names.
  • CONSTANT_CASE: Constants in most languages (JavaScript const values exported from modules, Java static final, Python module-level constants).
  • kebab-case: CSS class names and IDs; HTML attribute values; URL slugs; npm package names; command-line flag names (--my-flag).
  • dot.case: Configuration key namespacing (e.g., server.port); Java package names; some logging frameworks.
  • Title Case: Headings, page titles, product names, UI button labels in English-language interfaces.
  • Sentence case: Body copy, error messages, tooltip text, descriptions. Most modern design systems prefer sentence case for UI copy (as opposed to title case) for readability.

How the converter splits words

The converter intelligently detects word boundaries regardless of input format. It handles:

  • Space, hyphen, underscore, and dot separators (such as "hello-world", "hello_world", "hello.world") are all treated as two words.
  • camelCase and PascalCase boundaries: a lowercase letter followed by an uppercase letter marks a new word ("helloWorld" -> "hello", "world").
  • Acronym sequences: a run of uppercase followed by an uppercase+lowercase pair is split correctly ("HTMLParser" -> "HTML", "Parser" -> outputs "html_parser" in snake_case).

Frequently asked questions

What is camelCase?

camelCase joins words together with no separator, capitalising every word except the first. Named after the humps of a camel. It is the standard naming convention for variables and functions in JavaScript, TypeScript, Java, and many other languages.

What is the difference between camelCase and PascalCase?

Both join words without separators and capitalise each word, but PascalCase capitalises the first word too. PascalCase is used for class names and React components. "background color" -> camelCase "backgroundColor", PascalCase "BackgroundColor".

What is snake_case used for?

snake_case separates words with underscores and keeps everything lowercase. It is standard in Python (variables, functions), Ruby (methods), and SQL (table and column names). CONSTANT_CASE (all uppercase snake_case) is used for constants.

What is kebab-case used for?

kebab-case separates words with hyphens. It is used for CSS class names, HTML attributes, URL slugs, npm package names, and command-line flags. Identifiers with hyphens are not valid in most programming languages (the hyphen parses as a subtraction operator), so kebab-case is mainly for web and CLI contexts.

Compound word edge cases

Some identifiers contain well-known acronyms or brand names that have non-standard casing:

  • iOS / iPhone: the lowercase "i" prefix is intentional. Converting "iPhone" to PascalCase as "Iphone" is technically correct per the algorithm but violates the brand name. Consider preserving known acronyms manually.
  • XMLParser / HTMLDocument: consecutive uppercase letters represent an acronym. The converter splits these as "XML", "Parser" in snake_case -> xml_parser but some codebases prefer XMLParser (keep the acronym together) or XmlParser (normalize to PascalCase).
  • GitHub / PostgreSQL: brand names with internal capitalization. The converter will treat these as compound words. Be aware that your project's style guide may specify a canonical form.

Locale-specific casing

Standard JavaScript toUpperCase() and toLowerCase() use locale-sensitive rules in some environments. The most notable edge case is Turkish (and Azerbaijani), where the lowercase dotted-i "i" uppercases to "İ" (capital I with dot), not "I", and the dotless-i "ı" uppercases to "I". If you are converting identifiers that will be used in Turkish-locale systems, verify the output carefully. For ASCII-only identifiers (which covers most programming use cases), this is not a concern.