Text & Utilities

Case Converter

Convert text to UPPER, lower, Title or Sentence case, or to camelCase, snake_case, kebab-case and other programming styles.

Writing

Programming

Input
ResultTitle Case

Programming cases convert each line separately, so you can paste a whole list of names.

About this tool

A case converter rewrites the capitalisation of text without retyping it. Writers use it to fix a headline typed in all caps, to put a title into proper Title Case, or to turn a shouty paragraph back into normal sentences. Developers use it to rename things between naming conventions: a database column user_id becomes userId in JavaScript, UserId in C# and USER_ID as a constant.

This tool offers seven writing styles and eight programming styles. Title Case follows the usual English style rules (short words such as "of" and "the" stay lowercase, acronyms such as NASA and brand names such as iPhone are kept). Programming styles split words intelligently, so XMLHttpRequest, xml_http_request and "XML http request" all convert the same way. Each line is converted on its own, so you can paste a whole list of names at once.

How to use Case Converter

  1. Type or paste your text into the Input box, or open a text file.
  2. Pick a style. Writing styles are in the first row, programming styles (camelCase, snake_case…) in the second. Each button shows a short preview.
  3. The Result box updates immediately. Copy it, download it as a .txt file, or click "Use as input" to chain another conversion.
  4. Your last chosen style is remembered in this browser, so the tool opens ready for your usual task.

Examples

Title Case

Input
the lord of the rings: the return of the king
Result
The Lord of the Rings: The Return of the King

"of" and "the" stay lowercase, except at the start and after the colon.

Identifier to camelCase

Input
user_account_id
Result
userAccountId

Acronyms in PascalCase input

Input
XMLHttpRequest
Result
snake_case: xml_http_request · kebab-case: xml-http-request

Which naming convention to use where

  • camelCase: variables and functions in JavaScript, TypeScript, Java and Swift; JSON keys in many APIs.
  • PascalCase: classes, types and React components in most languages; public members in C#.
  • snake_case: variables and functions in Python, Ruby and Rust; database tables and columns.
  • CONSTANT_CASE: constants and environment variables such as API_BASE_URL.
  • kebab-case: URLs and slugs, CSS class names, file names and command-line flags. Search engines treat hyphens as word separators, so kebab-case is the recommended style for URL slugs.

Title Case vs. Sentence case

Title Case capitalises the main words of a heading and keeps articles, short prepositions and conjunctions lowercase. It is the norm for English book titles and many news headlines (AP and Chicago styles differ only in details, such as whether to capitalise longer prepositions).

Sentence case capitalises only the first word and proper nouns. Many style guides, including Google's and Microsoft's, now prefer it for headings and buttons because it is easier to read. Sentence case cannot know which words are names, so check proper nouns such as "Paris" after converting.

Frequently asked questions

Everything you need to know about this tool and data security.

Does the converter work with languages other than English?

Upper, lower, inverse and capitalised case work for every script that has letter case, including accented Latin, Greek and Cyrillic. The small-word rules of Title Case are English-only. Chinese, Japanese and Korean have no letter case and are left unchanged.

What is the difference between Title Case and Capitalized Case?

Capitalized Case capitalises the first letter of every word, including "of" and "the". Title Case follows editorial rules and keeps those short words lowercase.

Why does "iPhone" become "i_phone" in snake_case?

Programming styles split words at every lowercase-to-uppercase change, which is exactly what is needed for identifiers like getUserName. Brand names with inner capitals are split the same way; edit them by hand if needed.

Are numbers kept?

Yes. Digits become their own word in programming styles, so "version2Beta" becomes "version_2_beta" in snake_case and "version-2-beta" in kebab-case.

Is my text sent anywhere?

No. The conversion is done by JavaScript in your browser, and only your last chosen style is stored locally.

Is my data safe when using this tool?

Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.