On this page · 8 sections
TL;DR
When you copy output from ChatGPT, Claude, or Gemini and paste it somewhere, you often get literal \n characters, raw markdown syntax, and mangled formatting. This happens because LLMs output markdown, and most apps paste the raw text instead of rendering it. The fix: paste into a tool that actually understands markdown. MDHero’s LLM paste mode (Cmd+Shift+V) auto-detects escaped newlines and renders clean output instantly.
The ChatGPT paste formatting problem
You asked ChatGPT to write a project plan. It looks beautiful in the chat window — clean headings, numbered lists, bold text, maybe a code block or two. You select all, copy ChatGPT formatting and all, and paste it into Google Docs.
And then you see this:
# Project Plan\n\n## Phase 1: Research\n\n1. **Identify stakeholders**\n2. Review existing docs\n\n### Notes\n\n- Talk to engineering\n- Check the `/api/v2` endpoint\n\n```python\ndef main():\n print("hello")\n```\n
Literal \n everywhere. Raw # symbols instead of headings. Asterisks around words instead of bold text. Code blocks that look like inline text with triple backticks just sitting there.
You sigh. You start find-and-replacing \n with actual newlines. You strip the markdown syntax by hand. Twenty minutes later, you have something passable.
This happens to millions of people every day and there’s a reason for it.
Why does this happen?
LLMs generate their responses as markdown text. When you see nicely formatted output in ChatGPT or Claude’s web interface, you’re looking at markdown that has been rendered by the browser into HTML — headings, bold text, code blocks, and all.
When you copy that output, what lands on your clipboard depends on the app and what it puts there. Sometimes you get the rendered HTML. Sometimes you get the raw markdown source. And sometimes — especially when copying from API responses, JSON output, or certain chat interfaces — you get a string where newlines have been escaped as literal \n characters. This is because the text was serialized as a JSON string at some point, and the escaping was never undone.
Your destination app (Google Docs, Notion, Slack) receives this raw text and has no idea it’s markdown. It just dumps it in as-is.
Where this breaks (everywhere)
The formatting problem isn’t limited to one app. It’s a spectrum of bad:
Google Docs pastes the raw markdown as plain text. Headings show as # Title. Bold shows as **word**. Code blocks are indistinguishable from regular text. If the clipboard contained escaped newlines, you get those too — a wall of text with \n scattered through it.
Microsoft Word does slightly better if you paste the HTML version (Ctrl+Shift+V sometimes helps). But if the clipboard only has plain text, you’re back to raw markdown. And Word’s “smart quotes” feature will helpfully turn your backticks and dashes into curly quotes and em-dashes, breaking any code snippets.
Notion actually renders some markdown on paste — headings and bold usually work. But code blocks often don’t survive the trip. And if there are escaped \n characters in the text, Notion treats them as literal characters, not line breaks. You end up with half-rendered output that’s somehow worse than all-or-nothing.
Slack renders basic markdown (bold, italic, code) but has its own syntax rules that conflict with standard markdown. A # at the start of a line becomes a Slack channel link attempt, not a heading. Pasted code blocks often lose their language tags. Multi-level lists flatten.
Plain text editors (TextEdit, Notepad) show you exactly what’s on the clipboard — which means raw markdown syntax and escaped characters. Honest, at least, but not useful for reading.
VS Code handles the text fine as source code, but you’d need to open a markdown preview pane to actually see it rendered. That’s an extra step, and VS Code takes a few seconds to launch if it’s not already open.
The common thread: none of these apps were built to receive markdown and render it. They’re document editors, messaging apps, or code editors. Markdown paste is an afterthought, if it’s a thought at all.
The workarounds people use
Search “ChatGPT paste formatting broken” and you’ll find a cottage industry of fixes:
Manual cleanup. The most common approach. Copy, paste, then spend 5-20 minutes doing find-and-replace on \n, removing # symbols, converting ** to actual bold formatting. It works, but it’s tedious and error-prone, especially with longer outputs.
Paste into VS Code first. Open VS Code, paste the raw markdown, open the preview pane (Cmd+Shift+V), then copy from the preview into your destination app. This works if VS Code is already open and you don’t mind the extra steps. But it’s a three-step workaround for what should be a one-step action.
Web-based cleanup tools. Services like Unmarkdown ($8/month) or Format Magic (free, ad-supported) let you paste raw markdown into a web form and get rendered HTML or cleaned-up text out the other side. They work. But you’re pasting potentially sensitive AI output into a third-party website, and the subscription cost adds up if you’re doing this multiple times a day.
Browser extensions. Markdown rendering extensions for Chrome and Firefox can render pasted text, but they’re designed for local .md files, not clipboard content. Getting them to work as a paste-and-render tool requires workarounds.
Regex scripts. Developers sometimes write quick scripts — a Python one-liner or a shell alias — that processes clipboard contents and strips markdown or unescapes \n. Effective, but it’s a developer-only solution and you need to maintain it.
All of these work. None of them are pleasant. If you’ve searched for how to copy ChatGPT without markdown artifacts, or how to remove markdown from ChatGPT output, you’ve probably tried at least two. The core issue is a format mismatch between what LLMs produce (markdown) and what most apps expect (rich text or plain text). The actual solution is a ChatGPT markdown viewer — something that sits in the middle and translates. (Working with Claude instead? See reading Claude Code plans for the same idea applied to ~/.claude/plans files.)
The better approach: an LLM markdown viewer with paste mode
This is the problem MDHero was built to solve. Instead of pasting AI output into an app that doesn’t understand ChatGPT markdown and then cleaning it up, you paste it into a markdown viewer that does understand it and renders it immediately — and lets you tweak the result with a built-in editor when the AI’s output needs trimming.
Here’s the workflow:
- Copy output from ChatGPT, Claude, Gemini, or any LLM
- Open MDHero (or switch to it — it’s always lightweight enough to keep running)
- Press Cmd+Shift+V (Mac) or Ctrl+Shift+V (Windows)
- See clean, rendered markdown — headings, bold, code blocks with syntax highlighting, lists, the whole thing
That’s it. No cleanup. No find-and-replace. No pasting into an intermediate tool first.
What happens behind the scenes when you press Cmd+Shift+V:
- MDHero reads the clipboard content
- It detects whether the text contains escaped characters — literal
\n,\t, stray backslashes from JSON serialization - If it finds them, it unescapes them automatically, converting
\nback to real newlines,\tback to real tabs - It then renders the result as standard markdown with full GFM support — syntax-highlighted code blocks, KaTeX math, Mermaid diagrams, tables, task lists
The detection is automatic. You don’t need to tell MDHero whether the text came from ChatGPT’s web interface, an API response, or a JSON log file. It figures it out and does the right thing.
How different LLMs format their output
Not all AI output is created equal. Each LLM has its own formatting habits, and they cause different problems when you paste them:
ChatGPT (GPT-4o, GPT-4.5) tends to produce clean GFM markdown with generous use of headings, bold text, and numbered lists. The main issue is that when you copy from the web interface, the clipboard sometimes contains HTML (good) and sometimes contains raw markdown with escaped newlines (bad). It depends on the browser and how you selected the text. API responses always come as JSON strings with escaped characters.
Claude (Anthropic) outputs markdown that’s generally well-structured but tends to use more nested lists and longer code blocks than ChatGPT. Claude’s web interface has improved its copy behavior recently, but the API responses still come with JSON-escaped newlines. Claude also tends to use --- horizontal rules more frequently, which some paste targets misinterpret.
Gemini (Google) outputs markdown but with some quirks. It sometimes uses HTML tags mixed in with markdown syntax (like <br> for line breaks instead of double newlines). It also has a habit of using indented code blocks (four spaces) instead of fenced code blocks (triple backticks), which means some renderers don’t apply syntax highlighting.
Local models (Ollama, LM Studio, etc.) output through terminal interfaces or API calls, where the text is almost always JSON-serialized. This means every newline is \n, every tab is \t, and any backslashes in the content get double-escaped. This is the worst-case scenario for paste formatting.
MDHero handles all of these. The unescape logic doesn’t care which LLM produced the text — it looks at the content and fixes what needs fixing. Mixed HTML-and-markdown from Gemini renders correctly. Double-escaped local model output gets cleaned up. ChatGPT’s inconsistent clipboard format gets normalized.
Other tools that address this
MDHero isn’t the only tool trying to solve this problem. Here’s an honest look at the alternatives:
Unmarkdown — A web-based tool that converts markdown to clean rich text you can paste into Google Docs, Notion, or email. It’s polished and it works. The downside: it costs $8/month, it requires an internet connection, and you’re pasting your content into a third-party service. If your AI output contains sensitive information (code, business plans, private conversations), that’s worth thinking about.
Format Magic — A free web tool that does similar markdown-to-rich-text conversion. It’s ad-supported, and the rendering isn’t as thorough as Unmarkdown (code blocks sometimes lose formatting). But it’s free and it works for basic cleanup.
GPT Cleanup Tools — Various small web utilities (ChatGPT Formatter, AI Text Cleaner, etc.) that specifically target the \n escape problem. They’re free, focused, and work in a browser. They typically don’t render the markdown though — they just unescape the characters and give you back raw markdown, which you then need to paste somewhere that renders it.
Marked 2 (Mac, $14) — A native markdown previewer for macOS that can read from the clipboard. It doesn’t have specific LLM paste detection, so you’d need to manually unescape \n before pasting, but the rendering is solid.
MDHero’s advantage isn’t that it’s the only option — it’s that it’s purpose-built for this exact workflow. It’s a native desktop app (not a website), so your content never leaves your machine. It’s free. It works offline. The LLM paste detection is automatic — you don’t need to manually unescape anything or choose a conversion format. Cmd+Shift+V and you’re done. And once it’s rendered, Cmd+E flips you into a lightweight editor so you can trim AI verbosity in place, then Cmd+S writes the cleaned-up result to disk.
A workflow that actually works
Here’s what a realistic daily workflow looks like once you have a markdown viewer in the mix:
For reading AI output: Copy from ChatGPT/Claude, Cmd+Shift+V into MDHero. Read it there. If you need to share it, export or copy the rendered content.
For saving AI output: Paste into MDHero, press Cmd+E to clean up if needed (trim filler, fix a heading, drop a section), then Cmd+S to save it as a .md file. Now you have a tidy markdown file you can open anytime, version with git, or share with teammates.
For pasting into Google Docs: Paste into MDHero first to verify the formatting is clean. Then select the rendered content in MDHero and copy it — you’ll get rich text on the clipboard that Google Docs understands. Two steps instead of twenty minutes of manual cleanup.
For code review: When an LLM gives you code suggestions, paste into MDHero to see the code blocks with proper syntax highlighting. It’s easier to read def calculate_tax(income: float) with Python highlighting than as raw text with backticks.
The pattern is simple: make MDHero the first stop for any AI output you copy. It takes two seconds and saves you from the formatting mess every time.
Why this problem isn’t going away
You might expect ChatGPT and Claude to eventually fix their copy-paste behavior so this problem disappears. Maybe they will. But there are structural reasons it persists:
- API responses will always be JSON-serialized. If you’re building with LLM APIs, or using tools that call them, the output comes as JSON strings. That means escaped newlines. Always.
- Clipboard formats are a mess. Different browsers, different operating systems, and different text selection methods all produce different clipboard content. There’s no standard for “copy this as markdown.”
- Destination apps will never all agree. Google Docs, Notion, Slack, and Word each have their own paste interpretation logic. Even if ChatGPT puts perfect HTML on the clipboard, some destination app will mangle it.
The reliable fix is a tool in the middle that speaks markdown natively. That’s what an LLM markdown viewer like MDHero is for — not as a workaround, but as the right tool for copying ChatGPT to Google Docs and everywhere else without losing formatting.
MDHero is free, works offline, and available for Mac and Windows. If you paste AI output more than once a week, give it a try. See also our best markdown viewers comparison for more options.