TTKTheTextKit

Case Converter

Paste your text, choose a format and copy the result. Nine formats are supported: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. The programming formats split words correctly, so helloWorld becomes hello_world and XMLHttpRequest becomes xml_http_request, and letters such as é, ü and я are kept. Each line is converted on its own, which suits a list of column or variable names.

Select Casing Format

Related Tools

[4 suggestions]

Guides for the Case Converter

About the Case Converter

The Case Converter changes the capitals of your text or rewrites it as an identifier. UPPERCASE and lowercase follow the Unicode rules of your browser, so ß becomes SS and a Greek capital sigma at the end of a word becomes ς. Title Case capitalizes the first letter of every word and lowercases the rest, skipping a quote or bracket in front. Sentence case lowercases everything, then capitalizes the start of the text, each line and the word after . ! or ?, except after e.g. and i.e. It does not recognize proper nouns or the word I. The five programming formats first split the text into words: at spaces and symbols, between a lowercase letter or digit and a capital (helloWorld), and between an acronym and the next word (XMLHttp). They keep letters from any alphabet, drop apostrophes inside words (don't becomes dont) and keep digits attached to their word (es6 stays es6). On random identifiers, the results matched the lodash library in every one of 100,000 conversions. An option removes accents first, turning é into e and ß into ss, when you need plain ASCII. Everything runs in your browser.

What is the difference between Title Case and Sentence case?▾

Title Case capitalizes the first letter of every word, and this tool lowercases the rest, so iPhone becomes Iphone. Sentence case lowercases the text and capitalizes only the first letter of each sentence and line. For headings that follow a style guide, which keeps small words such as and and of in lowercase, use the Title Case Converter.

When should I use camelCase, snake_case, kebab-case or CONSTANT_CASE?▾

Follow the convention of your language. camelCase is usual for variables in JavaScript and Java, PascalCase for class names, snake_case for Python and SQL names, kebab-case for CSS classes and URLs, and CONSTANT_CASE for constants. Pick the one your project already uses.

What happens to text that is already camelCase?▾

It is split into its words first. helloWorld becomes hello_world, getHTTPResponse becomes get_http_response and XMLHttpRequest becomes xml_http_request. Many simple converters skip this step and give helloworld.

Does it keep accented and non-English letters?▾

Yes. café becomes café_au_lait in snake_case, and Москва stays a word of its own. If you need plain ASCII for a file name or an identifier, tick Remove accents, and é becomes e and ß becomes ss.

Is each line converted separately?▾

Yes. In the programming formats a line break ends the identifier, so a list of names such as First Name and Last Name becomes first_name and last_name on two lines. In Sentence case a line break starts a new sentence.