Case Converter
Convert text between uppercase, lowercase, title case, sentence case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE.
Case conventions are usually a hard rule on a team: camelCase for JavaScript variables, PascalCase for class names, CONSTANT_CASE for constants, snake_case for Python and database columns, kebab-case for URLs and CSS classes. Changing a dozen words by hand is exactly where a stray capital survives review, and converting the whole run to the chosen style at once is the safer move.
Two styles are easy to confuse: Title Case, which by English typographic convention keeps prepositions and articles lowercase except at the front, and Sentence case, which capitalises only the opening letter and suits running text. Scripts without case are unaffected, so in mixed text the Latin parts convert as usual and the rest passes through.
Did this tool solve your problem?
Submitting sends the tool name, your input and the current result to the server. Please do not include ID numbers, phone numbers or other private data.
AI assistant It answers using your current input and result
Asking again sends your current input and result to the server once more. Please do not include private data.
How to use
- Paste the text to convert.
- Choose one of the eleven styles — uppercase, lowercase, Capitalised, Sentence case, Title Case, swap case, or the five naming styles.
- Read the converted result.
- Copy it out; the input text itself is never modified.
How it works
Basic usage
Paste text and pick a conversion for a live preview; pressing "convert" feeds the result back into the input box for chained conversions.
Title-case rules
Title case follows English typesetting conventions: prepositions, articles and other short function words stay lowercase (except the first word) — as in The Lord of the Rings.
Naming-style conversion
Naming conversion splits words on spaces, underscores and hyphens: hello world becomes helloWorld in camelCase and hello_world in snake_case.
Code example
JavaScript Converting between naming styles
// camelCase ↔ snake_case
const toSnake = (s) => s.replace(/[A-Z]/g, (c) => '_' + c.toLowerCase());
const toCamel = (s) => s.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
toSnake('userName'); // 'user_name'
toCamel('user_name'); // 'userName'
// Title case (simple version — extend the stop-word list as needed)
const small = ['of', 'the', 'and', 'in', 'on', 'for'];
const toTitle = (s) => s.split(' ').map((w, i) =>
i > 0 && small.includes(w.toLowerCase()) ? w.toLowerCase()
: w[0].toUpperCase() + w.slice(1)).join(' ');
toTitle('the lord of the rings'); // 'The Lord of the Rings'
Shell Batch-renaming files and variables
# Dry-run first to see how the file names would change
for f in *.txt; do echo "$f → $(echo "$f" | tr "A-Z _" "a-z -")"; done
# Once it looks right, rename in place
for f in *.txt; do mv "$f" "$(echo "$f" | tr "A-Z _" "a-z -")"; done
# Batch-rename variables (sed edits in place — back up first)
sed -i "" "s/userName/user_name/g" src/*.js
FAQ
camelCase vs. PascalCase — what's the difference?
camelCase lowercases the first word and capitalizes the rest (helloWorld); PascalCase capitalizes every word (HelloWorld). The former is customary for variables and functions, the latter for classes and components.
What does "swap case" do?
It turns uppercase letters lowercase and lowercase letters uppercase — handy for recovering text typed with Caps Lock accidentally on.
Does Chinese text get affected?
No. Chinese has no case, so those characters pass through untouched; conversions act only on English letters, and mixed-language content converts safely.
Where are snake_case and kebab-case used?
snake_case (lowercase joined by underscores) is the norm for Python and Ruby variables and database columns; kebab-case (hyphen-joined) is the convention for HTML attributes, CSS classes and URL paths. Choose by language conventions and your team's style guide.
When is CONSTANT_CASE used?
For values that never change at runtime: all caps joined by underscores, like MAX_RETRY_COUNT. It's a cross-language convention — seeing it signals "do not modify". Correspondingly, classes use PascalCase and variables/functions camelCase.
What are the rules of title case?
Capitalize content words; keep short function words (a, an, the, and, or, of, in, to…) lowercase — except when they open or close the title. APA, Chicago and other style guides differ in the details, so follow the venue's requirements for books and papers.
How is punctuation handled?
Naming conversions (camelCase, snake_case, etc.) treat spaces, hyphens and underscores as word boundaries and keep only alphanumerics; plain case conversions keep all punctuation and alter only letters. Mind the distinction when processing code identifiers.