JSON Escape & Unescape

Escape plain text into a valid JSON string literal, decode an escaped literal back to readable text, and get a JavaScript-source-safe variant. Runs entirely in your browser.

Input

How it works

About JSON Escape & Unescape

Escaping is the price of putting arbitrary text inside a JSON document: quotes and backslashes must be marked, and control characters cannot appear literally. Getting the escaping wrong produces invalid JSON — a leading cause of broken configs, failed API calls, and corrupted import scripts.

This tool removes the guesswork. Escape raw text before embedding it in a config file, a request body, or a test fixture; unescape when you pull an escaped literal out of logs and want to read it. Both directions run locally, so sensitive payloads never leave your browser.