fileformer
search⌘KtranslateENexpand_moreupload_fileConvert
Converters8 file families · 44 direct conversions
What changes in a conversionarrow_forward
home/text-tools/text-case-converter

Free Text Case Converter

Text case converter

Fix accidental caps lock, tidy up headlines, or turn a phrase into a variable name. Paste once and see every case side by side: click any to copy.

your text9 words · 51 chars
TryCaps lock accidentHeadlineVariable nameExisting code
edit_noteFor writingSentence casecontent_copyThe quick guide to converting files in your browserTitle Casecontent_copyThe Quick Guide to Converting Files in Your BrowserUPPERCASEcontent_copyTHE QUICK GUIDE TO CONVERTING FILES IN YOUR BROWSERlowercasecontent_copythe quick guide to converting files in your browserCapitalise Eachcontent_copyThe Quick Guide To Converting Files In Your BrowseraLtErNaTiNgcontent_copytHe qUiCk gUiDe tO CoNvErTiNg fIlEs iN YoUr bRoWsEr
codeFor codecamelCasecontent_copytheQuickGuideToConvertingFilesInYourBrowserPascalCasecontent_copyTheQuickGuideToConvertingFilesInYourBrowsersnake_casecontent_copythe_quick_guide_to_converting_files_in_your_browserCONSTANT_CASEcontent_copyTHE_QUICK_GUIDE_TO_CONVERTING_FILES_IN_YOUR_BROWSERkebab-casecontent_copythe-quick-guide-to-converting-files-in-your-browserdot.casecontent_copythe.quick.guide.to.converting.files.in.your.browser
~/title-case-isnt-simple

Title Case vs Sentence case.

Title Case capitalises the important words and leaves small ones - a, an, the, and, of, to, in - lowercase, except at the start. Sentence case only capitalises the first word and names.

Most modern apps and websites (Google, Apple, GOV.UK) use sentence case: it's quicker to read and avoids arguments over which words count as “small”.

Title CaseNewspapers, book titlesThe Quick Guide to Converting Files in Your Browser
Sentence caseGoogle, Apple, GOV.UKThe quick guide to converting files in your browser
UPPERCASEShort labels onlyTHE QUICK GUIDE TO CONVERTING FILES IN YOUR BROWSER
~/naming-in-code

Which case goes where in code.

Code can't have spaces in names, so each language settled on its own convention. Using the expected one makes code instantly familiar to others.

userProfileImagecamelCaseVariables and functions
JavaScriptJavaSwift
UserProfileImagePascalCaseClasses, types and React components
C#TypeScriptReact
user_profile_imagesnake_caseVariables, functions and database columns
PythonRubySQL
MAX_UPLOAD_SIZECONSTANT_CASEConstants and environment variables
.envCPython
user-profile-imagekebab-caseURLs, CSS classes and file names
CSSHTMLURLs
user.profile.imagedot.caseConfig keys and translation IDs
i18nJava propsYAML
~/upper-and-lower-are-not-opposites

Changing case can change length, language and meaning.

Unicode case mapping is not a one-to-one swap. Some characters turn into two, some depend on the language, some depend on their position in a word, and some never come back. Every result below is computed by your browser’s own toUpperCase and toLocaleUpperCase, which follow Unicode’s SpecialCasing rules.

Your textTurkishGermanGreekLigaturesLook-alikes
localeentrazltelnl
İstanbul’da ışık · Izmir
toUpperCase()24 code pointsİSTANBUL’DA IŞIK · IZMIR
toLowerCase()25 code points (+1)i̇stanbul’da ışık · izmir
toLocaleUpperCase('en')24 code pointsİSTANBUL’DA IŞIK · IZMIR
toLocaleLowerCase('en')25 code points (+1)i̇stanbul’da ışık · izmir
input24 code points
upper → lower == lower?no: i̇stanbul’da işik · izmir
locale changes resultno, in en
4 characters with special case rules
İU+0130upper İ (U+0130)lower i̇ (U+0069 U+0307)Capital I with dot. In most languages it lowercases to i plus a combining dot (2 code points); in Turkish and Azerbaijani to plain i.
ıU+0131upper I (U+0049)lower ı (U+0131)Dotless i uppercases to plain I, which lowercases to dotted i outside Turkish. It doesn’t round-trip.
IU+0049upper I (U+0049)lower i (U+0069)In Turkish and Azerbaijani, I lowercases to dotless ı, not i.
iU+0069upper I (U+0049)lower i (U+0069)In Turkish and Azerbaijani, i uppercases to dotted İ, not I.

