NameIsKyro478 downloadsClean, space, sort, link, and list selected text or entire notes.
Text Alchemy is an Obsidian text cleanup toolkit for turning messy selected text into clean Markdown. It can remove line gaps, trim wiki links, fix copied PDF wrapping, remove duplicates, make lists, re-number lists, space headings, add dividers, sort text from the command palette, and insert quick date links from @ suggestions.
Created by @NameIsKyro.
@today, @tomorrow, @nextweek, and more.@ suggestions with Shift+Enter.Remove gaps between lines:
[[How to Pick the Healthiest Cheeses]]
[[letter to medical professionals about raw milk.pdf]]
[[Life in the Milk A History of Intravenous Milk Injections]]
Becomes:
[[How to Pick the Healthiest Cheeses]]
[[letter to medical professionals about raw milk.pdf]]
[[Life in the Milk A History of Intravenous Milk Injections]]
Soft duplicate removal:
[[Milk]]
[[Cheese]]
[[Milk]]
[[Bread]]
Becomes:
[[Milk]]
[[Cheese]]
[[Bread]]
Duplicates:
[[Milk]]
Fix copied PDF line breaks:
Raw milk contains many different
types of bacteria and enzymes that
may be affected by heat.
Becomes:
Raw milk contains many different types of bacteria and enzymes that may be affected by heat.
Insert a quick date link:
@today
Pick @today and press Enter:
[[2026-09-02|Today]]
Pick @today and press Shift+Enter:
02/09/2026
Clean selected text - Runs the enabled cleaner pipeline on the current selection.Clean entire note - Runs the enabled cleaner pipeline on the active note.Remove gaps between lines - Removes blank lines inside the selected text or whole note.Trim whitespace on each line - Trims spaces before and after each line.Remove duplicates and list removed lines - Removes repeated lines and adds a Duplicates: section.Remove duplicates only - Removes repeated lines without adding a duplicate report.Add paragraph spacing - Keeps one empty line between paragraph blocks.Add spacing around all headings - Adds one blank line before and after every Markdown heading.Add spacing around selected heading levels - Adds spacing only around heading levels chosen in settings.Add dividers between all headings - Adds --- between matching headings.Add dividers between selected heading levels - Adds --- only between chosen heading levels.Turn lines into bullet list - Adds the configured bullet marker to each non-empty line.Turn lines into numbered list - Numbers each non-empty line from the configured start number.Turn lines into checklist - Converts each non-empty line to - [ ] text.Remove bullets and numbering - Removes bullet, checklist, and numbered-list markers.Re-number numbered list - Rebuilds numbering from the configured start number.Clean wiki links - Trims wiki-link lines like [[Milk]] into [[Milk]].Convert plain lines to wiki links - Wraps each plain line in [[...]].Convert lines to Markdown links - Converts Google - https://google.com into [Google](https://google.com).Fix copied PDF line breaks - Joins wrapped paragraph lines while keeping blocks separate.Remove hyphenated line breaks - Converts ferment- plus ation into fermentation.Sort lines A to Z - Sorts all lines alphabetically.Sort lines Z to A - Sorts all lines in reverse alphabetical order.Sort headings A to Z - Sorts heading lines alphabetically and leaves non-heading lines after them.Sort title lines A to Z - Sorts non-empty title-style lines alphabetically.No default hotkeys are registered. Add your own hotkeys in Obsidian's Hotkeys settings if you want them.
Type @ in the editor to open date suggestions. Enter and Shift+Enter each have their own configurable insertion style.
Available insertion styles:
[[date|mark]], such as [[2026-09-02|Today]].[[date|date]], such as [[2026-09-02|02/09/2026]].[[date]], such as [[2026-09-02]].date, such as 02/09/2026.(date), such as (02/09/2026).Available date suggestions:
@today@date for title-style dates@tomorrow@yesterday@nextweek@lastweek@nextmonth@lastmonth@nextyear@lastyear@startofweek@endofweekUse @date in a Markdown heading or Obsidian's inline note title to insert today's date with the dedicated title format and wrapper settings. For example, # Research @date can become # Research (02-09-2026). Because / is not valid inside an Obsidian filename, slash-based formats are converted to hyphens only in the note title; Markdown headings keep the selected format exactly.
The settings tab lets you build a cleaner pipeline by toggling each tool on or off. Every option includes a short Info description and example so you can remember what it does later.
Core settings:
@date expansion.1.5.0.Install from the community directory when Text Alchemy is listed:
Manual install for testing:
main.js, manifest.json, and styles.css from a release.<your-vault>/.obsidian/plugins/text-alchemy/.Each GitHub release should attach exactly these files:
main.jsmanifest.jsonstyles.cssThe source repository intentionally does not commit generated release files.
Text Alchemy runs locally in Obsidian. It does not collect telemetry, make network requests, use external accounts, or send note content anywhere.
#.npm ci
npm run lint
npm run typecheck
npm test
npm run build
npm run build creates main.js for local testing and release uploads. The generated main.js file is intentionally ignored by Git.
See RELEASING.md for the release checklist.
MIT. See LICENSE.
Open an issue at https://github.com/NameIsKyro/text-alchemy/issues.