This tool runs in your browser using JavaScript. If it does not appear, please enable JavaScript or reload the page. The description below explains how it works.
Text Case Converter
Text case conversion is the quiet workhorse of everyday programming. Sometimes a column of SQL aliases has to match a Java constant, a database field name has to become a JSON key, or a product title has to look right on a pack shot. This tool converts any text between nine case styles in a single click, live in your browser, with nothing sent to any server.
How to use
- Paste or type your text in the Text field. One sentence, a whole paragraph, or a comma-separated list all work.
- Pick a case from the nine buttons — lowercase, UPPERCASE, Title Case, Sentence case, camelCase, PascalCase, snake_case, CONSTANT_CASE, and kebab-case. The result updates instantly as you type.
- Copy the result to the clipboard, or download it as a
.txtfile with the second button.
The tool treats every line of your input as part of one body of text. It recognizes word boundaries at spaces, dashes, underscores, dots, and — importantly — at camelCase humps. This means a value like myHTTPResponse splits into my, HTTP, and Response, so it converts to the same words in every style instead of producing surprises like my_httpresponse.
The nine conversions
| Style | Example |
|---|---|
| lowercase | hello world |
| UPPERCASE | HELLO WORLD |
| Title Case | Hello World |
| Sentence case | Hello world |
| camelCase | helloWorld |
| PascalCase | HelloWorld |
| snake_case | hello_world |
| CONSTANT_CASE | HELLO_WORLD |
| kebab-case | hello-world |
camelCase is the format used for variables in JavaScript, TypeScript and Java; snake_case for Python, Ruby and database columns; CONSTANT_CASE for compile-time constants and environment variables; kebab-case for CSS class names, URL slugs, and file names.
Real-world uses
- Refactoring value names: mirror-mapping DTO fields from
snake_caseAPI responses intocamelCasefront-end objects without writing a mapper by hand. - Consistent logs and keys: reformat short keys into
CONSTANT_CASEso splunk queries and dashboards agree. - Titles and captions: normalize a scrapped title to Title Case for a UI label or a card headline.
- File naming: turn a sentence into a safe
kebab-caseslug with characters that are legal on every operating system.
Tips
- Sentence case lowercases everything after the first letter, so an acronym in the middle of a title will be flattened. If you need to keep "API" or "NASA" intact, run the rest of the conversion and fix the odd word manually, or use Title Case and edit after copying.
- The converters split words before joining, so repeated separators (
a__b,a--b,a...b) collapse cleanly. Empty inputs stay empty, and inputs with no alpha-numeric characters fall back gracefully. - camelCase and PascalCase differ only in the first letter:
camelCasestarts lowercase,PascalCase(used for class names) starts uppercase. Use CONSTANT_CASE when you want an all-caps variant ofsnake_case.
Why it runs in the browser
The whole conversion is a deterministic string manipulation that can be summarized in a few pure functions: split on word boundaries, normalize punctuation, and rejoin with the separator each style demands. There is no lookup data and no network request, which is why hosting it as a static web component keeps it instant, offline-friendly, and private — your clipboard never leaves the page.