JSON Escape / Unescape
Escape a string for use inside JSON, or unescape a JSON string.
Related Tools
0 comments
How it works
Escaping converts plain text into a valid JSON string body — quotes become \", backslashes become \\, and control characters like newlines and tabs become \n and \t — so you can safely embed it inside a JSON value. Unescaping reverses this, turning an escaped JSON string back into the original text. It uses the browser's own JSON engine for correctness. This is handy for building config files and API payloads by hand. Everything runs locally in your browser.
He said "hi"\n → He said \"hi\"\\n
Common use cases
- Embedding a multi-line string into a JSON config by hand.
- Pasting an escaped JSON string and reading the original text.
- Preparing text for an API request body.
Frequently asked questions
What characters get escaped?
Double quotes, backslashes, and control characters such as newline, tab, and carriage return are escaped to their JSON forms (\", \\, \n, \t, \r), producing a valid JSON string body.
Does it add the surrounding quotes?
There is an option to include or omit the wrapping double quotes, so you can paste the result straight into a JSON value either way.
Is my text uploaded?
No. Escaping and unescaping run entirely in your browser using its built-in JSON functions.