Utility

Text Case Converter

Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case and sentence case. Runs entirely in your browser.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

Which case where

Naming conventions are not arbitrary; each ecosystem settled on one and consistency within a codebase matters more than the specific choice. JavaScript and Java use camelCase for variables and functions and PascalCase for classes and components. Python and Ruby use snake_case for variables and functions. CSS classes, HTML attributes and URL slugs use kebab-case, because those contexts treat the underscore poorly or not at all. Environment variables and constants use CONSTANT_CASE.

Acronyms are where converters disagree

There is no universally correct answer for how HTTPServer or parseXMLDocument should convert. Treating an acronym as one word gives http_server and parse_xml_document, which is what most style guides prefer. Treating each letter separately gives h_t_t_p_server, which nobody wants. Going the other way, xml_http_request can become XmlHttpRequest or XMLHTTPRequest depending on the convention. Google's style guides recommend treating acronyms as ordinary words, giving XmlHttpRequest, precisely because it round-trips predictably.

Title case is not capitalising every word

Proper title case leaves articles, short prepositions and coordinating conjunctions lowercase unless they begin or end the title. "The Rise of the Machines" is title case; "The Rise Of The Machines" is not. Different style guides draw the line at different word lengths, with four letters being a common threshold. Sentence case, which capitalises only the first word and proper nouns, is increasingly preferred for headings because it is easier to read and impossible to get subtly wrong.

Unicode makes case tricky

Case conversion is not a simple byte operation. The German sharp s uppercases to two characters. Turkish has a dotless i, so lowercasing an uppercase I in a Turkish locale produces a different character than in English, which is a genuine source of bugs in software that uppercases strings for comparison. When comparing strings case-insensitively, use a locale-invariant fold rather than uppercasing.

Frequently Asked Questions

Privacy & Security

No data sent to server.

Data: None
Client-side-Side
Active
v1.0

How to Use

Type text and click any style button (UPPER, lower, camelCase, etc.).

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.