Skip to content
BETACurrent release v0.4.0-betaRelease notesGitHub

JSON formatter

Paste JSON (starting with { or [). You get pretty-printed, colour-highlighted output. Enter copies exactly what is shown.

The JSON formatter showing a pretty-printed, colour-highlighted object with options for indent, sorting and minifying.

  • Pretty / Minified.
  • Indent: 2 spaces, 4 spaces or tabs.
  • Sort keys.
  • Stats: type, depth and size.
  • Comments, trailing commas, single quotes and unquoted keys are accepted. The badge then says “relaxed JSON → fixed”.
  • JSON that has been encoded as a string ("{\"a\":1}") is unwrapped automatically.
  • Errors show the line and column with a caret under the problem.

Short text like [wip] fix is not treated as JSON: the error view only appears when the input is clearly meant to be JSON.

An → CSV button turns an array of objects into a table: see CSV ⇄ JSON. Copied JSON up to 20 KB is kept in Recent.

Support the project: Buy Me a Coffee or GitHub Sponsors.