MewTools

EncodingTool 19

JSON String Escaper

Turn a multiline paragraph into a JSON-safe fragment you can paste between quotation marks.

Runs locallyNo uploadPlain textFree, no account

JSON String Escaper

81 / 232

Result

Waiting

Run the tool and the result appears here. Copy it or download it — nothing leaves this tab.

Privacy

Local by design

Everything you type stays in this tab and is processed by JavaScript on your device. Nothing is uploaded, logged or stored on a server.

How to use it

01

Add plain text in the field above. Nothing is uploaded while you type.

02

Press “Escape for JSON”. The escaped json string appears in the result panel instantly.

03

Copy the escaped json string or download the file, then close the tab.

When to use it

Hand-built JSON

Insert prose or code into a JSON string without invalidating the document.

Generating fixtures

Prepare test payloads that contain quotes and newlines.

Log messages

Store a multiline message as a single escaped value.

Questions

Should I include the outer quotes?

No. The tool returns only the inside of the string. Add your own double quotes around it.

Is Unicode escaped?

Non-ASCII characters are kept as-is; only characters that JSON requires escaping are changed.

Does this tool upload my data?

No. Everything runs in this browser tab with JavaScript, so plain text never leaves your device.

Should I include the outer quotation marks in the output?

Only if you are pasting into a document that needs a complete string literal. For a value inside a hand-built object, take the escaped content without quotes, because the surrounding quotes already exist.

How are line breaks and tabs represented?

As \n and \t escape sequences, because raw control characters are not valid inside a JSON string. Pasting unescaped text is the most common cause of a parse error in otherwise correct JSON.

↑↓ to move↵ to openEsc to close