What Is a Case Converter?
A case converter is a small utility that rewrites text into a different naming style. Programmers use it constantly: switching a variable from camelCase to snake_case when porting code from JavaScript to Python, generating CONSTANT_CASE environment variable names from a feature description, or producing a kebab-case CSS class from a component name. Writers and editors reach for it too — to fix a heading that arrived in ALL CAPS, or to turn a raw phrase into Title Case. This tool covers every common style, from code conventions like camelCase and snake_case to writing styles like Title Case, UPPERCASE and lowercase, in one panel — paste your text, and you get every variant at once.
Common Case Styles
| Style | Example | Where it’s used |
|---|---|---|
| camelCase | helloWorldExample | Variables and functions in JavaScript, Java, Kotlin, Swift |
| PascalCase | HelloWorldExample | Classes, types, components (React, C#, TypeScript) |
| snake_case | hello_world_example | Variables and functions in Python, Ruby, Rust |
| CONSTANT_CASE | HELLO_WORLD_EXAMPLE | Constants and environment variables everywhere |
| kebab-case | hello-world-example | URLs, CSS classes, HTML attributes, CLI flags |
| COBOL-CASE | HELLO-WORLD-EXAMPLE | HTTP headers (in some style guides), legacy COBOL |
| Train-Case | Hello-World-Example | Some HTTP headers (Content-Type), book titles |
| Title Case | Hello World Example | Article titles, UI labels |
| Sentence case | Hello world example | Body copy, button labels (modern UI guidelines) |
| UPPERCASE | HELLO WORLD EXAMPLE | Headings, emphasis, spreadsheet labels, legal text |
| lowercase | hello world example | Tags, search normalization, de-shouting all-caps text |
| dot.case | hello.world.example | Java package names, config keys |
| path/case | hello/world/example | URL paths, file system paths |
How to Convert Cases
- Paste any text into the input area — a single identifier, a sentence, or many lines at once.
- Press
Ctrl+Enteror click the Convert button. The output panel shows every case variant. - Copy the line you need. The whole table copies with one click via the Copy button or
Ctrl+Shift+C. - Type to convert in real time — the tool re-converts on every keystroke (debounced) so you can iterate quickly.
The conversion is fully bidirectional. You can paste helloWorldExample, hello_world_example, hello-world-example or Hello World Example — the tool detects the original style by scanning for word boundaries and re-emits the value in every other style.
How Word Boundaries Are Detected
A robust case converter has to recognize where words begin and end no matter how the input is formatted. This tool uses three rules:
- Separator characters — underscores (
_), hyphens (-), spaces, dots (.), and slashes (/) split the input into words. - Case transitions — a lowercase letter followed by an uppercase letter starts a new word (
helloWorld→hello,World). - Acronym handling — a sequence of uppercase letters followed by a lowercase letter splits before the last uppercase (
XMLHttpRequest→XML,Http,Request). This matters when you convert acronym-heavy code.
Numbers stay attached to the surrounding word (getHTML5Player → getHtml5Player or get_html5_player), which is what most style guides prescribe.
camelCase vs snake_case
This is the most-Googled case-conversion question. The answer is mostly cultural, not technical:
- JavaScript, TypeScript, Java, Kotlin, Swift, C# — community style guides and language conventions favor camelCase for variables and methods. The standard library is camelCase. Frameworks like React lean on PascalCase for components and camelCase for props.
- Python and Ruby — PEP 8 (Python) and the Ruby community guide both prescribe snake_case for variables, functions and module names. PascalCase is reserved for classes; CONSTANT_CASE for constants.
- Rust and Go — Rust uses snake_case for items and PascalCase for types. Go uses MixedCaps (essentially PascalCase for exported, camelCase for unexported) and lints any deviation.
- C and C++ — historically snake_case in the standard library and many older codebases; many modern style guides allow either.
- SQL — most teams use snake_case for table and column names because identifiers are case-insensitive in many engines and quoting mixed-case is awkward.
When in doubt: read the existing code in the repo and match its style. Consistency inside one project beats any abstract preference for one style over another.
Convert snake_case to camelCase (and Back)
The two most-requested conversions are snake_case → camelCase and camelCase → snake_case, usually when moving data across a boundary — a Python or SQL backend that speaks snake_case talking to a JavaScript or TypeScript frontend that speaks camelCase. Both directions work the same way here:
- Paste the identifier —
user_first_nameoruserFirstName— into the input. - Read the matching line from the output: the
camelCaserow givesuserFirstName, thesnake_caserow givesuser_first_name. - Copy that single line, or click Copy All to grab the whole set.
Because the converter normalizes the input to a list of words before re-emitting it, the starting style never matters: user_first_name, userFirstName, UserFirstName and user-first-name all produce the exact same set of outputs. That means you can round-trip an identifier through any style and back without losing information — handy when you’re not sure which convention a snippet came from.
Text Case for Writing: Title Case, UPPERCASE and lowercase
Case conversion isn’t only for code. Writers, editors and marketers reshape prose case constantly, and this tool handles those styles too:
- Title Case — capitalizes the first letter of each word (
Hello World Example). Used for headlines, article titles, button labels and UI headings. Strict style guides such as AP and Chicago lowercase short articles and prepositions like a, the, of and to; this tool applies the simpler “capitalize every word” rule, which is what most CMS and UI contexts actually expect. - Sentence case — capitalizes only the first word (
Hello world example). Modern UI guidelines (Google Material, Apple’s Human Interface Guidelines) increasingly prefer sentence case for buttons and headings because it reads as less shouty and more conversational. - UPPERCASE — every letter capitalized (
HELLO WORLD EXAMPLE). Useful for headings, emphasis, spreadsheet column labels and systems that store values in caps. - lowercase — every letter lowercased (
hello world example). Useful for tags, URL slugs, search normalization and de-shouting text that arrived in all caps.
Paste a heading that came in the wrong case and you get every writing style at once — no retyping required. Like everything else here, it runs entirely in your browser, so you can safely convert unpublished copy or internal document titles.
Common Mistakes When Converting Case
- Losing acronym capitalization — naive conversion turns
parseHTMLintoparsehtmlinstead ofparse_html. Use a converter that recognizes acronym runs. - Concatenating numbers into separate words —
mp3Playershould becomemp3_player, notmp_3_player. Most style guides keep digits glued to the preceding word. - Mangling Unicode letters — accented characters like
éandñshould keep their case-folding behavior. This tool uses JavaScript’stoLowerCase()andtoUpperCase(), which respect Unicode rules. - Trimming meaningful separators — converting a file path like
src/components/Button.tsxshould preserve the path structure, not flatten it. If you’re working with paths, use the dedicatedpath/caseoutput.
When to Use This Tool
- Porting code between languages — translate a Python API to TypeScript, or the other way around, and rename every identifier.
- Generating environment variable names — turn a feature description like “stripe webhook secret” into
STRIPE_WEBHOOK_SECRET. - Building CSS class names from component names —
UserProfileCard→user-profile-card. - Cleaning up a CSV header row —
First Name,Last Name,Email Address→first_name,last_name,email_addressfor SQL ingestion. - Renaming a batch of identifiers — paste an entire list, get the converted output, paste it back.
Everything runs locally in your browser. No data leaves your machine, which means you can safely paste internal identifiers, API endpoints or proprietary feature names without worrying about a third-party server logging them.