JSONTech

تهريب JSON

تهريب وإلغاء تهريب الأحرف الخاصة

Input

Loading editor...

Output

Loading editor...

Escape and unescape JSON string values

Embedding a JSON string inside another JSON string, an HTML attribute, or a shell command means you have to escape quotes, backslashes, and control characters. Doing it by hand is error-prone; a tool that escapes and unescapes correctly saves you from broken payloads and weird invisible characters that fail validation later.

Use the tool when you need to

Embed JSON inside a JSON string

Escape a payload so it can be stored as a string field inside another JSON document.

Build a curl command that posts JSON

Escape the body so the shell command stays valid when the payload contains quotes or backslashes.

Reverse an escaped value from a log line

Unescape a doubly-escaped string from a log so you can read what the original payload looked like.

How to escape JSON quickly

  1. 1

    Paste the JSON string into the input area.

  2. 2

    Click Escape to add the necessary backslashes, or Unescape to reverse them.

  3. 3

    Copy the result and use it where you need an embedded or readable form.

Common escape/unescape workflows

Embed a payload in a config file

Escape a JSON sample so it lives inside a string field in another JSON document.

Build a curl command

Escape the request body so the resulting shell command is paste-safe.

Recover a logged payload

Unescape a value from a log line to reconstruct what the original request looked like.

أدوات ذات صلة

الأسئلة الشائعة

Escape JSON when you need to embed a JSON string inside another string — for example, storing a payload as a value in another JSON document, embedding JSON in a shell command, or putting JSON into an HTML attribute.

The tool escapes double quotes, backslashes, and control characters (newlines, tabs, etc.) according to the JSON specification. The escaped output is safe to embed inside another JSON string.

Escape adds backslashes so the value can be embedded as a string. Unescape reverses that, recovering the original JSON. If you have a doubly-escaped value (escaped twice), run unescape twice.

The tool follows JSON escaping rules. For URLs use the URL Encoder, for binary data use Base64, and for shell commands use shell-specific quoting — JSON escape is the right choice when the destination is JSON.

No. Escaping only adds backslashes so special characters are preserved as literal characters when the result is parsed as a JSON string. Round-tripping through escape and unescape returns the original value byte-for-byte.