Screenshots of a long ChatGPT answer are blurry and cut off, and they cannot be edited. The answer itself is almost always Markdown, so the cleaner route is to copy it as text and convert it. I run small browser converters for this, so I tested what actually comes out instead of describing what should.

I pasted one sample reply into the live ChatGPT to HTML and Markdown to HTML pages using Playwright and Chrome 156, then read the generated HTML. The two pages use the same renderer, the marked library with GitHub-flavored Markdown on. The ChatGPT page differs only in its copy and its download name.

The sample

# Quarterly notes  Certainly, here is the summary: | Region | Q1 | Q2 | |---|---|---| | North | 12 | 15 | | South | 9 | 11 | - [x] Draft - [ ] Review ```python def total(xs): return sum(xs) ```  The formula is $E = mc^2$ and the claim is cited 【1†source】. Raw tag: <b>inline bold</b> and <img src="x"> 

What came out

  • The table became a real <table> with <thead> and <tbody>. This is the part that usually breaks when you paste a chat reply into a CMS, so it is the first thing to check.
  • The task list became list items with disabled checkboxes: <input checked="" disabled="" type="checkbox">. If your destination strips <input>, you will lose the boxes.
  • The code fence became <pre><code class="language-python">. There is no syntax highlighting in the converter. If your CMS removes <pre>, keep the Markdown source and let the CMS render it.
  • The LaTeX stayed as the literal text $E = mc^2$. Nothing here typesets math.
  • The citation marker 【1†source】 stayed as plain text. It is chat-interface leftover, so delete it before you convert.
  • "Certainly, here is the summary:" stayed too. The converter does not know it is chatter. Delete lines like that first.
  • Images from the chat do not come along. An image is included only if the reply contains a public URL for it.

The download button wraps the fragment in a minimal HTML document with a small stylesheet, so the file is readable on its own. "Copy HTML" copies only the fragment, with no CSS. Use the fragment for a CMS and the file for something you will open in a browser.

What happens to raw HTML

The last line of the sample is the one I re-checked after the page added a sanitizer. The converter now runs the HTML through DOMPurify 3.2.6 after marked parses it. A complete tag that sits on one line is also escaped first, so in the preview the line came out as literal text: Raw tag: <b>inline bold</b> and <img src="x">. There was no bold node, no image node, and the page title did not change.

A tag that is split across a line break can still be parsed as HTML, because that first escaping step only looks for a complete tag on one line. I pasted <img src=x, then a newline, then onerror=alert(1)>. The preview became <p><img src="x"></p>: the image node was there, but the onerror handler was stripped, and no dialog ran. Markdown to HTML, the Markdown editor, and the two PDF pages behaved the same way.

So a pasted snippet cannot run script on this page. That is not the same as "every tag is shown as text." Leftover markup can remain if the tag was split. Convert text you trust anyway, and read the output before you publish it, because the HTML may still contain tags you did not intend to keep, just not event handlers.

If you build something similar, put a sanitizer between the renderer and innerHTML. This page now does that.

Getting a PDF

There is no server-side PDF generator. ChatGPT to PDF renders the reply as Markdown, then opens the browser's print dialog, where you choose "Save as PDF". The editor and the site header are hidden for printing. I printed a short sample in headless Chrome; the heading and the body were in the PDF, not a blank page. That is a deliberate choice: a PDF library running in the page tends to break long documents across pages badly, and printing uses the layout you just looked at.

Things to know before you rely on it:

  • Long replies can split a code block across two pages. That is the browser's page break, not a corrupt file.
  • Turn off the browser's own header and footer in the print dialog if you want a clean page. The page does not add page numbers.
  • LaTeX is printed as raw text, as above. Images appear only when the reply has an image URL.
  • Whatever the print preview shows is what you get, so look at the preview before you save. I would check the table and the code block specifically.

Reading and editing first

If you want to read a .md file with headings and lists instead of raw asterisks, the Markdown Viewer opens a .md, .markdown or .txt file with the browser's file API and renders it. Images show only if the Markdown points at a URL the browser can load, so a path on your disk will not resolve. To change the text before converting, use the Markdown Editor, which has copy and download buttons. And if you cannot remember a syntax detail, the Markdown cheatsheet has the source-and-result table.

What stays on your machine

These pages do not call ChatGPT, need no account, and do not send what you paste to OpenAI or to the site's server. The page still has to download its own scripts, so this is not an offline workflow, and the site is ad-supported.

The short version

  • Copy the reply as text, not a screenshot, and delete the "Certainly, here is..." line and any citation markers.
  • Tables, task lists and fenced code convert. LaTeX does not typeset.
  • Raw HTML is sanitized, so a pasted tag cannot run in the page. A complete tag on one line shows up as text. Read the output anyway.
  • For PDF, preview first, and check the table and the code block before you save.

Disclosure: I run PC Tools Online, the site linked above. Happy to answer implementation questions in the comments.

AI assistance: I used an AI assistant to help run the tests and draft this article. The HTML described above was read from the live pages in headless Chrome 156, including a later re-check after the sanitizer was added.