Reformat/Normalize markdown with some configurable settings
| Links: | |
|---|---|
| Maintainers: | bwat47 |
| Version: | 1.6.12 |
| Minimum app version: | 3.5 |
| Downloads: This version: | 133 |
| Last updated: | 2026-10-16T23:24:27Z |
A Joplin plugin that formats notes in the Markdown editor using configurable rules. It parses your note to find known structures and applies targeted edits, leaving unrecognized syntax untouched.
[!NOTE] This plugin is developed using AI


Install Markdown Formatter from Joplin's Settings → Plugins, or install the .jpl archive from Releases.
With a note open in the Markdown editor, format it using any of the following:
Edit → Format MarkdownCtrl+Alt+F (Windows/Linux) or Cmd+Alt+F (macOS)If the note is already formatted, nothing is written back.
Configure rules under Markdown Formatter in Joplin's plugin settings.
| Setting | Default | Description |
|---|---|---|
| Normalize heading level increments | On | Lower skipped heading levels so headings increase one level at a time. |
| Minimum heading level | None | Floor for heading levels (H2 shifts all headings proportionally; first heading keeps the first heading and raises shallower ones; none disables). |
| Normalize heading marker spacing | On | Use one space between ATX heading markers and text, including optional closing markers. |
| Remove heading indentation | On | Move root-level ATX headings to column 0 without affecting indented code or nested headings. |
| Setting | Default | Description |
|---|---|---|
| Unordered list marker | - |
Rewrite bullets to - or *, or preserve as written. |
| Normalize ordered list numbering | On | Renumber ordered lists sequentially while keeping the starting number. |
| List spacing | Semantic | Semantic preserves tight/loose rendering and fixes mixed spacing; also available as preserve, tight, or loose. Controls inner list-item block spacing. |
| List indentation | Tabs | Indent nested list markers with tabs, 2 spaces, or 4 spaces (widened when needed to preserve CommonMark nesting). |
| Setting | Default | Description |
|---|---|---|
| Emphasis (italic) marker | *emphasis* |
Prefer * or _ for emphasis delimiters. |
| Bold marker | **bold** |
Prefer ** or __ for strong delimiters. |
| Double quote style | Preserve | Convert prose double quotes to straight or smart (curly) quotes. |
| Single quote style | Preserve | Convert prose single quotes and apostrophes to straight or smart (curly) quotes. |
| Link text spacing | All | Trim and collapse excess whitespace in link text (all also converts line breaks to spaces; spaces preserves line breaks; preserve leaves unchanged). |
| Setting | Default | Description |
|---|---|---|
| Horizontal rule marker | * * * |
Preferred syntax for horizontal rules. |
| Table style | Preserve | Compact pads cells with one space; aligned aligns pipes; preserve leaves tables unchanged. |
| Set default language on unlabeled code blocks | Off | Add the configured default language to unlabeled fenced code blocks (ignores indented code blocks). |
| Default code block language | txt |
Language identifier used when the rule above is enabled. |
| Normalize blockquote marker spacing | On | Use one space after > markers and between nested markers (>> → > >). Skips quotes containing content that cannot be safely rewritten. |
| Ensure blank lines around blocks | On | Individual toggles to add one blank line before and after root-level headings, paragraphs, code blocks, math blocks, tables, blockquotes, and lists when neighboring content exists. |
| Ensure blank line after front matter | On | Add one blank line between YAML front matter and following content. |
| Collapse consecutive blank lines | On | Reduce multiple blank lines to one outside protected content. |
| Trim trailing whitespace | On | Remove trailing spaces/tabs outside protected content while preserving two-space hard line breaks. |
| Remove leading blank lines | On | Remove blank lines before the note's first content or front matter. |
| Ensure trailing newline | On | End the note with exactly one newline. |
| Setting | Default | Description |
|---|---|---|
| Preview changes before applying | Off | Show a diff dialog with Apply/Cancel buttons before modifying the note. |
| Display toast messages | On | Show a toast with added/removed character counts after formatting. |
Each rule runs as an isolated pass against a parsed tree of the current Markdown:
If a rule unexpectedly alters the document structure, it is skipped and formatting continues from the last safe state. If formatting fails entirely, the note is left unchanged. Protected regions—fenced/indented code blocks, inline code, YAML front matter, math, and HTML blocks—are preserved by whitespace and quote rules.
[!NOTE] If the diff preview reports
Skipped by the structural safety check, please open an issue with a minimal Markdown example that reproduces it.
_): Skips conversions where CommonMark would reinterpret intraword underscores or merge adjacent delimiter runs.Requires Node.js 22+.
# Install dependencies
npm install
# Run tests
npm test
# Lint (Oxlint + fallow) and check formatting (Oxfmt)
npm run lint
npm run format:check
# Build the plugin archive (outputs publish/com.bwat47.joplin-markdown-formatter.jpl)
npm run dist
MIT