← Tools
Text Processing

String Case Converter

Convert identifiers between camelCase, snake_case, kebab-case, and 5 other formats instantly.

Input0 chars
camelCase

Case Conventions

  • camelCase — JS/TS variables and functions
  • PascalCase — classes and React components
  • snake_case — Python, Ruby, database columns
  • kebab-case — CSS classes, HTML attributes, URL slugs. Encode slugs for URLs with the URL Encoder.
  • CONSTANT_CASE — constants and env variables
  • Advanced text manipulation: Advanced String Manipulation Techniques

Common Use Cases

  • Code migration — converting between language conventions
  • API integration — matching external naming styles. Format API JSON with the JSON Formatter.
  • Database mapping — DB columns (snake_case) to code identifiers (camelCase)
  • Style guide — enforcing consistent naming across a codebase
  • Comparing naming — spot differences with the String Diff tool
  • Timestamp fields — name them consistently: Timestamp Converter

Tips

  • Input can be any mixed format — the converter splits on spaces, hyphens, underscores, and case boundaries
  • Numbers are treated as word characters
  • Be consistent within a codebase — inconsistency hurts readability
  • Acronyms like API become api in snake_case
  • Hash identifiers for use as keys: Hash Generator

How to Use the String Case Converter

1

Paste your text

Type or paste any text into the Input panel. The converter handles camelCase, snake_case, kebab-case, spaces, and mixed formats.

2

Select a target case

Click any of the 8 case formats in the sidebar. The conversion is applied instantly — no button to press.

3

Review the output

The converted identifier appears in the right panel in real time. Switch between case formats freely to compare results.

4

Copy and use

Click Copy in the output panel header to copy the converted string to your clipboard, ready to paste into your code.

Frequently Asked Questions

Does it handle mixed input?

Yes — input can be camelCase, snake_case, kebab-case, or plain words with spaces. The converter extracts words and reformats them in your chosen style.

What about acronyms?

Acronyms like XMLParser are treated as words. Conversion may split them: xml_parser in snake_case. Handle acronyms manually if your style guide requires XMLParserxmlParser.

Which case for CSS?

BEM methodology uses kebab-case for blocks and elements: nav-bar__item--active. Tailwind uses kebab-case utility classes.

Which case for Python?

PEP 8 recommends snake_case for functions and variables, PascalCase for classes, and CONSTANT_CASE for module-level constants.