Email → Markdown

Convert email to clean Markdown. Instantly.

InboxParse extracts the signal from your emails and delivers clean, token-efficient Markdown ready to drop straight into any LLM prompt or RAG pipeline.

Fetch email content as Markdown
curl "https://inboxparse.com/api/v1/threads/{id}?format=markdown" \
  -H "Authorization: Bearer ip..."

# content.markdown field in the response:
{
  "data": {
    "messages": [
      {
        "content": {
          "markdown": "Hi Sarah,\n\nI wanted to follow up on the proposal we sent over last Tuesday.\n\n**Key points we discussed:**\n\n- Pricing for 500 seats\n- Custom onboarding\n- SLA requirements (99.9% uptime)\n\nLet me know if you need anything else.\n\nBest,\nMark"
        }
      }
    ]
  }
}

LLM-optimized output

HTML noise like tracking pixels, unsubscribe links, and repeated boilerplate are stripped. Only the signal.

Structure preserved

Tables, bullet lists, bold/italic, links - converted faithfully to Markdown. Not flattened to plain text.

Token-efficient

Average 60–80% token reduction vs passing raw HTML directly to an LLM. Saves cost at scale.

One query parameter

Add ?format=markdown to any thread or message request. No extra endpoints. No config.

Full thread context

Get the entire conversation as Markdown in a single call. Your agent reads the thread, not individual fragments.

Encoding & charset handled

UTF-8, quoted-printable, base64, multipart - we decode everything so you don't have to.

Use the markdown output in your LLM prompt

Copy-and-paste ready. No boilerplate.

Use the markdown output in your LLM prompt
import OpenAI from "openai"

const client = new OpenAI()

// 1. Fetch the email thread as Markdown
const res = await fetch(
  "https://inboxparse.com/api/v1/threads/thread_01jxxx",
  { headers: { Authorization: "Bearer ip..." } }
)
const { data } = await res.json()

// 2. Collect markdown from all messages in the thread
const threadMarkdown = data.messages
  .map((m) => `**${m.from}** (${m.date}):\n${m.content.markdown}`)
  .join("\n\n---\n\n")

// 3. Send to your LLM
const completion = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [
    {
      role: "system",
      content: "You are a helpful email assistant. Summarize and suggest a reply.",
    },
    {
      role: "user",
      content: threadMarkdown,
    },
  ],
})

console.log(completion.choices[0].message.content)

Frequently asked questions

How much does Markdown conversion reduce token usage?+

On average, InboxParse's Markdown output uses 60-80% fewer tokens compared to passing raw HTML to an LLM. This translates directly to lower API costs at scale.

Does the conversion preserve tables and lists?+

Yes. HTML tables are converted to Markdown tables, ordered and unordered lists are preserved, and formatting like bold, italic, and links are faithfully converted. The structure of the original email is maintained.

What gets stripped from the HTML?+

Tracking pixels, unsubscribe footers, repeated boilerplate, CSS styles, and invisible elements are removed. Only the meaningful content of the email is kept in the Markdown output.

Less noise. More signal. Zero config.

Connect your mailbox and start getting clean Markdown in under 5 minutes.