unstringify.com
Open the app
Formats

JSON

The format everything else is compared against, and the one people paste broken most often.

How it opens

JSON parses into the document shape — one root value, browsed as a tree.

Nothing is chosen by file extension alone: every adapter scores the text itself and the highest confidence wins. When two are close enough that guessing would be a coin flip, the app asks instead of picking.

  • extensions · .json, .json5, .jsonc, .har, .geojson
  • media type · application/json
  • shape · document
  • extra diagnostics · this adapter lints beyond what parsing reports

Fixing

20 steps run over a JSON document, in this order. Nothing is applied until you say so, and each fix can be kept or dropped on its own.

  • Strip leading byte-order mark (BOM)
  • Normalise common encoding glitches (mojibake)
  • Escape string values whose content is raw JSON
  • Escape raw newlines and embedded `"` inside string values
  • Split `"key: "value"` into `"key": "value"`
  • Strip `//` and `/* */` comments (not legal JSON)
  • Replace 'single' with "double" quotes
  • Insert missing commas between sibling values
  • Insert missing `:` between property name and value
  • Quote bare identifier keys
  • Remove trailing commas before } or ]
  • Insert `null` for empty value slots in objects/arrays — a judgment call — excluded from safe-repair-on-paste
  • Replace JS/Python literals (True, False, None, NaN, Infinity, undefined) with JSON equivalents — a judgment call — excluded from safe-repair-on-paste
  • Collapse one level of double-escaping — a judgment call — excluded from safe-repair-on-paste
  • Convert literal newlines/tabs in strings into proper JSON escapes
  • Repair broken `\uXXXX` escapes inside string literals
  • Canonicalise non-JSON number literals (leading dot, octal, etc) — a judgment call — excluded from safe-repair-on-paste
  • Quote bare identifier values (`production` → `"production"`)
  • Insert missing close brackets when an array/object closes with the wrong glyph — a judgment call — excluded from safe-repair-on-paste
  • Drop content after the document root — reported, never applied unless you ask
A judgment call can say something your document did not, so it is separated from the mechanical ones on purpose.

Nesting

A JSON value can hold another system's output — a stringified body, an escaped document. Unpack opens it in place, names the parser that opened it, and repeats until nothing parses. Pack restores the original text byte for byte rather than re-serializing from the tree.

A sample

The document below is the fixture this adapter ships and its own tests parse — not an illustration written for this page.

clean-order-example.json
{
  "order_id": "ord_8f3aa19c4d",
  "status": "fulfilled",
  "customer": { "id": "cus_4129", "verified": true },
  "items": [
    { "sku": "BRD-OAK-002", "qty": 1, "unit_price": 124.00 },
    { "sku": "OIL-MNRL-008", "qty": 2, "unit_price": 12.50 }
  ]
…