JSON Escape Tool - Escape Special Characters in JSON

Add your input here..

Characters: 0 | Bytes: 0

Content type not detected. Show common operations by default

ABOUT


This page provides a specialized tool for escaping JSON strings. JSON (JavaScript Object Notation) requires special characters to be escaped according to the JSON specification. In JSON, the following characters are reserved and must be escaped when used inside strings:

EscapeMeaningExample
\"Double quote"Say \"Hi\""
\\Backslash"Path: C:\\\\Users"
\/Forward slash (optional)"URL: https:\/\/example.com"
\bBackspace"Before\bAfter"
\fForm feed"Page 1\fPage 2"
\nNewline"Line 1\nLine 2"
\rCarriage return"Line 1\rLine 2"
\tTab"Column 1\tColumn 2"
\uXXXXUnicode (4 hex digits)"Unicode: \u0048\u0065\u006C\u006C\u006F"

Note: Unlike many programming languages, JSON does not support escaping single quotes (\'). In JSON, strings must be enclosed in double quotes, and single quotes can be used as-is within the string.

The JSON Escape tool helps you convert special characters into their JSON escaped form, making them safe for use in JSON data. This is particularly useful when working with JSON strings that contain newlines, tabs, quotes, or other special characters that need to be properly escaped according to the JSON specification.

As part of StringFlux, this tool can be chained with other operations for more complex transformations. For instance, you can escape a JSON string and then format it, or unescape it back to its original form. If you need to work with general strings (not just JSON), check out our String Escape Tool.

FEATURES


Transformation Chains

Chain multiple operations to perform complex transformations, similar to a command line pipe.

Copy selection in new editor

Context menu supports copy text selection to a new editor. Useful to apply transformations to a specific part of a string.

Privacy First

All string transformations happen purely on the browser side, ensuring your data never leaves your device.

Intuitive UX

Simple and intuitive UX to provide operation in 3 ways: recommended by content type, search and category.

Fix broken JSON

Fix malformed JSON with common errors, like missing quotes, trailing commas, unescaped characters, and unmatched brackets.

Share & Collaborate

Share your string transformation chain with others using share links.