FileGizmo Developer tools
Format and validate JSON
Validate, pretty-print, compact, and optionally sort JSON object keys locally. You are told when formatting would round a large number or drop a repeated key.
Simple by design
JSON formatter in three steps
Validate and format JSON without uploading API responses, configuration, test fixtures, or private data. Choose two-space or four-space indentation for readable output, or compact mode for transport and storage. Optional recursive key sorting creates predictable object ordering while preserving values and array order.
Invalid syntax produces the browser parser’s specific error rather than returning partial output. A 2 MB input guard protects responsiveness and encourages huge datasets to be handled with dedicated streaming tools. Formatting parses and serializes JSON, so insignificant source whitespace and original object-key formatting are intentionally replaced.
Everything runs in the current browser page with no account, saved history, or server request. The result is shown in a read-only monospace editor and can be copied immediately. Use formatted output for debugging and review, but remember that JSON object key order should not be treated as semantic application behavior.
Formatting is meant to change whitespace and nothing else, so this tool tells you when it cannot keep that promise. Two things are lost when JavaScript reads JSON and neither announces itself: an integer larger than about nine quadrillion comes back rounded, and a key that appears twice in the same object keeps only its last value. Both are reported above the output rather than being applied in silence.
That second case matters more than it sounds. A repeated key is usually the bug somebody is looking for, and a formatter that quietly collapses it has removed the evidence. If you are staring at an API response that behaves as though a field were missing, this is often why.
Sorting keys is optional and off by default. Sorted output is easier to diff between two responses, and unsorted output preserves the order the server sent, which is occasionally meaningful. Compact mode strips all whitespace for pasting into a field with a length limit.
Invalid JSON produces a plain explanation rather than a parser trace. Most failures are a trailing comma, a single quote where a double quote belongs, or an unescaped quote inside a string, and knowing that is more useful than a character offset.
The payload never leaves your browser, which is the point when it is an API response. Tokens, customer records, and internal identifiers routinely sit in the JSON people paste into online formatters, and every one of those pastes is a copy handed to a third party.
- 1
Paste JSON into the editor
- 2
Choose indentation and optional key sorting
- 3
Validate format and copy the result
Good to know
Frequently asked questions
Does FileGizmo modify values?
Values and array order remain intact; optional sorting changes object-key order only.
Is JSON uploaded?
No. Parsing and formatting happen directly in your browser.
What is the input limit?
The formatter accepts up to 2 MB per operation to protect page responsiveness.
Can it create compact JSON?
Yes. Choose compact indentation to remove unnecessary formatting whitespace.
Learn more