by Dario Castellano
Change selected text to uppercase, lowercase, sentence case, or capitalize each word from commands, hotkeys, and the editor context menu.
Case Formatter
Change the case of selected text in Obsidian with four familiar actions, available from the command palette, keyboard shortcuts, and the editor context menu.
| Command | Result for the LORD of the RINGS |
|---|---|
| UPPERCASE | THE LORD OF THE RINGS |
| lowercase | the lord of the rings |
| Sentence case | The lord of the rings |
| Capitalize Each Word | The Lord Of The Rings |
These operations follow the general definitions used by Microsoft Word. The plugin does not reproduce Office's linguistic engine.
Manual installation
Requires Obsidian 1.5.0 or later. The plugin uses APIs available on desktop and mobile; desktop testing and mobile limitations are described below.
-
Download the ZIP from the Releases page and extract it. It contains a
case-formatterfolder. If you built the project locally, the ZIP is atdist/case-formatter-1.0.1.zip. -
Open your vault folder. Copy
case-formatterinto.obsidian/plugins/, creatingpluginsif needed. You can also copy the already extracteddist/case-formatterfolder from a local build. -
Check that the two required files are at these exact paths:
YOUR-VAULT/ └── .obsidian/ └── plugins/ └── case-formatter/ ├── main.js └── manifest.json -
Restart Obsidian. Open Settings → Community plugins. Enable community plugins if needed, then turn on Case Formatter in the installed plugins list.
-
Open a note in editing mode, select some text, and right-click to see the four actions grouped in the menu. You can also open the command palette and search for Case Formatter.
On macOS, folders starting with a dot are hidden: press ⌘⇧. in Finder to show them. If your vault uses a configuration folder other than .obsidian, use that folder instead.
Installation does not require Node.js, npm, or compilation. No styles.css is needed because the plugin uses Obsidian's native interface.
Keyboard shortcuts
Open Settings → Hotkeys, search for Case Formatter, and assign your preferred shortcuts to the four commands. No default hotkeys are assigned.
Behavior
- Only selected text is modified, in Source mode and Live Preview. Switch to editing mode first if you are in Reading view.
- Without a selection, the commands are unavailable and the plugin adds no context menu items.
- Converted text stays selected, so you can apply another case without selecting it again.
- Multiple selections and accented letters are supported. Selection positions are updated even when the text length changes, such as
straße→STRASSE. - Each conversion that changes the text creates one step in the native history. ⌘Z on Mac or Ctrl+Z on Windows/Linux undoes the last conversion; the standard Redo command restores it. There is no separate history.
- Capitalize Each Word uppercases the first letter of every word, including articles and prepositions, and lowercases the rest. Internal apostrophes stay within a word (
L'AMICO→L'amico,DON'T→Don't); hyphens separate words (mother-in-law→Mother-In-Law). - Sentence case lowercases the text and capitalizes the beginning of sentences and each line. It does not recognize proper names or acronyms:
NASAbecomesnasaunless it starts a sentence. Abbreviations and sentence endings are not distinguished using linguistic rules and may need manual correction. - The plugin converts the literal selected Markdown. If your selection includes URLs, link destinations, wikilinks, or code, their letters are converted too: select only the text you want to change.
- No network requests, telemetry, saved settings, or changes to unselected notes.
Quick test
Copy TEST-NOTE.md into your vault and follow its checklist. It includes English text, Unicode examples, accents, apostrophes, and Undo/Redo checks. Automated tests cover conversions, selection handling, CodeMirror history, Obsidian host integration, and release packaging.
Desktop acceptance checks have also passed in Obsidian 1.14.4 on macOS, including both editor modes, native Undo/Redo, the visible context menu and mouse conversion, unload cleanup, and an assigned keyboard shortcut. The minimum declared version, 1.5.0, is based on the public APIs used; it has not been tested in that older runtime. Mobile devices have not been tested.
To update an installed copy, disable the plugin, replace main.js and manifest.json, then restart Obsidian and enable it again. To remove it, disable the plugin and delete the case-formatter folder from your vault.
Development
Requires Node.js 22.12+ and npm. Packaging also requires the zip command, which is included with macOS. On Ubuntu, install it with sudo apt install zip.
npm ci
npm run lint # Official Obsidian lint rules and manifest validation
npm run check # Lint, tests, TypeScript checks, and production build
npm run package # Checks, installable folder, and ZIP archive
npm run dev # Rebuild main.js when source files change
The build generates main.js in the project root. Packaging generates dist/case-formatter/ and dist/case-formatter-1.0.1.zip. Generated files and node_modules are excluded from Git. npm run dev rebuilds the bundle but does not automatically reload Obsidian.
src/format.ts Conversion rules with no Obsidian dependencies
src/editor.ts Atomic selection changes and position updates
src/history.ts Separate undo events for conversions
src/main.ts Commands, context menu, and extension registration
tests/ Vitest tests using real CodeMirror history
scripts/package.mjs Installable package and version consistency checks
CI runs checks and packaging on Node.js 22 and 24, making the package available as a workflow artifact. Published installable packages are available on the Releases page.
For live desktop acceptance, create a disposable vault at test-vault/, install the current build there, enable it, and open an editable Acceptance.md note. With Obsidian CLI enabled and its debugger attached (obsidian vault=test-vault dev:debug on), run npm run test:obsidian. This edits the test note, temporarily assigns a shortcut, and disables/re-enables the plugin; it checks the exact vault path before editing. It is intentionally separate from CI.
New release tags must match the manifest version exactly, such as 1.0.1, without a v prefix.
License
MIT — see LICENSE.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.