🛠️ToolsShed

Case Converter

Convert text to UPPERCASE, lowercase, Title Case, camelCase, and more.

UPPERCASE

Result will appear here...

lowercase

Result will appear here...

Title Case

Result will appear here...

Sentence case

Result will appear here...

camelCase

Result will appear here...

snake_case

Result will appear here...

kebab-case

Result will appear here...

aLtErNaTiNg

Result will appear here...

Case Converter transforms text between different letter case formats instantly. Whether you need UPPERCASE for headings, lowercase for email addresses, Title Case for book titles, or camelCase for programming variable names, this tool handles all common case transformations without requiring you to retype or manually edit your text.

Paste your text and select the desired output format. Supported conversions include: UPPER CASE (all capitals), lower case (all small letters), Title Case (First Letter Of Each Word Capitalized), Sentence case (only the first letter of each sentence is capitalized), camelCase (for JavaScript variables), PascalCase (for class names), snake_case (for Python variables and database columns), and kebab-case (for CSS classes and URLs).

Case conversion is especially useful in programming workflows, where naming conventions differ by language: JavaScript uses camelCase for variables, Python uses snake_case, CSS uses kebab-case, and most object-oriented languages use PascalCase for class names. Rather than manually editing each word, paste the text and convert it to the required format in one step.

Frequently Asked Questions

Code Implementation

import re

def to_words(text: str) -> list[str]:
    """Split text into words, handling camelCase, snake_case, kebab-case, and spaces."""
    text = re.sub(r"([a-z])([A-Z])", r"\1 \2", text)  # camelCase split
    text = re.sub(r"[_\-]+", " ", text)                  # snake/kebab to space
    return [w for w in text.strip().split() if w]

def to_camel_case(text: str) -> str:
    words = to_words(text)
    return words[0].lower() + "".join(w.capitalize() for w in words[1:])

def to_pascal_case(text: str) -> str:
    return "".join(w.capitalize() for w in to_words(text))

def to_snake_case(text: str) -> str:
    return "_".join(w.lower() for w in to_words(text))

def to_kebab_case(text: str) -> str:
    return "-".join(w.lower() for w in to_words(text))

def to_screaming_snake(text: str) -> str:
    return "_".join(w.upper() for w in to_words(text))

# Example usage
text = "hello world example"
print(to_camel_case(text))      # helloWorldExample
print(to_pascal_case(text))     # HelloWorldExample
print(to_snake_case(text))      # hello_world_example
print(to_kebab_case(text))      # hello-world-example
print(to_screaming_snake(text)) # HELLO_WORLD_EXAMPLE

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.