AES Encryption Explained: How It Works and Why It Matters
Jun 23, 2026
Escape or unescape JSON string content. Convert special characters to JSON-safe escape sequences and back.
JSON escaping is the process of converting special characters in a string to their JSON-safe escape sequences. According to the JSON specification (RFC 7159), certain characters must be escaped when they appear inside a JSON string: the double quote ("), backslash (\\), and control characters (U+0000 through U+001F).
For example, the string He said "Hello" becomes He said \"Hello\" when escaped for JSON. The tab character becomes \t, newline becomes \n, and carriage return becomes \r.
| Character | Escape Sequence | Description |
|---|---|---|
| " | \" | Double quote |
| \\ | \\\\ | Backslash |
| / | \\/ | Forward slash (optional) |
| \b | \\b | Backspace |
| \f | \\f | Form feed |
| \n | \\n | Newline |
| \r | \\r | Carriage return |
| \t | \\t | Tab |
| U+0000-U+001F | \\uXXXX | Control characters |
This tool produces similar output to JavaScript's JSON.stringify() but gives you more control. You can choose whether to escape forward slashes, escape non-ASCII characters as \\uXXXX, and wrap the output in double quotes.
Escaping forward slashes (\\/) is optional in JSON but was required in older JSON specifications. Some applications (especially those embedding JSON in HTML <script> tags) still escape slashes to prevent </script> injection.
The JSON specification requires that the double quote (") and backslash (\\) be escaped, and all control characters (U+0000 through U+001F) be escaped as well. Control characters are escaped as \\n, \\t, etc., or as \\uXXXX for others.
Yes. The Escape forward slashes option is especially useful for JSONP or JSON embedded in HTML <script> tags, as it prevents injection attacks via closing tags like </script>.
JSON escape converts characters to backslash sequences (\\n, \\") for use inside JSON strings. URL escape (percent encoding) converts characters to %XX sequences for use in URLs. They serve different purposes and use different encoding schemes.
Blog
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026