Advertisement
Loading converter...

String to JSON Converter Online 2026 - Unescape & Parse JSON

Unescape and parse stringified JSON or JS objects back into a clean JSON structure. 100% client-side privacy. Free online tool.

Key Features

  • Parses escaped strings
  • Handles JS object literals
  • Validates JSON integrity
  • One-click unescape

How to Use

  1. Paste your escaped string, stringified JSON, or JS object literal text
  2. The tool automatically detects single vs. double escaping and unwraps iteratively
  3. Review the parsed JSON in the viewer
  4. Copy the clean JSON for your development work

Expert FAQ

  • I have a string that's escaped twice — like a JSON blob that was itself stored as a JSON string value. Does it handle that?
    Yes, this is the specific case the tool is built around: double-escaped JSON (common when a JSON document is logged, or when an API wraps a JSON payload as a string field inside another JSON response) needs two passes of unescaping/parsing to reach the actual structured data. The tool detects nested escaping patterns (backslash-quote sequences indicating an inner escaped layer) and unwraps iteratively rather than stopping after a single JSON.parse() call.
  • My input is a JavaScript object literal, not strict JSON — it has unquoted keys and single quotes. Will this handle it?
    It attempts a more permissive parse for common JS-literal patterns (unquoted keys, single-quoted strings, trailing commas) before falling back to strict JSON.parse(), since a lot of "stringified JSON" pasted from browser dev tools or console.log output is actually a JS object literal's string representation, not standards-compliant JSON — these look similar but aren't the same grammar.
  • What happens if the string has genuinely broken escaping — like an unescaped quote in the middle?
    It surfaces a parse error at the point the unescaping/parsing logic breaks down, rather than guessing at intent, since silently "fixing" ambiguous broken escaping risks producing data that looks plausible but isn't what was actually intended. For a string that fails here, the JSON Parser can help pinpoint the exact problematic character once you've done a first pass of manual unescaping.

Technical Details

Converting a string back to JSON means reversing whatever serialization produced the string in the first place — most commonly a single JSON.stringify() call, but frequently double- or even triple-escaped JSON, which happens when a JSON document gets logged as a string, or when an API embeds a JSON payload as a string-typed field inside another JSON response. A single JSON.parse() call only reverses one layer; this tool detects nested escaping patterns (sequences indicating an inner escaped layer is still present after the first unwrap) and continues unescaping iteratively until it reaches genuinely structured data rather than another string. A meaningful share of real-world "stringified JSON" pasted from browser console output or debugger inspection isn't actually standards-compliant JSON — it's the string form of a JavaScript object literal, which permits unquoted keys, single-quoted strings, and trailing commas that strict JSON forbids. This tool attempts a more permissive parse for those common JS-literal patterns before falling back to strict JSON.parse(), since rejecting console.log-style output outright would make the tool far less useful for its most common real use case: recovering structured data someone copy-pasted from a browser dev console. When the input has genuinely ambiguous or broken escaping — an unescaped quote in the middle of what should be an escaped string, for instance — the tool surfaces a parse error at the specific point it breaks down rather than guessing at what was intended, since a wrong guess produces data that looks valid but silently isn't. Once successfully parsed, beautify the result with the JSON Formatter or catch any remaining structural issues with the JSON Validator.

Advertisement