JSON minify & escape

Processed locally
app.escape.view

You can also load data via #data={"name":"Ada"} or #url=... It is cleared from the address bar after it is read.

Minify and handle escaping: put JSON into a string literal, or restore already-escaped text. Common when writing code snippets and config templates. Logs often show \" nested layers. This page switches between parseable JSON and text embedded in a string.

Minify + escape

Produces one line you can embed in another string—for example a JSON field inside another JSON document, or a shell variable.

Make sure the source is valid JSON before escaping, so you do not embed syntax errors.

Unescape

Copy content with \" from logs and restore parseable JSON. Useful when a gateway or SDK logged the body as a string.

After restoring, format immediately to inspect structure.

Keep the source valid

Non-JSON source raises an error so you do not get an even harder-to-debug string. The wrong mode (escape when you meant unescape) also surprises—compare against the sample.

If you only need whitespace removed and do not embed in code, use the minify page.

Example

Original JSON
{"msg":"hello"}
After escape (illustrative)
{\"msg\":\"hello\"}
How is this different from ordinary minify?

Minify only removes whitespace. This page also handles quotes and backslashes so you can embed in code.

What about newlines?

Minified output has no newlines. Escaping mainly targets quotes and backslashes.

What if I escape twice?

Each escape adds a layer of backslashes. If the result looks like all \\ , switch to “Unescape” and peel back.

Is it suitable for HTML attributes?

It can be a starting point, but HTML still has its own quote rules. Try it in the target environment before shipping.

Recommended workflow

  1. Pick a direction: “Minify and escape” to embed in a string; “Unescape” to restore from logs.
  2. Paste the source and confirm the output works in the next tool or in code.
  3. Format restored JSON and check that fields are complete.
  4. If you only need a single line and will not embed in code, use ordinary minify.

Multi-layer escaping is common in logs. If you are unsure how many layers, Unescape until a standard parser accepts it.