Browser extension trims document tokens before sending them to AI

Diffsurge MD is a free that converts PDF, Excel, and DOCX files into clean Markdown before passing them to ChatGPT, Claude, or DeepSeek. When a file is dropped into a chat, the extension intercepts it and starts a Python environment inside the browser to perform the .

It packages Microsoft’s MarkItDown library with Pyodide and , so no document is sent to an outside server. In the developer’s example, a typical PDF fell from about 30,000 tokens to 8,000.

The claimed reduction comes from removing hidden metadata, layout clutter, and other content that consumes the AI’s without helping the analysis. The project is under the .

Key points

  • Files are converted to Markdown before they reach the AI chat.
  • The developer reports reducing one typical PDF from about 30,000 tokens to 8,000.
  • All in the browser, with no files sent to an outside server.
  • The extension works with to ChatGPT, Claude, and DeepSeek.
  • It supports PDF, Excel, and DOCX files and uses the .

Sources covering this story (2)

Read original