Case Converter
Text Tools
Convert text to 12 writing and programming case styles at once, or convert each line independently to copy identifiers in bulk.
HELLO WORLD
hello world
Hello World
Hello world
helloWorld
HelloWorld
hello_world
hello-world
HELLO_WORLD
hello.world
hElLo wOrLd
hELLO wORLD
How to use this tool
- Type or paste your text. Enter any text in the input box. It can be in any format - sentence, camelCase, snake_case, UPPER, or mixed.
- Choose whole-text or per-line mode. Whole text mode keeps all 12 live conversions. Per line mode applies one selected style to each non-empty line independently and keeps blank lines.
- Copy the result you need. In Whole text mode, click Copy beside any style. In Per line mode, choose one style and use Copy output to copy the multiline result.
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
constvalues exported from modules, Javastatic 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. - Capitalize Words: Capitalizes the first letter of every detected word, including short words such as “of” and “and.” It is not editorial Title Case and does not follow AP or Chicago minor-word rules; use the dedicated Title Case Converter for editorial title casing.
- 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).
Whole text mode keeps the live grid of all 12 styles. Per line mode applies one selected style to each non-empty line independently, which is useful when converting a pasted list of database column names or JSON keys. Empty lines remain empty, and the output keeps the input’s line endings so a copied list can be pasted back into a text editor or spreadsheet column.
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_parserbut some codebases preferXMLParser(keep the acronym together) orXmlParser(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.
Frequently asked questions
What is camelCase?
camelCase joins words together with no separator, capitalising every word except the first. It is the standard naming convention for variables and functions in JavaScript, TypeScript, Java, and many other languages. Example: "background color" → "backgroundColor".
What is the difference between camelCase and PascalCase?
Both join words without separators and capitalise each word - but PascalCase (also called UpperCamelCase) capitalises the first word too. PascalCase is used for class names and React components. Example: "background color" → camelCase "backgroundColor", PascalCase "BackgroundColor".
What is snake_case used for?
snake_case separates words with underscores and keeps everything lowercase. It is the standard naming convention in Python (for variables and functions), Ruby (for methods), and SQL (for table and column names). CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) is the uppercase variant used for constants.
What is kebab-case used for?
kebab-case (also called spinal-case or lisp-case) separates words with hyphens. It is used for CSS class names, HTML attributes, URL slugs, and command-line flags. Example: "my component name" → "my-component-name".
Does Capitalize Words follow AP or Chicago title-case rules?
No. Capitalize Words capitalizes the first letter of every detected word, including short words such as “of” and “and.” It is different from editorial title casing; use the dedicated Title Case Converter when you need its AP-style title rules.
Related tools
- Title CaseFor editorial/AP-style title casing, use Title Case Converter; Capitalize Words here capitalizes every token.
- Slug GeneratorUse Slug Generator to convert any text to a clean URL slug..
- Text IndenterUse Text Indenter to add or remove indentation from every line of.
- Whitespace CleanerUse Whitespace Cleaner to clean up whitespace in text: trim lines, collapse.