Map Extract
Free tool

JSON formatter and validator

Paste JSON from an API, an export or a settings file to indent it, check it is valid and find the exact line and column where it breaks. Switch to the tree view to explore nested data and copy the path to any value.

Runs in your browser. Nothing you enter is uploaded.

Example: a hand-edited record that will not load

Someone edited a business record by hand and used single quotes around one key, which JSON does not allow. The validator stops at that point and shows the line with a caret under the problem, so there is no need to read the whole file.

Once the quotes are fixed, the same text formats cleanly and the message changes to Valid JSON.

Input
{
  "name": "Harbour Bakery",
  "town": "Whitby",
  'open': true
}
Result
Invalid JSON at line 4, column 3: Expected double-quoted property name in JSON at position 52 (line 4 column 3)
  'open': true
  ^

Formatting and exploring JSON

  1. Paste the JSON

    An object, an array or a whole API response. The result updates as you type and shows a tick when the text is valid.

  2. Choose the layout

    Indent with 2 spaces, 4 spaces or tabs, or Minify to remove all whitespace for a config file or an API request.

  3. Sort keys if useful

    Sort keys A to Z puts object keys in alphabetical order at every level, which makes two versions of a record much easier to compare.

  4. Open the tree view

    Switch View to Tree to expand and collapse nested objects. Click a value to see its path, such as $.results[0].status, and copy it.

  5. Copy or download

    In text view, copy the formatted result or download it as formatted.json.

Errors you will meet most often

ProblemLooks likeFix
Trailing comma["bread", "cakes",]Remove the comma after the last item
Single quotes'open': trueUse double quotes for keys and strings
Unquoted key{name: "Harbour"}Put the key in double quotes
Comments// noteJSON has no comments; remove them
Missing comma between items"a": 1 "b": 2Add a comma after each value except the last
Values copied from JavaScriptNaN, undefinedReplace with null or a number

Questions people ask

How do I check if JSON is valid?

Paste it into the box. If it parses, a Valid JSON tick appears and the formatted version is shown. If not, you see the error message from the browser's own JSON parser and, where it reports a position, the line and column with a caret under the character where parsing stopped.

What does Sort keys A to Z do?

It reorders the keys inside every object alphabetically, at every level of nesting, while leaving the order of items in arrays alone. The data means exactly the same thing. It is useful before comparing two records with a diff tool, because matching keys then line up.

What is a JSON path?

A path describes where a value sits inside the data, starting from $ for the top. $.results[0].status means the status key of the first item in the results array. Many tools, spreadsheets and automation platforms accept paths like this to pick out one field from an API response.

Can it handle large files?

It works on whatever your browser can hold in memory, so files of a few megabytes are usually fine. Very large exports can make the page slow, especially in tree view. For those, minify or split the file first, or use a desktop editor.

Is my JSON uploaded?

No. Parsing, formatting and the tree view all run in your browser. Nothing you paste, including API keys or customer data inside the JSON, is sent to Map Extract or any other server.

Where your data goes

Everything runs in your browser. The JSON you paste is not uploaded to Map Extract or anywhere else.

Checked against the tool on

Top