JSON

Format, validate and minify

No database: AIMRAN doesn't store your files, text or results

What is JSON?

This tool tidies up and checks JSON data. If your JSON is all on one line, you'll see it properly indented and readable; if it has an error, it tells you exactly which line and column it's on.

You can also do the opposite and compact it onto a single line so it takes up less space, or explore it as a collapsible tree to understand its structure.

How to use it

  1. Paste your JSON into the input field or open a .json file.
  2. If there's an error, fix it at the line and column shown.
  3. Choose the view: Formatted, Minified or Tree.
  4. Set the indentation and, if you like, sort keys from A to Z.
  5. Copy the result or download it.

Advantages

Technical details

The text is parsed with the standard JSON parser (ECMA-404 / RFC 8259), so comments, trailing commas and single quotes are not allowed; on error, the line and column are calculated and the context is shown. Formatting uses the chosen indentation, and the sort keys option is applied recursively to every object. The minified version removes all insignificant whitespace and shows its size in bytes. The tree view expands the first two levels and paginates arrays and objects with more than 200 items. You can open .json, .geojson and .txt files up to 50 MB.

Frequently asked questions

How do I validate JSON?

Paste it into the tool. If it's valid you'll see the formatted result; if not, a message with the line and column of the error.

How do I format one-line JSON?

Paste it and choose the Formatted view with 2 or 4 spaces of indentation. You can copy or download it.

What does minifying JSON mean?

Removing unnecessary spaces and line breaks so it takes up less space, without changing the data.

Why does my JSON fail with single quotes?

The JSON standard only allows double quotes for keys and strings. It also doesn't allow trailing commas or comments.

More Documents & data tools