GPT Cleanup

ChatGPT Space Remover

ChatGPT Space Remover is a free tool that removes the extra spaces ChatGPT leaves in copied text: double spaces, non-breaking spaces (U+00A0), zero-width spaces (U+200B, U+200C, U+2060, U+FEFF) and, if you want, the blank lines between paragraphs. It keeps U+200D only where it joins an emoji. Works on text from ChatGPT, Claude, Gemini, PDFs, web pages or code. Paste, click Clean, copy; nothing leaves your browser.

Free · No sign-up · 100% client-side · Works with text from any source

Removes hidden characters, non-breaking spaces, double spaces and trailing spaces.
Original Text
Cleaned Text

Three Kinds of "Extra Space" in ChatGPT Text

Non-breaking spaces. ChatGPT's interface substitutes U+00A0 for a normal space inside list items, after numbers and around inline code. They look like spaces but do not wrap at line ends, collapse in HTML, or match a search for a regular space. Word shows them as a small degree symbol when formatting marks are on.

Zero-width characters. U+200B, U+200C, U+2060 and U+FEFF take no space on screen at all. The chat UI uses them to control wrapping while an answer streams; they are copied along with the text and break keyword matching, JSON parsing, variable names and string comparisons.

Blank lines and double spaces. Markdown rendering puts an empty line between every paragraph and list item, which Google Docs and Word turn into doubled line spacing. Double spaces after periods and trailing spaces at line ends come from the same rendering step.

The remover handles all three in one pass: it replaces non-breaking spaces, deletes zero-width characters, collapses double spaces and trims line ends. Blank-line removal is a checkbox, because sometimes you want the paragraph spacing.

Before and After

Both lines below render almost identically. The first contains a non-breaking space, a zero-width space, a byte order mark and a double space; the second is the remover's output. Search for "machine learning" in the first one and it will not match.

Before (raw view)

Intro to machine[ZWSP]learning:[NBSP]a short[BOM]  guide.

After

Intro to machine learning: a short guide.

Zero-Width Space Remover: the Characters We Delete

This page started life as a zero-width space remover and still is one. Every character below is deleted, with one exception: U+200D is kept where it joins an emoji sequence such as 👨‍👩‍👧, because removing it would break the emoji.

CharacterUnicodeWhat It Does
Non-Breaking SpaceU+00A0Looks like a space, does not wrap or collapse; replaced with a regular space
Zero-Width SpaceU+200BInvisible breakpoint that splits text without visible separation; breaks keyword matching and search indexing
Zero-Width JoinerU+200DJoins characters; legitimate inside emoji sequences (kept there), stray in plain text (removed)
Zero-Width Non-JoinerU+200CPrevents character joining; can break ligatures and cause rendering issues in some languages
Byte Order MarkU+FEFFEncoding marker that belongs only at file start; mid-text it is a copy artifact
Word JoinerU+2060Prevents line breaks between words; invisible glue inserted for text rendering
LTR / RTL MarksU+200E / U+200FDirection control characters; stray in monolingual text copied from AI tools
Soft HyphenU+00ADInvisible hyphenation hint that shows up as a hyphen in some editors

Zero-Width Characters in Code and JSON

A zero-width space inside a variable name, a JSON key, a URL, an environment variable or a shell command is the classic "it looks identical but does not match" bug: Python stops with SyntaxError: invalid non-printable character U+200B, the JSON parser throws an unexpected token, the string comparison returns false, and the two values look the same on screen. Code copied from ChatGPT, Stack Overflow answers and PDFs is the usual source.

Paste the offending line here and switch to the HTML (Raw) view: it shows every hidden character with its code point and position, [ZWSP U+200B], [BOM U+FEFF], [NBSP U+00A0], so you can see exactly which byte broke the build. Click Clean and paste the fixed line back. Indentation and line breaks are left alone; for code, keep the blank-line checkbox off.

How to Remove ChatGPT Spaces in 3 Steps

  1. Paste. Drop the text into the left panel. The badge shows how many hidden elements were found; the HTML (Raw) tab shows each one as a labelled marker.
  2. Choose. Tick Also remove blank lines if you are pasting into Word or Google Docs and want single spacing. Leave it off for code and for text that should keep its paragraphs.
  3. Clean and copy. Click Clean, then Copy. The stats bar lists what changed: extra spaces collapsed, non-breaking spaces replaced, zero-width characters removed, blank lines removed.

If the text came from ChatGPT and you also want its interface attributes (data-start, data-end) stripped, the ChatGPT Watermark Remover does that with the same engine. To remove **, # and bullet symbols as well, use the ChatGPT Formatting Remover.

Frequently Asked Questions

Common questions about extra spaces, blank lines and invisible characters in ChatGPT text

Why does ChatGPT text have extra spaces when I paste it?
Three different things look like "extra spaces". Non-breaking spaces (U+00A0) replace normal spaces in list items and code spans and refuse to wrap. Zero-width spaces (U+200B) and word joiners (U+2060) are invisible but still count as characters, so searches and string comparisons fail. And Markdown rendering leaves a blank line between every paragraph and list item, which Word and Google Docs turn into double line spacing. This tool fixes all three.
How do I remove double spaces from ChatGPT text?
Paste the text above and click Clean. Runs of two or more spaces or tabs inside a line are collapsed to one space, trailing spaces are trimmed, and non-breaking spaces are replaced with regular spaces so they can be collapsed too. The stats bar shows how many were removed.
How do I remove the blank lines between paragraphs?
Tick "Also remove blank lines between paragraphs" above the tool, then click Clean. Every empty line is removed so paragraphs and list items sit on consecutive lines. Leave it unticked if you want normal paragraph spacing; the tool then only collapses three or more blank lines down to one.
What is a zero-width space?
A zero-width space (U+200B) is a Unicode character that takes up no visual space but exists in the text data. AI chat interfaces use it, along with U+200C, U+200D and U+2060, for cursor tracking and line-break control while an answer streams in. When you copy, it comes with the text and breaks keyword matching, JSON parsing and string comparisons.
Do zero-width spaces break code?
Yes. A zero-width space in a variable name, JSON key, URL or shell command creates a bug that is invisible on screen: Python reports "invalid non-printable character U+200B", JSON parsers throw an unexpected token, and two identical-looking strings compare as different. Paste the line here, switch to HTML (Raw) to see the character, and click Clean.
How can I see the hidden characters before removing them?
Switch the input panel to HTML (Raw). Every invisible character is shown as a label with its code point — [ZWSP U+200B], [NBSP U+00A0], [BOM U+FEFF], [WJ U+2060] — so you can see exactly where each one sits. The badge above the panel shows the total count.
Does this work for Claude, Gemini and Copilot text too?
Yes. Every AI chat interface inserts its own mix of non-breaking spaces, zero-width characters and Markdown spacing. The remover does not care where the text came from; it also works on text copied from PDFs, web pages, spreadsheets and Word documents.
What exactly gets removed?
Double and trailing spaces; non-breaking spaces (U+00A0, replaced with a normal space); zero-width spaces (U+200B), zero-width non-joiners (U+200C), word joiners (U+2060), byte order marks (U+FEFF), direction marks (U+200E/F) and soft hyphens (U+00AD); zero-width joiners (U+200D) except inside emoji; and, if you tick the option, blank lines. Smart quotes, em dashes and the Unicode ellipsis are also normalized to ASCII.

Related Tools