Skip to content
Konvertavimas.lt

JSON Formatter and Validator

Format, validate and minify JSON in your browser – your data is never uploaded.

Indentation

How to use it

Paste JSON into the box or load a .json file. Choose the indentation (2 spaces, 4 spaces or a tab) and press Format. The result replaces the text in the same box, so you can chain actions.

  • Format – adds line breaks and indentation.
  • Minify – removes all unnecessary whitespace to make the file as small as possible.
  • Validate – only checks the syntax and leaves your text unchanged.
  • Sort keys – sorts object keys alphabetically on every level.

Finding errors

If the JSON is invalid you will see a message with the line and column number, and the Go to error button selects that spot in the text. Common causes are a trailing comma, single quotes instead of double quotes, comments and unclosed brackets.

Browsers describe errors differently, so sometimes the real mistake is a little before the reported position.

Statistics and privacy

After each action the tool shows the size in bytes, the total number of keys and the maximum nesting depth. This is handy when checking API responses or configuration files.

Everything runs on your device: the JSON is never uploaded to a server, so it is safe to check confidential data. Note that JavaScript may round very large numbers (more than about 15 significant digits).

Frequently asked questions

More converters