JSONWeave / Format, beautify and minify JSON
JSON formatter, beautifier and minifier
Turn a single line of JSON into readable, indented text, or squeeze it back down for a payload. Formatting runs locally in your browser, so API responses and config files stay on your machine.
Format JSON in the workspaceFormat, pretty print and beautify
Format JSON restructures the document with consistent indentation. Choose 2 spaces, 3 spaces, 4 spaces or tabs in Settings. The command is in the toolbar and the command palette, with a keyboard shortcut.
{"id":42,"tags":["api","json"],"owner":{"name":"Ada","active":true}}{
"id": 42,
"tags": [
"api",
"json"
],
"owner": {
"name": "Ada",
"active": true
}
}Minify JSON
Minify removes all insignificant whitespace. Use it before embedding JSON in a request body, an environment variable or a test fixture, where every byte or line break matters.
Sort keys
Sort keys alphabetically makes two documents easier to compare by eye and keeps configuration files stable under version control. Array order is never changed.
Formatting JSON that is not valid
Many formatters refuse input with a syntax error. JSONWeave parses tolerantly, so a document with a trailing comma or an unquoted key still opens and can be read. To get a clean result from invalid input, run the repair step and check the preview.
Large documents
Documents above roughly 800 KB are parsed in a Web Worker, so the page stays responsive while you scroll and type.
Frequently asked questions
How do I pretty print JSON?
Paste or open the JSON in JSONWeave and run Format JSON from the toolbar or the command palette. Pick the indentation in Settings.
Does formatting change my data?
No. Formatting only changes whitespace. Key order is preserved unless you run Sort keys.
Is JSONWeave free?
Yes. It is free and open source under the MIT license, with no account.
Related
Ready to try it on your own JSON?
Open the workspace, paste or drop a file, and nothing leaves your browser.
Format JSON in the workspace