That page doesn't exist. Search or drop a file below to find the tool you need.
What do you need to get done?
- Stays on this device
- No watermark
- Works offline
Drop a file here
or .
Open an app
Follow a recipe
Use one tool
JSON string encode
Turn any text into a valid JSON string literal online. Quotes, backslashes, line breaks and tabs are escaped, and the result is wrapped in double quotes, ready to paste into JSON or code. Runs in your browser, nothing is uploaded.
How to escape text as a JSON string
- 1Paste or type your text into the input box
- 2Read the quoted JSON string in the result box
- 3Copy it into your JSON file, request or code
- A double-quoted JSON string, escapes included.
What you get
- Ready to paste.The result already has its surrounding double quotes.
- Nothing is uploaded.The text is escaped by your browser, on your own device.
- Multi-line safe.Line breaks become \n, so the whole text fits on one line.
What you can do
- Escape double quotes, backslashes, line breaks (\n), tabs (\t) and other control characters.
- Wrap the text in quotes so it is a complete JSON string value.
- Prepare a multi-line text, such as a prompt, an email or a SQL query, to sit inside a JSON field.
- Copy the result with one click.
Good to know
- Letters like ä and € are kept as they are. If you need them as \uXXXX escapes, use the Unicode escape encode tool.
- The result includes the opening and closing quotes. Leave them out if your JSON already has its own.
- Single quotes are not escaped, as JSON does not need it.
- To go back, use the JSON string decode tool.
Questions
How do I escape text for JSON?
Paste the text into the input box. The result box shows it in double quotes with quotes, backslashes and line breaks escaped.
Why is there a \n in my result?
A line break cannot sit inside a JSON string, so it is written as \n. Decoding turns it back into a line break.
Are non-English characters escaped?
No. They stay as they are, which is valid JSON.
Is my text uploaded?
No. The escaping runs in your browser and nothing is sent.