How to copy-paste Gemini (and ChatGPT) Chats to Blogger posts without CSS bloat

Last updated on 8 Mar 2026

Summary

Step   Action Tool
1 Copy Raw Markdown   Gemini Response Copy Button
2 Convert to HTML MarkdownToHTML.com
3 Escape Brackets Manual Edit (e.g., < to &lt;)
4 Validate Syntax VS Code / Prettier
5 Publish Blogger (HTML View)

Note that for user messages, Gemini Copy button seems to put only plain text (not markdown) on the clipboard. Plain text may be directly added to Compose window of Blogger which handles conversion to HTML, including conversion of line breaks in plain text.

Quite surely, the same approach given above should work for ChatGPT too.

==========================================================
==========================================================

Details

The Problem: The "Rich Text" Trap

When you copy directly from Gemini AI interface and paste into the Blogger "Compose" view, you aren't just pasting text. You are pasting inline CSS, specific fonts, and complex div structures. This bloats the post by a huge amount and makes the post difficult to edit later as Blogger UI takes time to respond to keystrokes. Also, updating (saving) the post to Blogger takes much more time.

The Solution: The Markdown-to-HTML Pipeline

Step 1: Capture the Source

Use the "Copy" button at the top of your/user messages and bottom of Gemini messages to capture each message. Don't paste this into Blogger post Compose window as that causes all the CSS of Gemini responses to be copied, resulting in huge bloat.

Tip: If your/user message contains "naked" brackets like <entry>, that may trip up the markdown to HTML converter. Escape such brackets either by &lt;entry&gt; or by `<entry>`. Note that Gemini messages having such data is usually escaped in the 'Copy' markdown.

Step 2: Convert to Clean HTML

Use markdowntohtml.com online utility.

  1. Paste the copied message (user or Gemini) into the left Markdown pane. It will show the copied message in Markdown code.
  2. The right pane will generate standard HTML tags (<p>, <ul>, <code>).

Step 3: Validation (The Pro Step)

If the chat message is long or if, in step 4, Blogger complains about invalid HTML, paste the generated HTML into VS Code.

  • Run the Format Document command (Shift + Alt + F).
  • If you use the Prettier extension, it will instantly flag syntax errors—such as "Unexpected closing tag" giving the line and column numbers of the error—allowing you to fix invalid HTML caused by broken tags.

Step 4: Import to Blogger

  1. Open your Blogger post editor.
  2. Switch from "Compose View" to "HTML View" via the pencil/bracket icon in the top left.
  3. Paste your cleaned, validated HTML here.
  4. Switch back to "Compose View" and verify the rendering. Note that if Blogger finds that the changes made have resulted in the HTML being invalid, it will show a warning message about it and seeking confirmation to switch to Compose view and potentially lose some changes. Do not ignore such warning messages. Instead, cancel the switch to compose view and do step 3 above of identifying and fixing the HTML error. After that you can try this step 4 again with the fixed HTML.

Notes

  1. Pasting Gemini response markdown code to Blogger 'Edit HTML' window does not auto-convert markdown to HTML. It simply pastes the markdown code which then does not render as wanted.
  2. In Gemini chat, pasting user message with Copy button for user message seems to put only plain text on the clipboard.
    • Plain text without line breaks inserted in left markdown pane of markdowntohtml.com gets converted correctly to HTML (enclosed in paragraph element). However line breaks in plain text do not get converted to line breaks in HTML.
    • A simple solution is to paste the plain text in Blogger Compose window which will handle plain text to HTML conversion.
    • If markdowntohtml.com has to be used,  https://euangoddard.github.io/clipboard2markdown/ utility can be used to convert such plain text to markdown (with line breaks in markdown) which can then be used in left markdown pane of markdowntohtml.com to get correct HTML with each line being made a separate paragraph.
  3. I used the process outlined here to create the main content of my recent post: Fixing Gemini chat to Blogger Compose post copy-paste causing 1.5 MB post size bloat due to unnecessary CSS. It worked very well.
  4. You may use scrape-blogger-post utility to download the published blog post and confirm downloaded HTML size is in low hundreds of KB or even less than a hundred KB. If the post size is 500 KB or greater then check it manually for CSS bloat.
  5. Quite surely, the same approach given above for Gemini chat messages should work for ChatGPT too. I have noted that ChatGPT's Copy button for its responses also provides markdown when pasted into a suitable destination like markdown pane of markdowntohtml.com utility.

Comments