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.

Last reviewed by the Radiatus Cloud team

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.

Related tools

  • User Agent Parser — Parse a User-Agent string into browser, engine, operating system and device. Explains why UA strings are unreliable and what to use instead.
  • QR Code Generator — Generate QR codes for URLs, text, Wi-Fi and contact details. Adjustable error correction and size, produced entirely in your browser.
  • Credit Card Validator — Validate a card number with the Luhn algorithm and identify the issuing network from its prefix. Runs locally, nothing is transmitted.
  • Word & Character Counter — Count words, characters with and without spaces, sentences and paragraphs, with estimated reading time. Runs entirely in your browser.

Frequently Asked Questions

What is the difference between camelCase and PascalCase?

Both join words without separators; camelCase starts with a lowercase letter and PascalCase with an uppercase one. Convention in most languages is camelCase for variables and functions, PascalCase for classes, types and components.

How should acronyms be converted?

Most style guides treat an acronym as a single ordinary word, so HTTPServer becomes http_server and converts back to HttpServer. This round-trips predictably, unlike preserving full capitalisation, which loses the word boundary.

Which case should I use for URLs?

kebab-case. Hyphens are treated as word separators by search engines while underscores historically were not, and lowercase avoids the case-sensitivity differences between servers. This applies to CSS class names too.

What is the difference between title case and sentence case?

Title case capitalises major words but leaves short articles, prepositions and conjunctions lowercase unless first or last. Sentence case capitalises only the first word and proper nouns, and is increasingly preferred for headings.

Why does uppercasing break for some languages?

Case mapping is locale-dependent. The German sharp s uppercases to two characters, and Turkish has a dotless i so an uppercase I lowercases differently there. For case-insensitive comparison use a locale-invariant fold, not uppercasing.

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.