ToolBuddy
In Browser

JSON Escape

Escape a string for use inside JSON (quotes, backslashes, and control characters) or unescape a JSON string literal. Runs with JSON.stringify / JSON.parse in your tab so fixture text never hits a hosted escaper.

Runs in your browser. Nothing is uploaded.

Direction

0 characters · 0 lines

0 characters · 0 lines

About this tool

Escape a string so it can sit inside JSON: quotes, backslashes, and control characters become \ sequences. Unescape reverses a JSON string literal (without requiring surrounding quotes). Built on JSON.stringify / JSON.parse in the tab.

How to use: paste the raw string, pick Escape, copy the escaped form into a larger JSON document. Unescape if a log printed an already-escaped value. Invalid unescape input (dangling \) shows a parse error.

Example: He said "hi" becomes He said \"hi\". A Windows path C:\\tmp round-trips. This is not pretty-printing a whole document. Use the JSON formatter for that.

Strings never hit a hosted escaper. Related: JSON formatter for objects, Base64 if you needed binary-safe transport instead of JSON string rules.

Related Web tools