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
No file chosen yet.
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.
-
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).
-
Paste it into the converter
Formatting becomes Markdown as you paste, and
<grok:render>tags left in the text are removed. -
Copy or download the Markdown
Choose how math and web citations should look, then copy the result or download it as a .md file.
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.
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.
-
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.
-
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.
-
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.
-
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.
| Leftover | What it is | What the converter does |
|---|---|---|
<grok:render type="render_inline_citation"> | A citation, with the number of a search result inside | Removes the whole tag, with the space before it. |
Other <grok:…> tags | Other parts Grok’s app draws for you | Removes them. |
| Cited web pages in the export | The pages Grok used, stored with each answer | Adds 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 Grok | Markdown you get | Good to know |
|---|---|---|
| Headings | ## Heading | Every 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. item | Nested lists keep their indent. Checklists become - [x] and - [ ]. |
| Code blocks | A fenced block named with its language, such as python | Blank lines in the code are kept. |
| Tables | | Tool | Price | and a | --- | row | Right 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 sources | Sources: [Page title](https://…) under the answer | From your export. Or removed, if you choose Remove. |
| Who said what | ## You and ## Grok | Added 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
- Citations, xAI Docs
- Advanced formatting syntax, Obsidian Help
- GitHub Flavored Markdown Spec, GitHub
More documents tools
- Convert ChatGPT to Markdown Converter Turn ChatGPT answers or your whole export into clean Markdown files. Open tool
- Convert DeepSeek to Markdown Converter Turn DeepSeek answers or your whole export into clean Markdown files. Open tool
- Convert Claude to Markdown Converter Turn Claude answers or your whole Claude export into clean Markdown files. Open tool
- Count Line Counter Count total, blank and duplicate lines in text, lists, code or CSV. Open tool