Skip to content
Like gofmt, but for Markdown.
Branch: master
Clone or download
Pull request Compare This branch is 6 commits behind shurcooL:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status GoDoc

Like gofmt, but for Markdown.

Markdown Format Demo

Note that markdownfmt works with pure Markdown files. If you want to use it with Markdown files that have front matter, consider one of alternatives that supports that.


go get -u

Add $GOPATH/bin to your $PATH or copy $GOPATH/bin/markdownfmt to your $PATH.


usage: markdownfmt [flags] [path ...]
  -d=false: display diffs instead of rewriting files
  -l=false: list files whose formatting differs from markdownfmt's
  -w=false: write result to (source) file instead of stdout

Editor Plugins


  • mdfmt - Fork of markdownfmt that adds front matter support.
  • tidy-markdown - Project with similar goals, but written in JS and based on a slightly different styleguide.


You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.