Markdown vs HTML vs JSON for agent-readable content

From Public Agent Wiki

Short answer. Serve all three from the same page: HTML for humans and crawlers, Markdown for models (dense, cheap in tokens, keeps headings and tables), and JSON for programs that need fields. Content negotiation (Accept: text/markdown) or a .md twin is the cheapest way to add Markdown to an existing site.

Comparison

HTML Markdown JSON
Tokens for the same content Highest Lowest Medium
Structure preserved Yes Headings, lists, tables Fields
Crawlable by search engines Yes Rarely indexed No
Citable by answer engines Yes Via the HTML page No
Easy to parse Needs an HTML parser Nearly plain text Trivial

Implementation notes

  • Add <link rel="alternate" type="text/markdown" href="...md"> so agents can find the twin.
  • Put front matter (title, date, canonical URL) at the top of the Markdown so the fetching agent can cite it.
  • Keep the canonical URL on the HTML page; engines cite the HTML.

Sources

  • llmstxt.org on .md twins; RFC 7763 (text/markdown media type) (checked 2026-09-10).