NC Logo UseToolSuite

String Case Converter

Convert text between camelCase, PascalCase, snake_case, kebab-case, UPPERCASE, lowercase, and Title Case in one click. Free online string case converter.

What is Case Converter?

Case Converter is a free online tool that transforms text between seven popular casing formats: camelCase, PascalCase, snake_case, kebab-case, UPPERCASE, lowercase, and Title Case. Simply paste or type your text and click the target format — the converted result appears instantly. This tool intelligently detects word boundaries in compound strings regardless of the original format, so it can correctly convert "helloWorld" to "hello_world" or "Hello World" just as easily. All processing happens in your browser with zero server calls.

When to use it?

Use the Case Converter whenever you need to adapt variable names, function names, or identifiers between different naming conventions. It's particularly useful when translating code between languages that follow different casing standards — for example, converting JavaScript's camelCase to Python's snake_case. It also comes in handy when generating CSS class names, database column names, URL slugs, or constants that require a specific casing style.

Common use cases

Developers commonly use Case Converter to rename variables when porting code between programming languages with different naming conventions, generate consistent CSS class names in kebab-case from design specs written in Title Case, create database column names in snake_case from application-layer camelCase properties, format constants in SCREAMING_SNAKE_CASE, build URL-friendly slugs in kebab-case from page titles, and batch-convert identifier lists when refactoring codebases to adhere to new style guides or linting rules.

Key Concepts

Essential terms and definitions related to String Case Converter.

camelCase

A naming convention where words are joined without separators and each word after the first starts with a capital letter (e.g., myVariableName). Used for variables and function names in JavaScript, Java, TypeScript, and Swift. The first letter is always lowercase, distinguishing it from PascalCase.

snake_case

A naming convention where words are separated by underscores and all letters are lowercase (e.g., my_variable_name). It is the standard convention in Python, Ruby, Rust, and database column naming. SCREAMING_SNAKE_CASE (all uppercase) is used for constants.

kebab-case

A naming convention where words are separated by hyphens and all letters are lowercase (e.g., my-class-name). It is the standard for CSS class names, HTML attributes, URL slugs, and npm package names. Also called "spinal-case" or "lisp-case."

PascalCase

A naming convention where every word starts with a capital letter and words are joined without separators (e.g., MyClassName). Used for class names in most programming languages, React component names, and C# method names. Also known as "UpperCamelCase."

Frequently Asked Questions

Does the converter handle multi-word input with mixed separators?

Yes. The converter intelligently detects word boundaries from spaces, hyphens, underscores, and camelCase transitions. So input like "my-variable_name" is correctly split into words before converting to your target case format.

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter (e.g., myVariableName), while PascalCase starts with an uppercase letter (e.g., MyVariableName). camelCase is commonly used for variables and functions, while PascalCase is used for class names in most programming languages.

Can I convert entire paragraphs or just single identifiers?

The tool works best with single identifiers, variable names, or short phrases. While you can input longer text, case conversions like snake_case and camelCase are designed for programming identifiers, not prose.

Does kebab-case conversion preserve numbers?

Yes. Numbers within your input are preserved during conversion. For example, "myVar2Name" converts to "my-var-2-name" in kebab-case, keeping the numeric characters in place.

Troubleshooting & Technical Tips

Common errors developers encounter and how to resolve them.

Locale-sensitive case conversion: toUpperCase() produces wrong results for non-ASCII

JavaScript's default toUpperCase() and toLowerCase() methods are locale-agnostic and may produce incorrect results for locale-specific characters (e.g., Turkish İ/ı, German ß). For locale-aware conversion, use toLocaleUpperCase("locale") and toLocaleLowerCase("locale"). This tool is optimized for programming identifiers and applies ASCII conversion; keep locale differences in mind for natural language text.

Unicode Normalization difference: NFC vs NFD forms

Some Unicode characters can be represented in multiple ways: the ç character can be a single code point (U+00E7, NFC) or c + combining cedilla (U+0063 + U+0327, NFD). Text in different normalization forms may produce different results after case conversion. Normalize your input with String.prototype.normalize("NFC") before conversion to ensure consistent results.

camelCase word boundary detection error: Consecutive uppercase letters ("XMLParser")

Identifiers containing consecutive uppercase letters (XMLParser, HTTPSConnection, APIKey) create ambiguous word boundaries: should "XMLParser" become "xml-parser" or "x-m-l-parser"? Different tools apply different strategies. This tool groups uppercase letter sequences as a single word, converting to "xml-parser". If the result differs from your expectation, check the output and make minor adjustments as needed.

Related Tools