Skip to tools

Formatters

JSON Formatter / Beautifier

API responses, log lines and config exports often arrive as one long line of JSON that is almost impossible to read. The JSON Formatter parses your text, checks that it is valid JSON, and rewrites it with consistent two-space indentation so every object and array sits on its own level.

If the input is broken — a trailing comma, a missing quote, a single-quoted key — the formatter stops and points to the line where parsing failed, so you can fix the problem instead of guessing. Everything runs in your browser, which makes it safe for tokens, customer records or internal payloads.

How to use the JSON Formatter / Beautifier

  1. 1Use the JSON Formatter / Beautifier right on this page, or open the full workspace for history, sharing and every other tool.
  2. 2Paste your input, upload a file, or drag and drop a file onto the input box (up to 25 MB).
  3. 3The result appears in the output panel automatically and updates when you change the input or an option.
  4. 4Use Copy Output or Download to save the result. Nothing is uploaded to a server.

Example

A compact one-line object is expanded so each key is on its own line and nested values are indented.

Input
{"name":"Ada","skills":["math","logic"],"age":36}
Output
{
  "name": "Ada",
  "skills": [
    "math",
    "logic"
  ],
  "age": 36
}

When to use it

  • Reading a minified REST or GraphQL response while debugging an integration
  • Checking that a hand-edited package.json, tsconfig.json or settings file is still valid
  • Preparing readable JSON snippets for documentation, tickets or code reviews

Tips and common mistakes

  • Trailing commas and single-quoted keys are not valid JSON — the formatter points to the line to fix.
  • Comments (// and /* */) are kept in the output, which is handy for JSONC files such as tsconfig.json; remove them before sending data to strict JSON parsers.
  • For deeply nested data, open the JSON Tree Viewer to collapse branches you do not need.

Frequently asked questions

Does the JSON Formatter change my data?

No. It only changes whitespace. Keys, values and their order stay exactly as they were — even very long numbers such as 64-bit IDs (12345678901234567890) are kept digit for digit.

How large a JSON file can I format?

You can upload or drop files up to 25 MB. Large files are formatted in the background so the page stays responsive.

TutorialWhat is JSON? A quick primer for developers

Related tools

Ready to try it?

Free, no sign-up, and your data never leaves your browser.