No processing of your file contents takes place on any server. You need no data-processing agreement with gottrix to handle confidential or business documents.
Hosted in GermanyGlobal Content Delivery
Origin servers at Hetzner in Germany, delivered worldwide through a content delivery network. Your file contents are never transmitted in the process - they never leave your device.
Anyone who wants to embed text in JSON or source code must escape it: quotation marks, backslashes, line breaks and tabs have a special meaning there and would break the surrounding code. This tool takes your raw text and outputs it as a valid JSON string literal - including the surrounding quotation marks - that you can safely paste into a JSON file or into code.
Specifically, double quotation marks, backslashes and control characters such as line break and tab are rewritten into their escaped forms (\" \\ \n \t). The result matches exactly what a programming language produces when serializing a string, and can be turned back losslessly into the original text when read in.
The conversion runs entirely locally in your browser in pure JavaScript - your text is not uploaded, not stored, and no foreign library is loaded from a CDN. You can download the result as a text file or copy it straight into your file.
Free as often as you like: no daily cap, no account, no paywall - your input stays on your device. Many online services limit free use to a few runs per day or require an account; here everything runs locally in your browser - with no daily quota and no sign-up.
Specifications
Specifications
Input formats
Text input
Output format
TXT
Batch processing
No
Processing
Locally in your browser (JavaScript)
File upload
None
In 3 steps
Paste the text into the text field.
Click escape.
Read or download the JSON string literal.
Limitations: The tool produces a single JSON string literal from the entire input text (with surrounding quotation marks). It does not format a whole JSON document - the JSON formatter tool is for that. Very large texts are limited by your device memory.
FAQ
Is my text uploaded?
No. The conversion runs entirely locally in your browser; your text never leaves your device and is not stored.
What gets escaped?
Double quotation marks, backslashes and control characters like line break (\n) and tab (\t) - exactly what a valid JSON string literal requires.
Do I get quotation marks included?
Yes. The output is a complete literal including the surrounding quotation marks, so you can use it directly as a value in JSON or code.
How do I reverse it?
A JSON string literal can be turned back losslessly into the original text by any JSON parser when read in.
Is Escape JSON free - are there any limits?
Yes. You can use Escape JSON as often as you like: no daily cap, no account, no paywall. There is no fixed length cap for your input; very long texts are bounded only by your device's memory.