JSON Escape Tool
Quickly escape and unescape JSON strings
Select Conversion Method
What is JSON Escape?
JSON escaping is the process of converting special characters in JSON strings to escape sequences. Common escape characters include: " to \", \\ to \\\\, newlines to \n, tabs to \t, etc.
Use cases: When you need to embed JSON within another JSON string, define JSON string constants in code, or store JSON data in a database, escaping is required.
FAQ
When do I need to use JSON escape?
Use JSON escaping when you need to embed JSON data as a string inside another JSON object, or when code contains a JSON string with quotes, newlines, tabs, or other special characters.
What's the difference between JSON escape and Base64 encoding?
JSON escape simply replaces specific characters with escape sequences, keeping data readable; while Base64 encoding converts entire data to ASCII characters, making data unreadable. JSON escape is for string handling, Base64 is for binary data encoding.
Why don't Chinese characters need escaping?
In UTF-8 encoded JSON, Chinese characters are valid and can be used directly without escaping. However, in some legacy systems or special cases, Chinese characters may be escaped to \uXXXX format. This tool keeps Chinese characters as-is by default.