Related Tools
What This JSON Escape / Unescape Tool Offers
Escape turns any text into a valid JSON string (wrapped in double quotes, with quotes, newlines, tabs, and backslashes escaped). Unescape does the reverse: you paste a double-quoted JSON string and get the plain text. Paste, upload, or drag-and-drop your input. If Unescape fails, the tool shows an error and a snippet with links to the Formatter and Validator. Clear resets input, output, and file. All processing is client-side.
- Escape: Wraps your text in double quotes and escapes internal quotes, newlines, tabs, backslashes, and control characters so the result is a valid JSON string literal.
- Unescape: Parses a double-quoted JSON string (e.g. "a\nb") and returns the plain string. Invalid input shows an error and snippet with links to Formatter and Validator.
- Paste, upload, or drop: Paste from clipboard, use the file picker, or drag-and-drop a file. Loading new content clears output and any error.
- Clear: One click clears the input, result, and file input so you can start with new text.
Powered by browser APIs and client-side processing.
Why Use JSON Escape or Unescape?
When you embed user input or multi-line text in JSON or code, you need proper escaping so quotes and newlines don’t break the syntax. Escape gives you the exact string literal. When you have an escaped string from an API or config and need the raw text, Unescape reverses it. Running in the browser keeps your data private and works offline after the page loads.
Options at a Glance
- Escape: Input is any text. Output is a JSON string (quotes around it, internal characters escaped).
- Unescape: Input must be a single double-quoted JSON string. Output is the decoded plain text. Non-string JSON (e.g. numbers) is rejected.
- File: Use the file picker or drag-and-drop to load from a file. Clears previous output and error.
- Clear: Clears input, output, any error, and file input.
Frequently Asked Questions
Is my data secure?
Yes. Conversion runs entirely in your browser. Your data never leaves your device and is not sent to any server.
What does Escape do?
Escape takes any text and wraps it in double quotes, escaping internal quotes, newlines, tabs, backslashes, and other characters so the result is a valid JSON string literal. Useful for embedding text in JSON or code.
What does Unescape expect?
Unescape expects a single double-quoted JSON string (e.g. \"hello\\nworld\"). If the input is not wrapped in quotes or contains invalid escape sequences, the tool shows an error and links to Formatter/Validator.
Can I load from a file?
Yes. Use the file picker above the input area or drag-and-drop a file. The file is read in your browser; nothing is uploaded. Loading new content clears the previous output and any error.