Format or minify
Expand JSON for readability or remove unnecessary whitespace for compact transfer.
Format, minify, sort, and validate JSON locally with clear syntax feedback.
Data handling
Advertising and analytics are separate site services. We do not send selected tool input to them. Read the Privacy Policy for details.
How it works
Use the formatter to make standard JSON easier to read, compare, copy, or download. It parses the input first, so an error remains visible instead of producing a plausible-looking but broken copy.
Step 01
Add one JSON value: an object, array, string, number, boolean, or null.
Step 02
Format with two spaces, four spaces, or tabs; optionally sort object keys; or minify the parsed value.
Step 03
Use the reported root type and syntax location to check the output before copying or downloading formatted.json.
Clear and private
The browser parses and serializes your JSON locally. Invalid input produces a syntax message and location when the browser provides one.
Expand JSON for readability or remove unnecessary whitespace for compact transfer.
Alphabetize keys inside nested objects while preserving the order of array items.
Output is displayed as plain text and can be copied or downloaded only after successful validation.
Objects, arrays, strings, numbers, booleans, and null are all valid JSON documents.
FAQ
Formatting changes whitespace and indentation, not the represented values. Enabling key sorting intentionally changes object-key order, which normally has no semantic meaning in JSON.
No. It removes insignificant whitespace while retaining the parsed JSON values. The result may normalize number representation and escape sequences because it is serialized again.
Not reliably in this version. Standard JSON parsing keeps the last value for a repeated key, so avoid using duplicate keys when their distinction matters.
No. Validation, formatting, sorting, and minification run locally in your browser. Got A Tool does not receive the JSON.
Keep working
Compare two texts and spot added, removed, and edited lines with word or character highlights. Your text stays in your browser.
Open tool →Count words, Unicode characters, sentences, paragraphs, lines, bytes, and estimated reading time locally.
Open tool →Convert text to uppercase, lowercase, title, sentence, camel, Pascal, snake, kebab, or constant case.
Open tool →Convert Unix seconds or milliseconds to readable dates and timezone-explicit ISO dates back to timestamps.
Open tool →0 characters
Parsing and formatting happen locally. Avoid pasting secrets into any tool unless you understand how your device and browser handle clipboard data.