⭐ Starlight Tools / JSON Formatter & Validator

JSON Formatter & Validator

Pretty-print, minify, and validate your JSON—fully client-side for privacy.

Input: 0 B Output: 0 B Saving: —

About this tool

This JSON Formatter & Validator runs entirely in your browser—no uploads, no external APIs. It uses the native JSON.parse and JSON.stringify for correctness. Enable Sort object keys for deterministic diffs, or allow the fixer to gently remove common trailing commas before validation.

Shortcuts

  • Ctrl/Cmd + Enter – Pretty print (2 spaces)
  • Ctrl/Cmd + Shift + M – Minify

FAQ

Does any JSON I paste get uploaded?

No. Everything runs locally in your browser. Nothing is sent anywhere.

Why do I see “trailing comma” errors?

Standard JSON does not allow trailing commas. Enable the “Attempt to fix trailing commas” option to remove common cases before parsing.

What does “Sort object keys” do?

It alphabetically sorts keys in objects, which helps with diffing and stable output. It does not change arrays.