JSON Escape / Unescape
Escape and unescape strings for JSON values
Escaping uses JSON string rules, so quotes, backslashes, tabs and newlines become valid inside a JSON value.
About the JSON Escape / Unescape
The JSON Escape tool converts text into a string body that is safe inside JSON, and reverses the process. Paste a sentence with quotes or line breaks, or decode an escaped value from an API response.
The most common use is pasting a multi-line message into a JSON field. Escaping turns the newlines into \n and the quotes into \", which keeps the document valid without hand-editing.
- ✓Escapes quotes, backslashes, and control characters
- ✓Decodes escaped API values
- ✓Reports invalid escape sequences
How to use the JSON Escape / Unescape
- 1
Choose Escape or Unescape.
- 2
Paste the text or escaped string.
- 3
Copy the converted value.
Frequently asked questions
Does the output include the surrounding quotes?+
No. Only the inner string body is returned, so you can paste it between the quotes of an existing JSON value.
Can it handle a full JSON document?+
It expects a string, not an object. Use the JSON Formatter for whole documents, and this tool for individual string values.
Save JSON Escape / Unescape to your favorites, or keep browsing converters.
Browse all 45 converters →