Skip to content
Raisalon

Developer tool

JSON Formatter and Validator

Format, minify, validate, and sort JSON in your browser, with error messages that point to the exact line and column of a syntax problem.

Output style

How to use it

Paste JSON into the input box. The result updates as you type:

  • Format re-indents the document with two spaces, four spaces, or tabs.
  • Minify removes all insignificant whitespace, which is useful before embedding JSON in a URL, an environment variable, or a request body.
  • Sort keys orders object keys alphabetically at every level, which makes two documents easier to compare in a diff.

If the input is not valid JSON, the tool shows the parser’s message together with the line and column where parsing stopped. The real mistake is usually at that position or just before it.

Common JSON errors

Most invalid JSON comes from habits carried over from JavaScript or Python:

Problem Invalid Valid
Trailing comma [1, 2, 3,] [1, 2, 3]
Single-quoted strings {'a': 1} {"a": 1}
Unquoted keys {a: 1} {"a": 1}
Comments {"a": 1 // note} {"a": 1}
Python literals {"ok": True} {"ok": true}
Special numbers {"x": NaN} {"x": null}

JSON also requires double quotes inside strings to be escaped as \", and control characters such as raw tab or newline characters to be written as \t and \n.

Privacy

Formatting happens entirely in your browser using the built-in JSON.parse and JSON.stringify functions. Nothing you paste is sent to a server, so the tool is safe to use with configuration files and API responses. Even so, avoid pasting production secrets into any web page you do not control.

Precision note

JavaScript represents numbers as 64-bit floating point values. Integers larger than 9,007,199,254,740,991 (2⁵³ − 1), such as some database IDs, lose precision when parsed and re-serialised. If your data contains very large integers, store them as strings.

More tools

  • Developer

    Base64 Encoder and Decoder

    Encode text to Base64 or decode Base64 back to text, with full UTF-8 support and an optional URL-safe alphabet for tokens and URLs.

    Open tool

  • Developer

    Unix Timestamp Converter

    Convert Unix timestamps in seconds or milliseconds to readable UTC and local dates, and convert dates back to timestamps, with live current time.

    Open tool

  • Machine learning

    Classification Metrics Calculator

    Calculate accuracy, precision, recall, F1, specificity, balanced accuracy, and Matthews correlation coefficient from a binary confusion matrix.

    Open tool