Overview

gramdown converts the .docx file you get from Grammarly’s export into clean, GitHub-Flavored Markdown.

It is built for that one file. Grammarly’s export has a handful of quirks (code set in a plain monospace font with no language, links that arrive underlined, indentation made of invisible characters), and gramdown is designed around them rather than trying to be a general-purpose .docx converter. How it works has the detail.

Ways to run it

Shell install (Linux, macOS)

curl -fsSL https://gramdown.tobythe.dev/install.sh | sh
gramdown draft.docx -o draft.md

Verifies the download’s checksum and installs to ~/.local/bin. See Downloads for pinning a version and other options.

Standalone binary

A single file that runs on its own, for Linux, macOS or Windows, with nothing else to install. Downloads lists each one with its size.

npm

npm install -g gramdown
gramdown draft.docx -o draft.md

Or without installing anything:

npx gramdown draft.docx -o draft.md

Every flag and exit code is in the CLI reference.

In the browser

Nothing to install: drop a .docx anywhere on this site and it converts on your device. Nothing is uploaded. See Browser converter.

From your own code

npm install @gramdown/core

@gramdown/core is the conversion engine behind all of the above. See the convert() API.

Your first conversion

# print the Markdown to your terminal
gramdown draft.docx

# write it to a file instead
gramdown draft.docx -o draft.md

# also guess a language for each code block (always double-check these)
gramdown draft.docx -o draft.md --guess-lang