Quick Task

JSON Formatter

Pretty-print, minify, validate or sort JSON. Errors show the line and column so you can fix them quickly. Your data stays in your browser.

Result

What the buttons do

  • Format indents the JSON so it is easy to read. Minify removes all spaces and line breaks to make it as small as possible.
  • Sort keys formats the JSON with the keys of every object in alphabetical order, which makes two files easy to compare.
  • Validate only checks the syntax and tells you where the first error is.
  • Escape as string turns JSON into a quoted string you can put inside other JSON or code; Unescape string does the reverse.