Escape JSON String
Wrap and escape text into a valid JSON string literal, safe to drop into code. Free, no signup.
Scan to open on your phone
Point your phone camera at the code to open this tool.
Wrap and escape text into a valid JSON string literal, safe to drop into code. Free, no signup.
How to use Escape JSON String
- Paste or type your contentThe result appears as you type — there is no submit button.
- Read and copy the resultThe output updates live and the copy button takes it in one click.
Worked example
- He said "hello" to me.
- "He said \"hello\" to me."
Nothing you enter leaves your device
All of the work happens inside your browser. Whatever you type is never packaged up and sent to a server, and no request this page makes carries it.
That makes it safe for contract amounts, personal details and internal documents you would rather not hand to a third party — close the tab and it is gone.
What this tool does not do
Escape JSON String only does what a browser can do on its own — it talks to no backend service. So it keeps no history for you and syncs nothing across devices; if you need a record, copy or download the result.
It is also not a substitute for professional judgement. For legal, medical or tax decisions, treat the output as a starting point rather than a final answer.
Frequently Asked Questions
- What does escaping do?
- It adds a surrounding quote and backslash-escapes any quotes or special characters inside.
- When do I need this?
- When building JSON by hand or embedding user text into a string field in code.