Free JSON escape & unescape tool — quotes, backslashes and control characters, RFC 8259

Escaping runs entirely in your browser — nothing is uploaded.

JSON Escape & Unescape — make any text safe inside a JSON string

A JSON string is wrapped in double quotes, so any text you embed must have its special characters escaped or the document becomes invalid. JSON escaping replaces those characters with backslash sequences defined by RFC 8259 §7; unescaping reverses it. This tool does both in your browser using the engine's native JSON.stringify/JSON.parse, so even secrets and tokens never leave your machine.

What JSON escaping changes

CharacterEscaped as
Double quote "\"
Backslash \\\
Newline / return / tab\n / \r / \t
Backspace / form feed\b / \f
Control chars U+0000–U+001F\uXXXX hex escape

Example

The text:

He said "hi"
path: C:\temp

escapes to a JSON-safe string body:

He said \"hi\"\npath: C:\\temp

Note: / does not need escaping

The forward slash may optionally be written as \/ (useful to avoid </script> in inline HTML), but RFC 8259 does not require it. This tool leaves / as-is, matching JSON.stringify, so round-tripping is exact.

How to use

  1. Paste your raw text (to embed) or a JSON string (to decode).
  2. Click Escape or Unescape.
  3. Copy the result into your JSON document or code.

Related escape tools