Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Clean Empty Lines

Mikhail YatsenkoMikhail Yatsenko19 downloads

Remove duplicate empty lines, format spacing around headings, tighten list items, and remove horizontal rules.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates5

An Obsidian plugin that tidies up blank lines and separators in your Markdown notes:

  • Collapse duplicate empty lines: Replaces multiple consecutive blank lines with a single blank line.
  • Ensure blank lines around headings: Guarantees clean spacing before and after headings (# Header).
  • Tighten list items: Removes blank lines between list items (-, *, +, 1., - [ ], sublists, etc.).
  • Remove horizontal lines (---): Cleans up thematic break lines in note body while preserving YAML frontmatter.
  • Protected blocks: Code blocks (```), math formulas ($$), and frontmatter are completely safe and untouched.
  • Multilingual support: English (default), Russian, German, French, Spanish, Simplified Chinese, Japanese, Korean, Portuguese.

Installation

From Obsidian Community Plugins

  1. In Obsidian, go to Settings -> Community plugins.
  2. Turn off Restricted mode and click Browse.
  3. Search for Clean Empty Lines and click Install, then Enable.

Manual Installation

  1. Download main.js and manifest.json from the latest release.
  2. Inside your Obsidian vault, navigate to .obsidian/plugins/.
  3. Create a directory named clean-empty-lines.
  4. Copy manifest.json and main.js into that directory.
  5. In Obsidian, go to Settings -> Community plugins, reload, and enable Clean Empty Lines.

Usage

  1. Command Palette (Ctrl/Cmd + P):
    • Clean empty lines in active note — Formats the entire active document.
    • Clean empty lines in selection — Formats only the selected text.
  2. Ribbon Icon:
    • Click the check-list icon on the left ribbon to clean the current note with a single click.

Settings

Customize which formatting rules to run:

  • Remove duplicate empty lines (default: On)
  • Empty line before headings (default: On)
  • Empty line after headings (default: On)
  • Empty line between consecutive headings (default: On)
  • Remove empty lines between list items (default: On)
  • Remove horizontal lines (---) (default: On)
  • Trim leading empty lines (default: On)
  • Trim trailing empty lines (default: On)

Supported Languages (i18n)

The plugin automatically adapts to Obsidian's active interface language:

  • English (en) — Default
  • Russian (ru)
  • German (de)
  • French (fr)
  • Spanish (es)
  • Simplified Chinese (zh / zh-cn)
  • Japanese (ja)
  • Korean (ko)
  • Portuguese (pt / pt-br)

Development & Testing

npm install     # Install dependencies
npm test        # Run unit tests (37 tests)
npm run build   # Production bundle (main.js)

License

MIT © Mikhail Yatsenko

HealthExcellent
ReviewPassed
About
Tidy blank lines and separators in Markdown notes. Collapse duplicate blank lines, enforce clean spacing around headings, tighten list items, and remove horizontal rules while preserving code blocks, math blocks, and YAML frontmatter.
FormattingMarkdownEditing
Details
Current version
1.1.3
Last updated
2 days ago
Created
3 days ago
Updates
5 releases
Downloads
19
Compatible with
Obsidian 1.8.7+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
Mikhail YatsenkoMikhail Yatsenkoyamixst
GitHubyamixst
  1. Community
  2. Plugins
  3. Formatting
  4. Clean Empty Lines

Related plugins

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

Editing Toolbar

The Editing Toolbar is modified from cMenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.

Outliner

Work with your lists like in Workflowy or Roam Research.

Image Captions

Add captions to images with inline Markdown and link support. The caption format is compatible with the Commonmark spec and other Markdown applications.

Various Complements

Complete words similar to auto-completion in an IDE.

Sort and Permute lines

Sort and Permute lines in whole file or selection.

Heading Shifter

Easily Shift and Change Markdown headings.

Shortcuts extender

Use shortcuts for input special symbols without language switching.

PanGu

Add spaces between Chinese characters and English alphabet. A boon for typographically compulsive people.

Chord Sheets

Work with chord sheets (chords over lyrics or inline) in Live Preview and reading mode: Chord diagrams for guitar, ukulele, mandolin and piano, transpose, autoscroll, and more.