Case converter

Convert text between different cases (camelCase, snake_case, etc.)

Input Text

Enter the text you want to convert

camelCase

helloWorldThisIsASampleText

PascalCase

HelloWorldThisIsASampleText

snake_case

hello_world_this_is_a_sample_text

kebab-case

hello-world-this-is-a-sample-text

CONSTANT_CASE

HELLO_WORLD_THIS_IS_A_SAMPLE_TEXT

dot.case

hello.world.this.is.a.sample.text

path/case

hello/world/this/is/a/sample/text

Sentence case

Hello world! this is a sample text.

Title Case

Hello World This Is A Sample Text

lowercase

hello world! this is a sample text.

UPPERCASE

HELLO WORLD! THIS IS A SAMPLE TEXT.

TL;DR

What is Case converter?

Case conversion transforms text between naming conventions used in different programming contexts. Each convention has a specific pattern for separating words: camelCase joins words with capital letters, snake_case uses underscores, kebab-case uses hyphens, and PascalCase capitalizes every word.

Common use cases

  • Code refactoring: rename variables, functions, or database columns from one convention to another in bulk
  • API integration: convert JSON field names between snake_case (common in Python/Ruby) and camelCase (common in JavaScript)
  • Database migration: translate camelCase column names from ORM models to snake_case for SQL databases
  • CSS class names: convert a component name to kebab-case for use as a CSS class or HTML attribute

Frequently asked questions

What is the difference between camelCase and PascalCase?

camelCase (lower camel case) starts with a lowercase letter: myVariableName. PascalCase (upper camel case) starts with an uppercase letter: MyVariableName. PascalCase is conventional for class names and React components; camelCase is conventional for variable and function names in JavaScript.

When should I use snake_case versus kebab-case?

snake_case is conventional for variable and function names in Python, Ruby, and SQL. kebab-case is conventional for CSS class names, HTML attributes, URL slugs, and file names (where hyphens are more readable than underscores). JavaScript identifiers cannot use hyphens, so snake_case or camelCase is used there instead.