Skip to content
DDevToolery

JSON Escape

Turn arbitrary text into a JSON string literal.

Loading tool…

About this tool

Escapes text so it can be embedded inside a JSON string: quotes, backslashes, newlines, tabs and control characters all become escape sequences.

Questions

Do I need this if my language has a JSON library?
No — the library handles it. This is for hand-writing a fixture, a config value or a test payload.

Privacy

This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.