TOOL

JSON FORMATTER

Paste JSON to format, validate, and minify it instantly. Syntax errors are highlighted with line and column numbers.

ACTION

ABOUT THIS TOOL

JSON (JavaScript Object Notation) is the standard data format for APIs, config files, and data exchange between services. When you're working with raw API responses or debugging a config file, unformatted JSON is nearly impossible to read at a glance.

This formatter takes your JSON, parses it, and outputs it with consistent indentation — making the structure immediately visible. The validator highlights exactly where a syntax error is, rather than just telling you the JSON is "invalid."

The minifier does the reverse: it removes all whitespace to produce the most compact possible JSON string — useful before sending data over a network or storing in a size-constrained field.

All processing happens in your browser via the native JSON.parse and JSON.stringify APIs. Nothing is sent to a server.

FAQ

Why is my JSON invalid?

Common causes: trailing commas after the last item in an object or array (allowed in JavaScript but not JSON), single quotes instead of double quotes, unquoted property keys, or a missing closing bracket or brace. The error message will show the line and column where parsing failed.

What's the difference between format and minify?

Formatting adds consistent indentation and newlines to make JSON human-readable. Minifying removes all unnecessary whitespace to produce the smallest possible string. Use formatting when you're debugging. Use minifying before sending data over a network or embedding JSON in code.

Is my JSON data private?

Yes. The tool uses the browser's built-in JSON parsing — no data is sent to any server. You can use this tool safely with production API keys, credentials, or sensitive configuration data.

What indentation size does the formatter use?

2 spaces — the most common convention for JSON. This matches the default used by JSON.stringify(data, null, 2) in JavaScript.