JSON Compress & Escape
Compress, escape and convert JSON text.
OUTPUT:
// When an escaped payload helps
A JSON payload that looks fine in an editor often has to travel as a string: inside a log line, a curl argument, a shell variable or another JSON value. That means removing insignificant whitespace and escaping every quote and backslash; reading a captured request needs the exact reverse. Every button here acts on the current OUTPUT text, so you can chain actions in the order you need, and [reset] puts the original input back.
// What each button does
- >[COMPRESS + ESCAPE] — Runs both steps: removes whitespace outside strings, then escapes backslashes and quotes.
- >[COMPRESS] — Removes line breaks, spaces and tabs outside strings. Whitespace inside a value stays.
- >[ESCAPE] / [UNESCAPE] — Adds or removes one layer of backslashes around quotes and backslashes.
- >[CHINESE → UNICODE] / [UNICODE → CHINESE] — Converts Chinese characters to \uXXXX escapes and back.
- >[CN → EN PUNCT] — Replaces full-width punctuation such as , 。 ; “ ” 【 】 with ASCII characters.
- >[reset] — Restores OUTPUT to the original INPUT text so you can start a new chain.
- >[copy] / [Download] — Takes the current OUTPUT text with you as clipboard text or a result.json file.
// Compress, then escape
IN
{ "name": "Tom", "age": 30 }
OUT
{\"name\":\"Tom\",\"age\":30}
Compress removes newlines and spaces outside strings; escape then doubles backslashes and quotes.