Online JSON repair

Paste invalid or messy JSON on the left. Validate checks syntax without changing text; Repair fixes common issues, pretty-prints standard JSON, highlights changes in green—click the output to copy.

About online JSON validate and repair

Paste broken JSON from API logs, CI configs, or half-copied responses—click Validate to check syntax without changing your text, or Repair to produce standard JSON you can copy.

Repair handles trailing commas, // comments, single quotes, unquoted keys, and sometimes missing closing brackets, then pretty-prints with 2-space indent. Green marks on the right show what changed compared to your original paste.

Online JSON repair capabilities

Validate

Checks whether the text is valid JSON—no rewriting. Success shows formatted output; failure shows an invalid message and, when possible, an approximate line and column in the input.

Repair

  1. If input is already valid, output is pretty-printed and labeled already valid—no green highlights.
  2. If repair succeeds, output is standard JSON; green marks show what differed from your original text.
  3. A short fix list (comments, trailing comma, quotes, keys, structure) summarizes what likely changed.

Highlighted output

Green spans are characters in the repaired result that differ from your paste. Click the output area to copy plain JSON.

When repair fails

Severely truncated or plain non-JSON text may not be fixable. Use Validate to see where it breaks, edit manually, or compare with a known-good sample on the JSON formatter page.

Typical search scenarios

Unexpected token in CI or config

Paste the failing fragment, click Repair, and use green highlights to spot removed trailing commas or comments before you commit the fixed block.

Half-copied API response

Validate points to the rough line/column; Repair tries to close brackets and normalize quotes. Review highlights before using in production.

JavaScript-style object literal

Single-quoted strings and unquoted keys from devtools are not standard JSON—Repair converts them for request bodies and API examples.

Frequently asked questions

How is this different from the JSON formatter?
The formatter needs valid JSON before Format or Minify. This page accepts messy text—Validate checks only; Repair rewrites, pretty-prints, and shows changes in green.
What does green highlighting mean?
Green marks characters in the repaired output that differ from your original paste. Unmarked text stayed the same at the text level—often whitespace or unchanged keys.
Does repair support comments or trailing commas?
Repair tries to remove // comments and trailing commas so the result is valid standard JSON. Output does not keep comments—strict JSON does not allow them.
Can repair fix truncated JSON?
Sometimes missing closing brackets are guessed—use highlights to verify. Random prose or totally wrong text shows as unrepairable with a line/column hint when available.
Is my JSON uploaded?
Processing runs in your browser session like other hidevtool pages—paste sensitive payloads only on devices you trust.

Common broken patterns

  • {"a":1,}Trailing comma before } — typical Repair fix
  • {key:'value'}Single quotes and bare keys → standard JSON
  • // note\n{"x":1}Line comments stripped, object kept
  • Validate onlyPass/fail check with no rewrite