JSON String Escape / Unescape
Make text safe to put inside a JSON string, or reverse it.
Also called: escape JSON string, JSON unescape.
DEVELOPER
Runs locally in your browserJSON String Escape / Unescape
Make text safe to put inside a JSON string, or reverse it.
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.
Watch: how to use the JSON String Escape / Unescape (13 seconds)
Recorded on a phone, steps written on screen, no sound.
About the JSON String Escape / Unescape
Escape text so it can go inside a JSON string (quotes, backslashes, new lines become \" \\ \n), or unescape it back.
How to use the JSON String Escape / Unescape
- Enter your textType or paste your text.
- Pick the optionsaction and keep surrounding quotes when escaping (the defaults suit most uses).
- Press Run toolThe result appears right under the button.
- Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.
This tool works inside your browser: what you enter stays on your device.
Example
A sample input and the result the JSON String Escape / Unescape gives for it (produced by the tool itself, not typed by hand).
- Input text
- He said "hello" then left.
- Action
- Escape
Result:
He said \"hello\"\nthen left.
Good to know
- What you need
- You type or choose: Input text
- Where it runs
- In your browser, on your device.
- Cost
- Free, no sign-up.
Questions
Keep surrounding quotes?
Tick it to get a complete JSON string value.
Why do I need this?
Pasting raw text with quotes or line breaks into JSON breaks it.