@remigius42/morg
v0.12.0
Published
Bidirectional Markdown ↔ Org-mode converter with round-trip convergence
Maintainers
Readme
morg
Copyright 2026 Andreas Remigius Schmidt
Low-friction conversion between Markdown and Org-mode, and between their dialects, so your notes are not locked into the app that wrote them.
Note-taking apps each write their own dialect: Logseq writes empty blocks, task markers and a block's first line in an org that Emacs reads otherwise, and Obsidian has its wikilinks and callouts. Leaving an app, or using a second tool on the same notes, should not mean rewriting them by hand. morg treats Org as a canonical plain-text format and Markdown as the interop surface:
- Convert Markdown ↔ Org, in Vanilla, Logseq or Obsidian dialect per side.
- Translate between two dialects of one format, changing only what they write differently: Logseq org to Org that Emacs reads as intended, Logseq Markdown ↔ Markdown, Obsidian ↔ Logseq.
- Normalize a file to morg's canonical form.
Strict byte-losslessness between the two formats is impossible, so morg's guarantee is to be semantically faithful and convergent (ADR 0001): one round trip may normalize formatting, but its output is a fixed point. Constructs that cannot be carried are documented in the mapping reference and reported as warnings.
morg is not a style formatter like prettier, nor a sync tool: it converts one file at a time, and a whole vault is a shell loop. It is built on the unified ecosystem (remark for Markdown, uniorg for Org).
Status
Pre-1.0: options may still change between minor versions; breaking changes are marked in the changelog. Changes are checked by round trips of real Logseq graphs and of public Markdown and Org documentation (the Rust book, GitHub's and MDN's docs, Worg), and by a property test on generated input. Most of the code is written by an AI coding agent under human direction, test-first and CI-gated; see the contributing guide.
Usage
Prerequisites
The Web UI needs only a current browser. The CLI and the library need Node.js 24 or later.
Web UI
Try morg without installing anything at morg.binarypoetry.ch: paste or drop a file, pick the formats and dialects, copy or download the result. All conversion happens in your browser, nothing is uploaded. Its options, file handling and the embed page are described in the Web UI guide.
CLI
npx @remigius42/morg --input notes.md --output notes.orgThe formats follow from the file extensions. Every flag and the
morg.toml config file are described in the CLI
reference.
Library
npm install @remigius42/morgimport { convertMarkdownToOrg, convertOrgToMarkdown } from "@remigius42/morg"
const org = convertMarkdownToOrg("# Hello\n\nWorld.")
const md = convertOrgToMarkdown(org)Every function and option is described in the library reference.
Documentation
All docs are listed in the docs index and are on the website as well: the mapping reference, the configuration, the architecture and the design decisions in docs/adr/. Project vocabulary lives in CONTEXT.md.
Contributing
PRs are welcome. Fair warning: this is a personal project maintained on a best-effort basis, so responses and reviews may be slow and changes that don't fit the use case are unlikely to be merged. Opening an issue first to discuss is the best use of your time. Bugs go to the bug report form, ideally with the input that shows them.
Please report vulnerabilities privately — see SECURITY.md. To get started, have a look at CONTRIBUTING.md. Participation is governed by the code of conduct.
Funding
This project is powered by coffee, therefore I would appreciate if you could
thank you!
License
GPL-3.0-or-later (required by the uniorg dependencies). The licenses of the third-party packages morg and the Web UI are built on are listed at morg.binarypoetry.ch/licenses.html (see ADR 0008).
