User:ZKang123/TitleCaseConverter

TitleCaseConverter
DescriptionConverts Reference Titles in Title Case.
AuthorZKang123 (talk · contribs)
UpdatedFebruary 14, 2026
    (4 months ago)
Skinsminerva, modern, monobook, timeless, vector, vector-2022
SourceUser:ZKang123/TitleCaseConverter.js

This is a script that converts all reference titles to title case. This was created largely because at the Featured Article Candidate (FAC) stage, the FAC coordinators would often suggest before promoting that reference titles "should be either in sentence case or title case" regardless of "how they appear in their originals" (per MOS:CONFORM). As it would be cumbersome for one to go over 50+ references in an article and use other tools to convert each reference title manually to title case (such as Capitalizemytitle or Title Case Converter), I decided to write up this userscript so that the process would be much quicker.

Please note that there might still be some bugs in the script, but test cases have been largely successful thanks to guidance from Novem Linguae. Always click "Show changes" to see what has been changed before clicking "Publish page". The rules for title case in Wikipedia are taken from MOS:CT.

Installation

edit

It is highly recommended to install User:Enterprisey/script-installer first. Come back to this page and click the giant blue "Install" button in the infobox on the right.

Or install it manually by adding the below code to your Special:MyPage/common.js file.

{{subst:iusc|User:ZKang123/TitleCaseConverter.js}}

Options

edit

When editing the page in source editor, the sidebar will list the following options:

  • Convert All Titles (Preserve Capitals): Converts titles both inside <ref> tags AND in bibliography entries while keeping existing capitalization in words with capital letters. Words like "DataMall", "eBay", or "iPhone" will remain unchanged. This is the most comprehensive and safest option—it fixes all titles throughout your article while respecting proper nouns and brand names.
  • Convert All Titles (Change Capitals): Converts titles both inside <ref> tags AND in bibliography entries and changes all capitalization to strict title case. Use when you want completely uniform title case formatting across your entire reference section and bibliography.
  • Convert All Titles (Keep ALL CAPS): Converts titles both inside <ref> tags AND in bibliography entries but preserves words that are entirely uppercase. Useful when working with sources that use ALL CAPS styling that you want to maintain throughout.
  • Convert Ref Titles (Preserve Capitals): Converts titles only inside <ref> tags while keeping any existing capitalization in words that already have capital letters. Best for inline citations when you want to respect brand names and proper nouns.
  • Convert Ref Titles (Change Capitals): Converts titles only inside <ref> tags and changes all capitalization to strict title case rules. Mixed-case words will be normalized (e.g., DataMall might become Datamall). Use when you want uniform title case formatting in your inline citations.
  • Convert Ref Titles (Keep ALL CAPS): Converts titles only inside <ref> tags but preserves any words that are entirely in uppercase.

Clicking any option will prompt the "Title Case Conversion Preview" box. Check over it, click "apply changes", and double check with "show changes" BEFORE publishing the changes.

Bugs and feature requests

edit

Your feedback is essential. Please report all bugs and feature requests on the talk page. This is my first experience with Javascript, so be nice. Unfortunately, I might be very busy so I might only be able to deal with them weeks later.

Bugs largely dealt with (as of 14 February 2026)

edit
  • All caps remaining in all caps
    • Might have to add a separate function/option to toggle between converting all caps or not
  • Possibly adding a sentence case function
  • "Error: Sidebar section not found" in mobile view.