MUTools

JSON Linter

JSON Linter checks the syntax of JSON text you paste in and formats it for readability. It validates value types, bracket matching, and the picky comma/colon rules of JSON. When it finds a problem, it reports the line and column with a clear message. The formatted output is one click away from your clipboard.

Indent
Press "Format & validate" to see the result here.

Everything is processed entirely in your browser and is never sent to a server.

About JSON Linter

JSON Linter checks the syntax of JSON text you paste in and formats it for readability. It validates value types, bracket matching, and the picky comma/colon rules of JSON. When it finds a problem, it reports the line and column with a clear message. The formatted output is one click away from your clipboard.

Pick an indent style — 2 spaces, 4 spaces, or tab — to match API payloads, config files, log dumps, or anything else. Enable "Allow JSONC" to validate and format JSONC dialects (used by VS Code config files) that include line comments //, block comments /* */, and trailing commas.

All processing happens entirely in your browser — your JSON is never sent externally. API responses or anything sensitive is safe to format here. Runs entirely in your browser.

How to use

  1. Paste the JSON text you want to validate or format into the input box.
  2. Pick the output indent: "2 spaces", "4 spaces", or "Tab".
  3. Toggle "Allow JSONC" if your input contains comments or trailing commas.
  4. Click "Format & validate" — valid JSON renders formatted output; any error shows the line/column and description.
  5. Use the "Copy" button at the top right of the output to copy the result and paste it wherever you need it.

Use cases

  • Engineers turning a one-line JSON from an API response or log into something readable.
  • Developers validating settings.json / tsconfig.json or other VS Code JSONC files.
  • Operators tracking down a syntax error in a JSON dump from an external tool.
  • Learners using direct feedback to nail down JSON rules (double quotes required, no trailing commas).
  • Teams normalizing indent style across JSON files before committing.

Notes

  • Validation and formatting happen entirely in the browser; your JSON is never sent externally.
  • Strict JSON mode (JSONC off) treats comments and trailing commas as syntax errors.
  • Comments survive formatting only in JSONC mode. Turn JSONC off to strip them.
  • Very large JSON (tens of megabytes) may slow down the browser.
  • Output line endings are normalized to LF (\n). Convert at the destination if you need CRLF.

FAQ

Is the JSON sent to a server?
No. Formatting and validation run entirely in your browser, so personal or sensitive JSON is safe to paste in.
What is the difference between JSON and JSONC?
JSON is the strict ECMA-404 dialect: no comments, no trailing commas. JSONC is the JSON-with-comments dialect used in VS Code settings, allowing // line comments, /* */ block comments, and trailing commas. Toggle "Allow JSONC" to validate and format JSONC.
Comments disappear when I format.
Strict JSON mode treats comments as syntax errors. Turn on "Allow JSONC" to keep them — JSONC mode preserves their original positions on output.
I see an error but the message is unclear.
The output shows the line and column along with a clear message like "Colon (:) expected" or "Comma (,) expected", and the gutter on the input highlights the offending line. Errors can cascade, so fix them in order starting from the first.
Can I match my project’s indent style?
"2 spaces", "4 spaces", and "Tab" are all available so the output matches your coding standards.