Case-insensitive comparison, six ways

Green where the method gives the answer a reader expects, red where it doesn’t. Computed live.
pairexpectedtoLowerCase ===toUpperCase ===RegExp /iuNFKC + upper + lowerCollator accentCollator base
straße · STRASSEGerman sharp ssameclosediffchecksameclosediffchecksameclosediffchecksame
file · FILEfi ligaturesameclosediffchecksameclosediffchecksamechecksamechecksame
café · caféNFC vs NFD accentsameclosediffclosediffclosediffchecksamechecksamechecksame
K · kKelvin sign vs ksamechecksameclosediffchecksamechecksamechecksamechecksame
ΣΟΦΟΣ · σοφοςGreek with final sigmasamechecksamechecksamechecksamechecksamechecksamechecksame
İstanbul · istanbulTurkish capital İsameclosediffclosediffclosediffclosediffclosediffchecksame
Ω · ωOhm sign vs omegasamechecksameclosediffchecksamechecksamechecksamechecksame
résumé · resumedifferent wordsdifferentcheckdiffcheckdiffcheckdiffcheckdiffcheckdiffclosesame
matches expectation4 / 84 / 84 / 87 / 86 / 87 / 8
For identifiers, file names and logins, Unicode recommends full case folding after NFKC normalisation (the “NFKC_Casefold” of UAX #31), not lowercasing. Accent-insensitive collation treats different words as equal, so use it for search, not for identity.
~/whose-title-case

Four style guides, four title cases.

AP and APA lowercase only short function words. Chicago and MLA lowercase every preposition, however long, but split on “so” and “yet”. Chicago also keeps the second half of a prefixed compound lowercase. Words marked in colour are where a style departs from AP.

Your textPrepositionsCompoundsColon and soBrand words
AP Stylebooknews, 2024 editionAGuidetoWhattoLookforBeforeBuyingaFileConverterbaseline
Chicago Manual of Style18th edition, 8.160AGuidetoWhattoLookforbeforeBuyingaFileConverter1 differ
APA Style7th edition, 6.17AGuidetoWhattoLookforBeforeBuyingaFileConvertersame as AP
MLA Handbook9th edition, 2.90AGuidetoWhattoLookforbeforeBuyingaFileConverter1 differ
Sentence caseGOV.UK, Google, WikipediaAguidetowhattolookforbeforebuyingafileconverter7 differ
word classAPChicago 18APA 7MLA 9
Articles (a, an, the)lowercaselowercaselowercaselowercase
Prepositions, 1-3 letterslowercaselowercaselowercaselowercase
Prepositions, 4+ lettersCapitaliselowercaseCapitaliselowercase
and, but, or, nor, forlowercaselowercaselowercaselowercase
so, yetlowercaseCapitaliselowercaselowercase
First word after a colonCapitaliseCapitaliseCapitaliseCapitalise
Prefix compounds (anti-aliasing)Anti-AliasingAnti-aliasingAnti-AliasingAnti-Aliasing
No rule set can tell a preposition from an adverb without parsing the sentence: “Set Up a Server” capitalises up because it is part of the verb. Words with internal capitals or dots (iPhone, HEIC, invoice.pdf) are left as written in every style here.
~/where-does-a-word-end

Acronyms and digits break naive case conversion.

Converting XMLHttpRequest to snake_case first means finding where each word ends. A rule that only splits at a lowercase-to-uppercase step leaves XMLHttp stuck together. Three real splitting strategies are run below, then the last column converts back to camelCase to show what can’t be recovered.

inputLower→upper step/([a-z])([A-Z])/Acronym-aware/\p{Lu}{2,}(?=\p{Lu}\p{Ll})|\p{Lu}?\p{Ll}+|\p{Lu}+|\p{N}+/uDigits stay attached…|\p{Lu}?\p{Ll}+\p{N}*|\p{Lu}+\p{N}*|…round trip → camelCase
XMLHttpRequestXMLHttpRequestxmlhttp_requestXMLHttpRequestxml_http_requestXMLHttpRequestxml_http_requestinfoxmlHttpRequest
getHTTPSUrlgetHTTPSUrlget_httpsurlgetHTTPSUrlget_https_urlgetHTTPSUrlget_https_urlcancelgetHttpsUrl
IPv6AddressIPv6Addressipv6addressIPv6Addressip_v_6_addressIPv6Addressip_v6_addressinfoipV6Address
userIDuserIDuser_iduserIDuser_iduserIDuser_idcanceluserId
iOSAppStoreiOSAppStorei_osapp_storeiOSAppStorei_os_app_storeiOSAppStorei_os_app_storecanceliOsAppStore
base64Encodebase64Encodebase64encodebase64Encodebase_64_encodebase64Encodebase64_encodecheck_circlebase64Encode
user_2fa_codeuser2facodeuser_2fa_codeuser2facodeuser_2_fa_codeuser2facodeuser_2_fa_codeinfouser2FaCode
parseJSON2CSVparseJSON2CSVparse_json2csvparseJSON2CSVparse_json_2_csvparseJSON2CSVparse_json2_csvcancelparseJson2Csv
the quick guide to converting files in ythequickguidetoconvertingfilesinythe_quick_guide_to_converting_files_in_ythequickguidetoconvertingfilesinythe_quick_guide_to_converting_files_in_ythequickguidetoconvertingfilesinythe_quick_guide_to_converting_files_in_yinfotheQuickGuideToConvertingFilesInY
The round trip uses the acronym-aware split. Once a word is lowercased, nothing records that it was an acronym, so XML comes back as Xml or xml. That is why several style guides tell you to write acronyms as ordinary words in the first place.
~/reference

Naming rules from each language’s own style guide.

The acronym column is where guides disagree most, and it decides what the tokenizer above has to cope with.

languageguidevariablestypesconstantsacronyms
PythonPEP 8snake_caseCapWordsUPPER_CASECapitalise all letters of an acronym in CapWords: HTTPServerError.
JavaScriptGoogle JS Style GuidelowerCamelCaseUpperCamelCaseCONSTANT_CASETreat acronyms as words: XmlHttpRequest, loadHttpUrl. The DOM itself is inconsistent (XMLHttpRequest, innerHTML).
JavaGoogle Java StylelowerCamelCaseUpperCamelCaseCONSTANT_CASEDefines a deterministic camel-case algorithm that lowercases acronyms: supportsIpv6OnIos.
GoEffective Go, Go Code Review CommentsmixedCapsMixedCapsMixedCapsInitialisms keep one case: URL or url, ServeHTTP, appID. Capital first letter means exported.
RustRFC 430snake_caseUpperCamelCaseSCREAMING_SNAKE_CASEAcronyms count as one word: Uuid, not UUID; Stdin.
C#.NET naming guidelinescamelCasePascalCasePascalCaseTwo-letter acronyms stay upper (IOStream); longer ones are Pascal (XmlReader).
SwiftAPI Design GuidelineslowerCamelCaseUpperCamelCaselowerCamelCaseAcronyms are uniformly up or down: utf8Bytes, URLSession, isRepresentableAsASCII.
KotlinKotlin coding conventionscamelCasePascalCaseSCREAMING_SNAKE_CASETwo letters upper (IOStream); longer, capitalise first only (XmlFormatter).
RubyRuby Style Guide (community)snake_caseCamelCaseSCREAMING_SNAKE_CASEKeep acronyms upper in class names: HTTPClient, XMLParser.
PHPPSR-1 and PSR-12camelCase methodsStudlyCapsUPPER_CASENot specified; PSR-1 only fixes the casing of each kind of name.
CSSCSS specificationskebab-casen/a--kebab-caseProperty and custom-property names are lowercase with hyphens; custom properties are case-sensitive.
SQLISO/IEC 9075 identifierssnake_case (convention)n/an/aUnquoted identifiers fold to upper case in the standard, to lower case in PostgreSQL.

Timeline

c. 800Carolingian minuscule spreads under Charlemagne and becomes the model for modern lowercase letters.
1500s: 1600sPrinters keep capitals in the upper of two type cases, giving the names “upper case” and “lower case”.
1953The first AP Stylebook is published.
1963ASCII places upper and lower case exactly 32 apart, so one bit flips case.
1972C and early Unix favour lowercase names with underscores.
1980Smalltalk-80 popularises run-together capitalised names, later called camelCase.
1991Unicode 1.0 ships with per-character case mappings.
2001Python’s PEP 8 style guide is published.
2008Unicode 5.1 adds capital sharp s ẞ (U+1E9E).
2014Rust RFC 430 settles its naming conventions.
2017The German orthography council permits ẞ in official spelling.
2024Chicago Manual of Style 18th edition is published.