{jsonbody.com}

Case Converter

Convert text to uppercase, lowercase, title case or sentence case, plus camelCase, snake_case and kebab-case for code. Free, instant and works in your browser.

Change the case of any text

Retyping text because someone left caps lock on is a waste of time. Paste it here and pick a case from the tabs. This tool covers writing styles such as Title Case and Sentence case, along with the naming styles programmers use, such as camelCase and snake_case. Multi-line lists are converted one line at a time, which makes it easy to rename a whole set of variables or column names at once.

Available cases

  • UPPERCASE and lowercase change every letter.
  • Title Case capitalises main words, leaving small words such as of and the lowercase unless they come first or last.
  • Sentence case capitalises the first letter of each sentence.
  • camelCase is common for JavaScript and Java variables, and PascalCase for class and component names.
  • snake_case is common in Python and database columns, and CONSTANT_CASE for constants and environment variables.
  • kebab-case is used for URLs and CSS classes.
  • iNVERT cASE swaps upper and lower, which rescues text typed with caps lock on.

Example: one name in each style

The code styles first split your text into words, recognising spaces, underscores, hyphens and existing capitals. This means you can convert straight between them without going through plain text first.

Input: user first name
camelCase       userFirstName
PascalCase      UserFirstName
snake_case      user_first_name
CONSTANT_CASE   USER_FIRST_NAME
kebab-case      user-first-name
Title Case      User First Name

Which style to use in code

Follow the convention of your language or project, because consistency matters more than the choice itself. JavaScript usually uses camelCase for variables and PascalCase for React components. Python's PEP 8 prefers snake_case for functions. SQL column names are often snake_case, and URL slugs do best as kebab-case, since search engines treat a hyphen as a word separator.

When a JSON API returns snake_case but your front end uses camelCase, convert field names at one boundary in your code rather than mixing the styles throughout.

Limits of automatic title case

Style guides such as AP and Chicago disagree on title case details. This tool follows a common pattern, but it cannot recognise proper nouns or acronyms, so NASA becomes Nasa and iPhone becomes Iphone. Proofread important headlines after converting.

Frequently Asked Questions

How can I fix text typed with caps lock on?

Use Sentence case for normal writing, or iNVERT cASE if the capitals were simply reversed.

Does it work with Hindi or other scripts?

Scripts without upper and lower case, such as Devanagari, stay as they are. Letters with accents, like é, are converted correctly.

Are symbols kept in camelCase and snake_case?

No. These styles treat symbols as word breaks and remove them, since they are not usually allowed in identifiers.

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter, as in userName. PascalCase starts with a capital, as in UserName.