Grok to Markdown Converter

This Grok to Markdown converter turns Grok answers and whole chats into clean Markdown. Paste a reply, or upload your xAI data export to save every Grok chat as a .md file. Tables, code and math are kept, and leftover <grok:render> citation tags are removed.

  • Paste or upload your export
  • Stays on your device
Use the copy button under a Grok answer, or select the chat and press Ctrl+C (⌘+C on a Mac). Markdown you paste is cleaned too.

Markdown options
Math formulas
Web citations

How to convert Grok to Markdown

Saving a Grok answer as Markdown takes three steps, on grok.com, in the Grok app or in X.

  1. Copy from Grok

    Click the copy button under an answer, or select part of the chat or the whole conversation and press Ctrl+C (⌘+C on a Mac).

  2. Paste it into the converter

    Formatting becomes Markdown as you paste, and <grok:render> tags left in the text are removed.

  3. Copy or download the Markdown

    Choose how math and web citations should look, then copy the result or download it as a .md file.

Example

This sample has 3 <grok:render type="render_inline_citation"> tags, each with a citation number inside. The converter removes all 3, with the space before them, and keeps the table and the formula.

Convert a Grok answer with render tags

Grok to Markdown converter features

One tool for a single answer or your whole Grok history. Grok has no export button for a single chat; this fills the gap.

  • 2

    Paste or upload

    Convert one answer, a whole chat, or every chat in your xAI data export.

  • </>

    No render tags

    <grok:render> citation tags are removed from pasted and exported text.

  • [ ]

    Sources as links

    In an export, the web pages Grok cited are added under each answer as links.

  • .md

    Files or one document

    Download chats as separate .md files in a .zip, or together as one Markdown file.

How to export all your Grok chats to Markdown

Grok only exports your whole xAI account at once. That download converts here, and you pick the chats you want.

  1. Request your data

    On grok.com, open Settings → Data Controls and choose Export Account Data, or go to accounts.x.ai/data and click Download under Download account data.

  2. Download the .zip

    xAI prepares the archive and emails you when it’s ready. Your chats are in a file called prod-grok-backend.json, a few folders deep.

  3. Drop it into the converter

    Choose Upload export and drop the .zip, or prod-grok-backend.json on its own. It’s read in your browser, not uploaded.

  4. Pick chats and download

    Search your chat titles, tick the ones you want, and download them as .md files in a .zip, or as one .md file.

What is <grok:render> in Grok text?

Grok writes some parts of its answers as tags, which its app turns into source links and other elements. The app shows the result, but the tags can stay in the raw text: in your data export, and in text copied or passed on from it.

LeftoverWhat it isWhat the converter does
<grok:render type="render_inline_citation">A citation, with the number of a search result insideRemoves the whole tag, with the space before it.
Other <grok:…> tagsOther parts Grok’s app draws for youRemoves them.
Cited web pages in the exportThe pages Grok used, stored with each answerAdds them under the answer as Sources: links, or leaves them out with Remove.

The numbers in the tags refer to search results that only Grok sees, so they’re not turned into links one by one.

What the converter turns into Markdown

Everything Grok shows in an answer has a Markdown equivalent. This is what you get for each part.

In GrokMarkdown you getGood to know
Headings## HeadingEvery level is kept, from # to ######.
Bold, italic, strikethrough**bold**, *italic*, ~~struck~~Asterisks that are part of the text are escaped, so they don’t turn into formatting.
Bulleted and numbered lists- item, 1. itemNested lists keep their indent. Checklists become - [x] and - [ ].
Code blocksA fenced block named with its language, such as pythonBlank lines in the code are kept.
Tables| Tool | Price | and a | --- | rowRight and centre alignment are kept, and a | inside a cell is escaped.
Math (formulas)$x^2$ and $$…$$, or \(x^2\) and \[…\]Your choice. The LaTeX is kept as Grok wrote it.
Links[text](https://…)Only web and email links are kept.
Web sourcesSources: [Page title](https://…) under the answerFrom your export. Or removed, if you choose Remove.
Who said what## You and ## GrokAdded in every exported chat.

What’s included when you convert a Grok export

Your xAI export keeps every chat in one file, prod-grok-backend.json, with each message stored separately. The converter rebuilds the chats:

  • Messages are put in order, and when you retried an answer, the converter follows the newest version.
  • Each chat keeps its title and its start and last-change dates, which go in the YAML front matter with the model name.
  • Grok’s thinking and its tool steps are left out, as they aren’t part of the chat you read. Images aren’t in the file.

Chats you deleted before the export aren’t included.

Save Grok chats in Obsidian, Notion or GitHub

Markdown opens in almost any notes app, so a converted chat stays readable long after you stop using Grok.

  • Obsidian: download your chats as a .zip, unzip it into your vault and keep YAML front matter turned on. Each note then starts with its title, dates, model and conversation ID, which Obsidian shows as properties you can search.
  • Notion: use Notion’s import, choose Markdown and pick the .md files. Each file becomes a page.
  • GitHub and VS Code: the files use GitHub Flavored Markdown, with tables, task lists and fenced code, and math in $ form renders on GitHub.

Exported files are named with the chat’s date and title, such as 2026-03-12 Trip ideas.md, so they sort by date.

Grok to Markdown FAQ

What is <grok:render> in Grok answers?

It’s a tag Grok uses for parts its app draws, such as a citation to a web result. You don’t see it on grok.com, but it can stay in exported or copied text. The converter removes it.

Can I export a single Grok chat?

Grok has no export button for one chat. Copy the chat and paste it here, or export your account data and tick only the chats you want before you download.

How do I export my Grok chat history?

On grok.com, go to Settings → Data Controls → Export Account Data, or visit accounts.x.ai/data and click Download. Upload the .zip here when it arrives.

What is prod-grok-backend.json?

The file in your xAI export that holds your Grok chats. The converter reads it straight from the .zip, or on its own if you’ve unzipped it.

Are the sources Grok cited included?

Yes, in an export: the web pages Grok cited are added under each answer as links. Choose Remove to leave them out.

Does it include Grok’s thinking?

No. The converter keeps the answers you read, not the reasoning steps or tool runs stored with them.

Why don’t Grok formulas show in Obsidian?

Obsidian reads $…$ and $$…$$. Keep the $ option selected and the converter changes other delimiters without touching the formula.

Does it work with other chatbots?

Yes. Pasting works with formatted text from most sites. For ChatGPT and DeepSeek exports, use the [ChatGPT to Markdown converter](tool:chatgpt-to-markdown-converter) or the [DeepSeek to Markdown converter](tool:deepseek-to-markdown-converter).

Are my chats uploaded or saved?

No. The converter runs in your browser. Pasted text and export files are read on your device and never sent to our server.

Sources and references

  1. Citations, xAI Docs
  2. Advanced formatting syntax, Obsidian Help
  3. GitHub Flavored Markdown Spec, GitHub