Roam Research Markdown Export Loses Block References

Workaround available Web, Desktop Updated October 21, 2026

Quick answer

Roam's Markdown export keeps [[page links]] but drops block references. Export JSON instead and convert it with Obsidian's Importer or the community rj2obs script, which preserve block refs.

Most likely fix: Use the JSON export.

Symptoms

After exporting to Markdown, page links work but block references and block embeds are missing or appear as unreadable IDs in the target app.

Why it happens

  • Markdown export does not resolve block references to their text
  • Block refs depend on Roam's internal block UIDs, which only the JSON export keeps

How to fix it

Try these in order — the most common fix is first.

  1. 1. Use the JSON export

    1. In Roam, open ••• > Export All
    2. Choose JSON instead of Markdown
    3. Keep this JSON file as your full backup
  2. 2. Convert JSON with a block-ref-aware tool

    1. For Obsidian: use the official Importer plugin with the Roam Research (.json) format
    2. Alternative: run the community rj2obs Python script (or a fork like Roam2Obsidian) on the JSON file, then open the output folder as a vault
  3. 3. Fix a 'KeyError: edit-time' crash in rj2obs

    1. Some Roam exports contain 13-digit (millisecond) timestamps instead of 10-digit ones
    2. Trim the extra three digits from those timestamps in the JSON (users shared a one-line Perl/regex fix)
    3. Rerun the converter

This guide also covers

  • roam research export markdown
  • roam block references export
  • roam json to markdown
  • rj2obs

Still not working?

If Roam Research keeps failing, you're not alone. See every Roam Research problem users report or the alternatives people switch to.

Other Roam Research errors