Remix.run Logo
Show HN: Docx-to-Markdown – layout-aware Word to Markdown converter(docx-editor.dev)
5 points by thisisjedr 5 hours ago | 5 comments

Hey HN, I’m the author of the https://github.com/eigenpal/docx-editor, it’s an SDK that implements Word-compatible layout engine in Typescript.

Today, we are releasing Word to markdown converter library. It’s open source and published under Apache 2.0 license. It uses our layout engine, so it can return accurate, per-page markdown blocks (with headers, footers, and image references). We also handle fonts (Google fonts as fallback) or let you pass your font files upfront for accurate content measurement.

To our surprise, Word to per-page Markdown conversion is not a solved problem even in 2026! We initially faced this friction when preprocessing Word documents for agentic workflows. For our use case, it was important to represent per-page content in markdown. Initially, we ended up using LibreOffice sidecar to convert to PDF and then using .pdf -> .md library. This was not ideal given that LibreOffice sidecar that was sitting idle most of the time.

This issue is addressed with docx-to-markdown library. it can be used directly in your Typescript ingestion pipeline. Try with your docs at https://www.docx-editor.dev/solutions/word-to-markdown.

(if you catch any bugs please let us know in the comments / or file gh issues)

spawrks 5 hours ago | parent | next [-]

This is great, working on a soon to launch Markdown editor soon so this is especially relevant. I'll play around with it later but I'm curious, how are you deciding pagination boundaries? I've found word and docx and various open source projects vary on philosophy and implementation.

thisisjedr 5 hours ago | parent [-]

Thanks! Our core product is a Word editor that you can embed in your React / Vue app. So we just repurposed the layout engine to be an accurate converter. You can see how our layout engine "sees" the document in the left tab of the demo.

verdverm 4 hours ago | parent | prev [-]

How hard is it to go the other direction?

I've been doing some writing things where they use Docx and I use Markdown (have been since before the LLM craze). Boy is it annoying to go back and forth, will be trying the one direction anyhow

thisisjedr 4 hours ago | parent [-]

Docx to markdown is a lossy conversion, so getting .docx back is possible but will lose most formatting details

verdverm 4 hours ago | parent [-]

In this case, I would imagine two scenarios

1. I have markdown, I want a docx version, that is equivalent to html rendering, markdown's whole point, almost certainly many options out there

2. I have docx, I want to make edits in markdown (because vim motions), need to sync those edits back. Ideally just some value swaps in the "DOM"

It may very well be the case that Office now supports Markdown natively. I seem to recall possibly seeing that. Google Workspace is as well iirc. One of the two already had support, the other was just releasing the first takes (back when I last looked )