Skip to content
All tools

JSON Formatter & Validator

Paste JSON to beautify (2/4 spaces or tab), minify, sort keys and see syntax errors with line:column. Runs in your browser — free, with API.

·3 runs ·Developer API ↓
Result
Paste JSON into the box and click Format (Ctrl+Enter)

JSON is formatted right in your browser — never sent to the server, never stored.

Developer API

Developer API

Free

Call this exact tool from your code over JSON REST — same result as on the web, authenticated with an API key.

Endpoint

POST https://sieutool.net/api/v1/tools/json-format

Auth: send the X-API-Key header — create a free key in Account → API keys.

  • Rate limit60 requests/min
  • Daily quota1.000 requests/day
  • PriceFree · up to 1 items/request

Request parameters

ParameterTypeDescription
json *stringJSON — API tối đa 200.000 ký tự (mỗi dòng 1 mục)
indent"2" | "4" | "tab" | "min"Thụt lề(default "2")
sort_keysbooleanSắp xếp khoá(default false)

* required. Send JSON in the body, Content-Type: application/json.

Code examples

curl -X POST 'https://sieutool.net/api/v1/tools/json-format' \
  -H 'Content-Type: application/json' \
  -H "X-API-Key: $NXP_API_KEY" \
  -d '{"json":"{\"ten\":\"SieuTool\",\"tools\":[\"json-format\",\"2fa-code\"],\"mien_phi\":true}","indent":"2","sort_keys":false}'

Sample response

{
  "ok": true,
  "tool": "json-format",
  "version": "1.0.0",
  "data": {
    "valid": true,
    "output": "{\n  \"ten\": \"SieuTool\",\n  \"tools\": [\n    \"json-format\",\n    \"2fa-code\"\n  ],\n  \"mien_phi\": true\n}",
    "stats": {
      "keys": 3,
      "values": 6,
      "depth": 2,
      "bytes_in": 69,
      "bytes_out": 95,
      "big_numbers": 0
    }
  }
}

Try it (live call)

No API key yet? Sign in and create a free key, then paste it below. Create API key
Paste your API key (kept in this page only, never stored) and send a request. Test requests count toward your key's rate limit.

Main error codes

HTTPcodeMeaning
400BAD_INPUT / NO_INPUT / TOO_MANY_UNITS / BAD_NUMBER…Invalid input — the message names the field
401MISSING_API_KEY / INVALID_API_KEY / REVOKED_API_KEYMissing, invalid or revoked API key
429RATE_LIMITED / IP_RATE_LIMITEDPer-minute rate limit exceeded — wait for Retry-After
429DAILY_QUOTA_EXCEEDEDDaily quota used up — the upgrade field suggests a paid plan
429CLUSTER_QUOTA_EXCEEDEDLinked accounts (same device/network) used up the daily quota — the free quota is shared across the group, not multiplied per account
503SERVER_BUSY / TOOL_BUSY / API_DISABLEDServer under heavy load or API paused — wait for Retry-After

Every response carries X-RateLimit-Remaining / X-RateLimit-Remaining-Day; 429/503 errors include Retry-After (seconds).

How to use

A JSON formatter for developers working with APIs, webhooks and config files: paste messy or single-line JSON to get a readable indented view, or minify it for sending. If the JSON is invalid, the tool points to the exact line and column and explains the error. Everything runs in your browser.

  1. Paste JSON into the left box (or click Try an example). Large API responses of several MB are fine.
  2. Pick a style: 2 spaces, 4 spaces, Tab or Minify (one line); enable Sort keys to order keys alphabetically.
  3. Click Format (Ctrl+Enter). Valid JSON appears in the result box with key count, depth and size; invalid JSON shows line:column and the text near the error.
  4. Click Copy or Download .json to take the result.

Frequently asked questions

Paste it and click Format. Valid JSON shows "Valid JSON" and the beautified version; otherwise the tool shows the line, column and reason — e.g. trailing comma, single quotes, unquoted keys or // comments.

Minifying removes extra spaces and line breaks so JSON is smaller to send over an API, store in a database or paste into an environment variable. The data stays the same.

JavaScript only keeps integers exact up to 9,007,199,254,740,991. Longer numbers get rounded when formatting — the tool warns when it sees them; keep such IDs as quoted strings.

Not on the web. JSON is processed in your browser; the server only records 1 run (without the content) and nothing is saved in your browser. With the API, JSON is sent to the server and formatted in memory, not stored, and its content is not logged.
All Utilities tools →
Sends only the tool name, the last error code and your browser type — never what you typed.