Skip to content

JSON String Escape / Unescape

Encode text as a quoted JSON string literal or decode a JSON string, including quotes, backslashes and line breaks.

Mode

Input

23 chars2 lines

Result

Type or paste on the left — the result updates as you type.

Decode mode accepts a JSON string only, not an object or array. Encoding includes the surrounding quotes; HTML escaping is a separate operation.

Up to 100,000 UTF-16 units per input and 1,000,000 per result. See the supported formats and examples below.

Format references

Tool page updated: