Zerowidth CleanerAll measured guides

CLAUDE WATERMARK REMOVER · PRACTICAL TEST

Can JSON round-trip a lone surrogate that UTF-8 encoding replaces?

Yes in our runtime. JSON.stringify escapes the lone U+D800 unit, and JSON.parse restores it exactly. Encoding that restored string as UTF-8 yields the same replacement bytes as U+FFFD. JSON equality and UTF-8 fidelity answer different questions.

Tested October 17, 2026 · v24.19.0 · 4 measured runs

Open the Claude text cleaner · Full measured data

Code-point comparison for Marked lone high surrogate

Measured inputs and outputs

These are locally constructed test strings, not evidence that Claude inserts these characters. We executed the saved homepage script snapshot with a minimal DOM harness and compared exact strings. The invisible-checkbox state and dash mode appear in each row. The observations below test this page's specific question. Destination observations run independently on the exact input and cleaned strings in the recorded Node runtime. We make no detector-score or statistical-watermark removal claim.

Before and after observations; full code points and strings are in the JSON download.
Fixture and modeInput string and code pointsOutput and cleaner statusObserved before / after
Marked lone high surrogate
direct string / keep / invisible true
"\ud800​"
U+D800 U+200B
"\ud800"
Removed 1 invisible character
{"json":"\"\\ud800​\"","roundtripExact":true,"utf16Units":["d800","200b"],"utf8Hex":"efbfbde2808b"}
{"json":"\"\\ud800\"","roundtripExact":true,"utf16Units":["d800"],"utf8Hex":"efbfbd"}
Lone high surrogate
direct string / keep / invisible true
"\ud800"
U+D800
"\ud800"
No selected invisible characters found
{"json":"\"\\ud800\"","roundtripExact":true,"utf16Units":["d800"],"utf8Hex":"efbfbd"}
{"json":"\"\\ud800\"","roundtripExact":true,"utf16Units":["d800"],"utf8Hex":"efbfbd"}
Replacement character
direct string / keep / invisible true
"�"
U+FFFD
"�"
No selected invisible characters found
{"json":"\"�\"","roundtripExact":true,"utf16Units":["fffd"],"utf8Hex":"efbfbd"}
{"json":"\"�\"","roundtripExact":true,"utf16Units":["fffd"],"utf8Hex":"efbfbd"}
Paired emoji
direct string / keep / invisible true
"😀"
U+1F600
"😀"
No selected invisible characters found
{"json":"\"😀\"","roundtripExact":true,"utf16Units":["d83d","de00"],"utf8Hex":"f09f9880"}
{"json":"\"😀\"","roundtripExact":true,"utf16Units":["d83d","de00"],"utf8Hex":"f09f9880"}

The JSON round trip preserves the original code unit

The first fixture combines an unpaired high surrogate with U+200B. Cleanup removes only the selected marker, leaving the surrogate unit. JSON.stringify represents that unpaired unit with an escape, and JSON.parse restores the identical JavaScript string. The lone-surrogate control gives the same result without cleanup. We record UTF-16 code units explicitly, so a rendered replacement glyph cannot conceal the distinction between an unpaired D800 unit and the actual replacement character FFFD. Every JSON roundtripExact flag in this matrix is true. That means the string round trip succeeded for these fixtures; it does not assert that each resulting string is a sequence of well-formed Unicode scalar values.

The next encoding stage can collapse distinct strings

After the JSON round trip the observer encodes the restored string through Node’s UTF-8 Buffer conversion. The lone surrogate and actual replacement-character control both produce the byte hex efbfbd. Their UTF-16 unit records differ, so those equal bytes cannot establish that the source strings were identical. The valid emoji control has a proper surrogate pair and encodes as f09f9880. Earlier pages test encoder substitution and URI encoding failures. This matrix specifically locates the successful JSON preservation step before the later byte conversion. It does not decode an unknown damaged file or reconstruct a missing character, and it supplies no claim that a different JSON implementation must retain an invalid Unicode sequence.

Retain evidence at the stage where identity matters

If the application promises exact JavaScript string preservation, compare code units before and after serialization. If the destination promises UTF-8 text fidelity, validate that boundary separately and decide how unpaired units should be handled. A successful JSON parse and an equal round trip do not make a later byte conversion reversible. Keep the original source representation when investigating a replacement glyph rather than deleting that glyph and assuming the intended letter is restored. These authored controls make the information change visible through both unit arrays and byte hex. They test no captured Claude output and do not interpret an unpaired surrogate, escape sequence or replacement byte pattern as a watermark.

Reproduce this test

Save reproduce.cjs and tested-app.js in the same folder. Run the command below with Node.js. The harness prints its runtime, script SHA-256 and every measured row. Compare those rows with the original record. Using a newer script or runtime creates a new experiment; retain the version information with your rerun.

node reproduce.cjs

Reference and next check

ECMAScript QuoteJSONString provides the relevant primary definition. The table and fixture analysis are original measurements. For broader inspection, use our Unicode inspector. Read the scope distinction before interpreting cleanup as a watermark result.