How to Strip AI Formatting for Clean Gmail Replies
How to Strip AI Formatting for Clean Gmail Replies - Practical tips from the PasteClean team.

You’ve seen it. You receive an email that looks normal until paragraph three, where suddenly the text background turns a faint shade of gray, the font switches from Sans Serif to a specific version of Roboto, and the line height tightens up uncomfortably. That visual glitch screams one thing to your recipient: you didn’t write this, an AI did, and you didn't care enough to fix the formatting before hitting send.
The Anatomy of the "Gray Box" Problem
To understand how to strip AI formatting effectively, you need to understand what you are actually copying. When you highlight text in ChatGPT, Claude, or Gemini, you aren't just grabbing characters. You are grabbing a complex DOM (Document Object Model) structure.
Most LLM interfaces render their output using Markdown, which the browser then translates into HTML for you to read. When you copy that output, you are copying inline CSS styles attached to <div> and <span> tags.
Specifically, you are often copying:
- Background-color attributes: That tell-tale
#f7f7f8(light gray) or dark mode hex codes. - Font-family stacks: AI interfaces often force specific fonts like
Söhne,Segoe UI, orRobotorather than inheriting the email client's default. - Semantic inconsistencies: What looks like a bullet point might actually be a special Unicode character rather than an HTML
<li>tag, confusing Gmail’s rendering engine.
Gmail is particularly sensitive to this because its composer utilizes a contenteditable element that tries to preserve source fidelity. It assumes if you copied a background color, you wanted that background color.
Why Plain Text (Ctrl+Shift+V) Isn't the Answer
The standard advice from most tech blogs is simple: "Just paste as plain text." On Windows, that’s Ctrl+Shift+V; on Mac, it’s Cmd+Shift+V. While this effectively removes the gray background and font issues, it introduces a new productivity killer: the loss of semantic structure.
When you paste as plain text, you strip everything.
- Bold emphasis meant to highlight key metrics disappears.
- Italics used for book titles or nuances vanish.
- [Hyperlinks] are converted into raw, ugly URL strings that break the flow of reading.
- Headers become normal text, indistinguishable from the body.
You are then forced to spend 2-3 minutes manually re-bolding headers, re-linking URLs, and fixing list indentation. If you are processing 50 emails a day, that manual reconstruction destroys the time savings the AI gave you in the first place. You need a middle ground: you want to keep the structure (bold, links, lists) but discard the styling (fonts, colors, backgrounds).
Pro Tip: If you absolutely must use plain text pasting, use Markdown syntax in your prompt (e.g., "Draft this using asterisks for bullet points"). It won't render as a list in Gmail, but at least the structure will be readable.
How Gmail Handles Incoming HTML
Gmail’s rendering engine is notoriously fickle. Unlike a web browser which follows strict W3C standards, email clients are stuck in the mid-2000s regarding HTML support.
When you paste AI-generated text directly into a Gmail reply, Gmail attempts to "sanitize" the code, but it often fails to strip the background-color CSS property. Furthermore, if you are in Dark Mode on your OS but the recipient is in Light Mode, the pasted text might carry over dark-mode specific styling (white text), resulting in white text on a white background for your recipient.
This is why AI email cleanup is critical. You aren't just fixing aesthetics; you are ensuring accessibility and readability across different devices and viewing modes.
The Manual Cleanup Workflow (And Why It Fails)
If you don't use a dedicated tool, here is the typical workflow required to clean text in Gmail while preserving links:
- Paste the AI text into Gmail.
- Highlight the text block.
- Click the "Remove Formatting" button (the struck-through 'T' icon).
- Issue: This often resets the font size to something inconsistent with your signature.
- Manually re-select the font (usually Sans Serif) and size (Normal).
- Check for "ghost" background colors (sometimes the Remove Formatting button misses nested
<span>tags).
This process is error-prone. It’s easy to miss a spot, and the "Remove Formatting" button in Gmail is aggressive—it often strips hyperlinks, putting you back at square one.
Using PasteClean as a Bridge
This is where a specialized clean text tool like PasteClean fits into the stack. The goal is to sanitize the HTML before it hits the Gmail composer.
When you run text through PasteClean, the tool performs a specific set of operations:
- Parsing: It reads the clipboard data as HTML.
- Filtering: It identifies semantic tags (
<b>,<strong>,<i>,<em>,<a>,<ul>,<li>,<table>) and whitelists them. - Stripping: It aggressively removes all
style="..."attributes,classnames, andspantags that carry font or color data. - Normalizing: It ensures lists are actual HTML lists, not just paragraphs starting with dots.
By using this intermediary step, you can paste the result into Gmail, and it will inherit Gmail's default styling (font and size) while retaining the bolding and links you actually want.
Before and After: A Concrete Example
Let’s look at a specific example of an AI output and how it translates to Gmail.
The AI Output (Raw Paste):
The text appears in the font Söhne size 14px. There is a dark gray background (#2d2d2d) behind the text block because you copied it from ChatGPT in dark mode. The headers are bolded but look massive compared to your email signature.
The PasteClean Result:
The text adopts Gmail’s default Sans Serif font. The background is transparent (matching your email body). The headers remain bold, and the bullet points are properly indented using Gmail’s native list styling. The hyperlinks are active and clickable, but blue (standard) rather than the AI’s specific link color.
Dealing with Nested Lists and Tables
One of the biggest headaches when you try to strip AI formatting is dealing with complex structures like nested lists or data tables.
AI models love to output nested lists (bullets within bullets). When pasted directly into Gmail, the indentation often breaks. You end up with a flat list where the sub-points look like main points, confusing the reader.
The Table Problem
Tables are even worse. AI tables often come with thick borders and specific cell shading. When pasted into Gmail:
- Outlook Web: Often renders the table as a non-editable image or a broken grid.
- Gmail: Often collapses the table borders, making the data unreadable.
A robust workflow requires stripping the table CSS while keeping the <table>, <tr>, and <td> structure intact. This allows Gmail to apply its own default table styling, which is minimal but readable.
Step-by-Step: The Clean Reply Workflow
To maximize efficiency, stop treating the cleanup as an afterthought. Make it part of the transfer process.
- Generate: Create your draft in ChatGPT or Claude.
- Copy:
Ctrl+C/Cmd+Cthe output. - Bridge: Open PasteClean (keep it pinned in a tab). Paste the text.
- Process: The tool automatically strips the junk CSS.
- Transfer: Copy the cleaned text.
- Finalize: Paste into your Gmail reply.
This adds roughly two seconds to your workflow but saves minutes of formatting repair.
Insight: Consistency builds trust. If your email starts with 11pt Arial, switches to 12pt Roboto for the AI section, and ends with 10pt Verdana in the signature, it signals a lack of attention to detail.
Mobile Considerations: The iOS/Android Trap
If you are handling Gmail replies on mobile, the situation is stickier. Mobile operating systems are aggressive about retaining formatting on the clipboard to support "rich text" across apps.
If you copy from the ChatGPT app and paste into the Gmail app on iOS, you will almost always get the background color artifact.
The Fix: On mobile, the "Paste as Plain Text" option is often hidden deep in context menus or unavailable entirely. Using a browser-based cleaning tool is often the only way to strip the formatting without resorting to pasting the text into the Notes app first (which is a tedious extra step).
Handling "Hallucinated" Formatting
Sometimes AI doesn't just format with CSS; it formats with "hallucinated" structural elements. For example, using code blocks for emphasis.
- The Issue: The AI puts a key sentence inside a code block (triple backticks).
- The Result: In Gmail, this renders as a monospace font in a distinct box, looking like you are sending lines of Python code to a marketing client.
When you strip AI formatting, you must ensure that <pre> and <code> tags are converted to standard paragraph text unless you actually intend to send code. PasteClean handles this by unwrapping the text from the code block tags, leaving you with a clean sentence.
Checklist for a Perfect AI-Assisted Email
Before you hit send, run this mental diagnostic:
- [ ] Font Check: Does the AI text match my signature font?
- [ ] Background Check: Is there a faint gray box behind the text? (Highlight the text to check—sometimes it's subtle).
- [ ] Link Check: Are the links blue and clickable, or black text that isn't active?
- [ ] Size Check: Is the font size consistent throughout the entire thread?
Conclusion
Using AI to draft emails is smart; letting the AI dictate your formatting is sloppy. The goal of using these tools is speed, but sending a messy email often results in follow-up questions or a loss of professional credibility that slows you down in the long run.
By understanding the technical reasons why formatting breaks—specifically the conflict between browser-rendered Markdown and email client HTML—you can take control of your inbox. Use a clean text tool to strip the junk code while keeping the value, and ensure your Gmail replies look as polished as if you typed every character yourself.
Clean your AI text instantly
Paste text from ChatGPT, Claude, or any AI tool and get clean, email-ready formatting in one click.
Try PasteClean Free