How to keep math, code and images when you export Grok
Your exports keep losing fidelity — formulas doubled or turned to raw LaTeX, code stripped of formatting, images simply gone. Here is why each one breaks, and how to keep them all intact.
Math, code and images break for three different reasons — doubled MathML, lost formatting, and cross-origin images that can't be screenshotted. The free Grok to PDF Chrome extension handles all three: open your chat on grok.com, click Export, and pick PDF, Word or Markdown. Formulas render once, code stays selectable, and images are embedded so they show offline.
Grok's best answers are also the hardest to save. The moment a reply has a derivation, a code block, or a generated diagram, the usual save methods start dropping pieces. A formula appears twice. A clean code block turns into a wall of unindented text. An image is missing entirely. Three different failures, three different causes — and none of them is your fault.
Here is what actually breaks, why, and how a proper export keeps each one.
The three things that usually break — and why
1. Math doubles or turns to raw LaTeX
This is the most common one. Grok renders math with KaTeX, and KaTeX deliberately emits two copies of every formula: a visible HTML version you see on screen, and a hidden MathML version meant for screen readers. On the page you only ever notice one. But a naive "print to PDF" doesn't know the second copy is supposed to be invisible, so it prints both — and every integral, matrix and inline symbol shows up twice in a row.
Copy-paste has the opposite problem: it often grabs the underlying source instead of the rendered formula, so you end up with raw \int_0^1 x^2 \, dx sitting in the middle of your document instead of a typeset integral.
2. Code loses its formatting
Code blocks look right on Grok because of structure — monospaced font, preserved indentation, line breaks in the right places. Copy that block into a word processor and most of that structure is thrown away: the font reverts, the indentation collapses, and a tidy function becomes one run-on line. The code is technically still there, but it's no longer readable as code, and pasting it back into an editor means fixing it by hand.
3. Images vanish
Grok's generated images and diagrams are served from a different origin than the chat page itself. That matters more than it sounds. When a tool tries to capture the page by drawing it onto a canvas or taking a screenshot, the browser marks anything cross-origin as tainted for security reasons — and refuses to export it. So the capture either errors out or silently leaves a blank where the image was. The picture you can clearly see on screen never makes it into the file.
How a proper export keeps each one
A real export doesn't screenshot the page — it reads the rendered conversation and rebuilds it as a document. That single difference fixes all three problems:
Math: only the visible KaTeX form is read, so each formula renders once and cleanly — no doubled MathML, no broken glyphs, no raw LaTeX. Code: blocks keep their monospacing and structure, and the text stays selectable and copyable. Images: each generated image is fetched and embedded as data, so it appears even when you open the file offline.
This is exactly what Grok to PDF does. It handles the KaTeX double-render and the cross-origin image problem for you, and it produces real, selectable text you can search and copy — not a flat picture of the chat.
Do it right: a clean export
- Install the extension Add Grok to PDF from the Chrome Web Store. It's free, needs no account, runs entirely on your machine, and stays idle until you open Grok. Works in Chrome and Chromium browsers like Edge and Brave.
- Open the full conversation Go to grok.com and open the chat. Scroll to the bottom so every message — and every generated image — has had a chance to load.
- Click Export and pick a format Use the Export button at the top-right of the conversation. Choose PDF, Word (.docx) or Markdown — or all three at once. The extension reads the rendered page, so the math and images come along.
- Open and verify The file lands in your downloads. Open it and run the quick check below before you share or attach it.
Quick verify checklist
Thirty seconds confirms the export kept everything:
- Each formula renders once — no formula repeated back to back, and no stray
\or raw LaTeX in the text. - Code is selectable — you can click into a code block and drag-select the text; indentation and line breaks are intact.
- Images are present offline — turn off your connection, reopen the file, and every generated image and diagram still shows.
- Text is real text — you can search and highlight words, because the document isn't a screenshot.
Exporting a whole project? Select several chats and merge them into one document, or batch them into a ZIP. Each file keeps the same clean math, formatted code and embedded images.
Is it private?
Yes. Grok to PDF runs entirely in your browser. There's no server to send your conversation to and no account to create — the extension reads the page you're already looking at, fetches and embeds the images locally, and builds the file on your own machine. Nothing is uploaded. It's also not affiliated with xAI.
FAQ
Why does Grok math show up twice in my PDF?
Grok renders math with KaTeX, which outputs both a visible HTML formula and a hidden MathML copy for screen readers. A naive print-to-PDF prints both, so every formula appears twice. Grok to PDF reads only the visible form, so each formula renders once and cleanly.
Do Grok's generated images export?
Yes. Grok's generated images are cross-origin, so a screenshot or canvas grab of them is tainted and fails. Grok to PDF fetches each image and embeds it as data, so it shows in the file even when you open it offline.
Does code keep its formatting?
Yes. Code blocks keep their monospacing and structure, and the text stays selectable and copyable — unlike copy-paste into a document, which usually flattens the layout into one run-on block.
Export Grok with the math, code and images intact
Free Chrome extension. PDF, Word & Markdown. Runs locally — nothing uploaded.