Free, browser-based utilities for everyday developer workflows

Escape and unescape a JSON string

Convert text to an escaped string or decode escaped sequences so nested JSON, logs, and code literals are easier to inspect.

Open this example in String Escape / Unescape

Open the tool, then paste the sample input below. Everything runs locally in your browser.

Open this example in String Escape / Unescape →

The problem

Logs and API payloads often contain JSON inside a string, with quotes and newlines escaped. Unescaping that string makes the real content readable; escaping text helps paste it safely into code or JSON.

Sample input

Escaped string
{"message":"hello\nworld","ok":true}

Expected output

Unescaped text
{"message":"hello
world","ok":true}

How to do it

  1. Paste the escaped string.
  2. Choose unescape or decode mode.
  3. Review the decoded text.
  4. Switch to escape mode when preparing a literal.
  5. Copy the result into the target file or payload.

Common mistakes

  • Unescaping twice and changing valid backslashes.
  • Confusing URL encoding with string escaping.
  • Pasting a full JSON object where only a string literal is expected.
  • Missing newline escapes when embedding text in code.

Related tools

FAQ

When should I unescape a string?

Unescape when quotes, newlines, or backslashes are encoded and you need to read the original text.

Is string escaping the same as URL encoding?

No. String escaping handles code or JSON literal characters; URL encoding handles characters in URLs.

Is my text uploaded?

No. Escaping and unescaping run locally in your browser.

Is my data uploaded anywhere?

No. This workflow runs locally in your browser unless you explicitly copy or share the result yourself.

This guide uses browser-local tooling. Avoid pasting production secrets unless you understand what the tool displays and shares.

Explore related tools

Continue with adjacent browser-based tools for the same workflow.

View data cleanup and QA tools →