Text Case Converter — camelCase, snake_case & More
Convert any text between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE and Title Case — handles existing camelCase input correctly.
Last reviewed 2026-10-19. Rates change — verify against the official sources linked below before relying on these figures.
What this is based on
- Word splitting handles spaces, underscores, hyphens and camelCase/PascalCase boundaries.
- Output uses lowercase bases — existing acronyms (APIKey) are normalized to 'apikey'.
- Everything runs locally in your browser — pasted content is never uploaded, logged or stored.
Which case goes where
JavaScript/TypeScript: camelCase variables and functions, PascalCase classes and components. Python: snake_case for everything except classes (PascalCase). URLs and CSS: kebab-case. Environment variables and constants: SCREAMING_SNAKE. File names: kebab-case or snake_case depending on ecosystem.
Mixing them in a codebase is the rookie smell — consistency matters more than the choice itself.
The subtle bug in naive converters
Splitting only on spaces/underscores fails on 'userProfileSettings' — a naive converter produces 'userprofilesettings'. This tool inserts word boundaries at lowercase→uppercase transitions first, so camelCase input converts correctly to every other convention.
Frequently asked questions
- What's the difference between camelCase and PascalCase?
- camelCase starts lowercase (userName); PascalCase starts uppercase (UserName). JavaScript uses camelCase for variables, PascalCase for classes/components.
- When should I use snake_case vs kebab-case?
- snake_case in code (Python, Ruby, env-adjacent configs); kebab-case in URLs and CSS class names — hyphens can't appear in most programming language identifiers.
- Why did myOutput become my-output?
- The converter detects camelCase boundaries — myOutput splits into 'my output' first, then applies the target convention. That's the correct behavior.
- Does it handle acronyms like APIKey?
- They're normalized to lowercase ('apikey') — distinguishing intentional acronyms from word boundaries is genuinely ambiguous and no converter does it perfectly.
Related calculators
Count words, characters, sentences and paragraphs in any text — plus reading time and top-word frequency for SEO content checks.
Test a regular expression against your text with instant results: all matches, their positions, capture groups and flag support — runs locally, nothing sent anywhere.
Paste JSON to validate and pretty-print it — with error location (line and column) when it's broken, plus key count, depth and size stats. Runs entirely in your browser.