Skip to content

JSON formatter and validator

Paste JSON to format it with clean indentation, check it for errors, or minify it to one line.

Loading tool…

How do I format and validate JSON?

Paste your JSON and choose Format. If it is valid, it is re-indented so nested objects and arrays are easy to read. If it isn't, you'll see what went wrong and the line and column where the problem starts. The most common mistakes are trailing commas, single quotes instead of double quotes, and keys without quotes.

Minify removes all spaces and line breaks for the smallest possible size, and Sort keys puts object keys in alphabetical order, which makes two JSON files easier to compare. Everything happens in your browser, so your text is never sent to our server.

How it works

  1. Paste your JSON

    Or open a .json file.

  2. Format, minify or validate

    Errors show the line and column.

  3. Copy or download

    Save the result as a .json file.

Guide

Questions

Why is my JSON invalid?

Usually a trailing comma after the last item, single quotes, a missing comma between items, or a key without double quotes. The error shows where to look.

Is my JSON uploaded?

No. It is parsed by your browser, so it is safe to paste API responses and config files.

Can it handle large files?

Yes, several megabytes work on a computer. Very large files may be slow on phones.