Text Case Converter

Text Case Converter

Convert text between different case formats: uppercase, lowercase, camelCase, PascalCase, kebab-case, snake_case, and more.

Benefits of Using Text Case Converter

Multiple Formats

Convert text between 8 different case formats: uppercase, lowercase, camelCase, PascalCase, kebab-case, snake_case, title case, and sentence case.

Instant Conversion

Get instant results with real-time conversion. No waiting, no delays.

Code-Friendly

Perfect for developers working with different programming languages and naming conventions.

Privacy First

All conversions happen locally in your browser. Your text never leaves your device.

Key Features

8 different case formats
Uppercase and lowercase conversion
camelCase and PascalCase support
kebab-case and snake_case support
Title case and sentence case
Instant conversion
Copy to clipboard functionality
Works entirely offline
Free to use with no limitations

How to Use

1

Enter Your Text

Type or paste the text you want to convert into the input field.

2

Select Case Format

Click on one of the case format buttons (UPPERCASE, lowercase, camelCase, etc.) or use the Convert button.

3

Get Converted Text

Your converted text will appear in the output field. You can copy it to clipboard with one click.

Understanding Text Case Formats and Conversion

Text case conversion is a fundamental task in programming and content creation. Different case formats serve different purposes: camelCase for JavaScript variables, PascalCase for class names, kebab-case for CSS classes, snake_case for Python variables, and more.

Our free text case converter tool helps developers and content creators quickly transform text between different case formats. Whether you're coding, writing documentation, or formatting content, proper case formatting improves readability and follows coding conventions.

Why Text Case Conversion Matters

  • Code Consistency: Following consistent naming conventions makes code more readable and maintainable.
  • Language Standards: Different programming languages have different naming conventions (e.g., JavaScript uses camelCase, Python uses snake_case).
  • Readability: Proper case formatting improves text readability and makes content easier to scan.
  • Automation: Converting large amounts of text manually is time-consuming. Automated conversion saves time and reduces errors.

Common Case Formats

  • UPPERCASE: All letters in capital letters (e.g., "HELLO WORLD")
  • lowercase: All letters in small letters (e.g., "hello world")
  • camelCase: First word lowercase, subsequent words capitalized (e.g., "helloWorld")
  • PascalCase: First letter of each word capitalized (e.g., "HelloWorld")
  • kebab-case: Words separated by hyphens, all lowercase (e.g., "hello-world")
  • snake_case: Words separated by underscores, all lowercase (e.g., "hello_world")
  • Title Case: First letter of each word capitalized (e.g., "Hello World")
  • Sentence case: First letter of first word capitalized, rest lowercase (e.g., "Hello world")

Our tool processes all text conversions locally in your browser, ensuring complete privacy and security. No data is sent to any server, making it safe for sensitive information.

Code Examples

JavaScript - Convert to camelCase

// Convert string to camelCase
function toCamelCase(str) {
  return str
    .replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => {
      return index === 0 ? word.toLowerCase() : word.toUpperCase();
    })
    .replace(/\s+/g, '')
    .replace(/[^a-zA-Z0-9]/g, '');
}

// Usage
const result = toCamelCase('hello world example');
console.log(result); // "helloWorldExample"

Python - Convert to snake_case

# Convert string to snake_case
import re

def to_snake_case(text):
    # Insert an underscore before any uppercase letter
    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', text)
    # Insert an underscore before any uppercase letter that follows a lowercase letter or digit
    s2 = re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1)
    return s2.lower()

# Usage
result = to_snake_case('HelloWorldExample')
print(result)  # "hello_world_example"

CSS - Convert to kebab-case

/* Convert string to kebab-case */
function toKebabCase(str) {
  return str
    .replace(/([a-z])([A-Z])/g, '$1-$2')
    .replace(/[\s_]+/g, '-')
    .toLowerCase();
}

// Usage
const className = toKebabCase('MyComponentName');
console.log(className); // "my-component-name"