๐Ÿ“‹

JSON Escape/Unescape

Escape or unescape JSON strings. Handles quotes, backslashes, newlines, and special characters. Free online JSON string escaper.

Free Encode/Decode
โ†“

Frequently Asked Questions

What is JSON string escaping?

JSON string escaping converts special characters (quotes, backslashes, newlines, etc.) into their escape sequences so the string can be safely embedded inside a JSON string value. For example, a double quote " becomes \" and a newline becomes \n.

Which characters are escaped?

Double quote (") โ†’ \", backslash (\) โ†’ \\, newline โ†’ \n, carriage return โ†’ \r, tab โ†’ \t, backspace โ†’ \b, form feed โ†’ \f, and control characters (U+0000 to U+001F) โ†’ \uXXXX.

When do I need JSON escaping?

When embedding text data into JSON strings for API requests, configuration files, or data interchange. Without proper escaping, special characters in the text will break the JSON structure and cause parse errors.

What's the difference between this and JSON.stringify?

JSON.stringify wraps the string in quotes and escapes special characters. This tool only escapes the inner content without adding surrounding quotes, giving you more flexibility. You can wrap the result in quotes yourself if needed.

Is this tool free and private?

Yes, completely free with no sign-up required. All processing happens in your browser. Your data never leaves your device.