Skip to content
XUtilHub

JSON Decode Online – Unescape JSON Strings

Decode JSON-encoded strings into plain text or objects. Resolves \n, \", \u escape sequences. Free JSON decoder.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
Encoded string
Output

About the JSON Decode

Decode a JSON-encoded string literal, resolving escape sequences such as \n, \t, \" and \uXXXX. If the result is itself JSON, it is formatted too.

Key features

  • Resolves \n, \t, \", \\ and \uXXXX escape sequences
  • Accepts strings with or without surrounding quotes
  • Formats the result automatically if it's JSON
  • Returns plain text when the content isn't JSON
  • Clear errors for invalid escape sequences
  • Runs entirely in your browser

Decode escaped JSON strings

When text or JSON is stored inside a JSON string, special characters are escaped: line breaks become \n, quotes become \", and non-ASCII characters may become \uXXXX. The result is accurate but unreadable. JSON Decode reverses the escaping so you can read the original content.

Example

Input:

"Line one\nLine two\n✓ Done 🚀"

Output:

Line one
Line two
✓ Done 🚀

If the decoded text is JSON, for example "{\"id\":1,\"ok\":true}", it's formatted:

{
  "id": 1,
  "ok": true
}

JSON escape sequences

EscapeCharacter
\"Double quote
\\Backslash
\/Forward slash
\nLine feed (new line)
\rCarriage return
\tTab
\b / \fBackspace / form feed
\uXXXXUnicode code unit (hex)

Where escaped strings come from

  • Log files, where messages and stack traces are stored as JSON string values.
  • Error responses that embed another service's error body.
  • Databases storing text with line breaks in JSON columns.
  • Translations and CMS exports, where formatted text includes \n.
  • LLM and chatbot APIs, whose responses contain escaped Markdown.

To produce escaped strings, use JSON Encode. For multiple layers of escaped JSON, use JSON Unstringify. To escape or unescape text without surrounding quotes, try JSON Escape / Unescape.

How to use the JSON Decode

  1. Paste your data into the input box, upload a file, or click Sample to try it out.
  2. Adjust the options above the editor if you need to (indentation, delimiter, and so on).
  3. The result appears instantly in the output panel. Any errors are shown with their line and column.
  4. Click Copy to copy the result, or Download to save it as a file.

Frequently asked questions

What does JSON decode mean?

In this context it means taking a JSON-encoded string literal, full of escape sequences like \n and \", and turning it back into the original text. If that text is itself JSON, it's formatted too.

What's \u00e9?

A Unicode escape. \u followed by four hex digits represents a character, here é. Emoji use two escapes (a surrogate pair), e.g. \ud83d\ude00 for 😀.

Is JSON decode the same as json_decode in PHP?

PHP's json_decode parses any JSON into a PHP value. This tool focuses on the string case: decoding an escaped string literal into readable text or formatted JSON.

What's an invalid escape sequence?

JSON only allows \" \\ \/ \b \f \n \r \t and \uXXXX. Anything else, like \x41 or \', is invalid in JSON even though some languages accept it.

Is my JSON uploaded to a server?

No. All JSON tools run entirely in your browser, so your data never leaves your device.

Is there a size limit?

There is no fixed limit. Files of several megabytes work fine; very large files depend on your device's memory.

Do I need an account?

No. Every JSON tool is free and works without signing up.

Last updated:

Related JSON tools