JSON-formatter
Formatér, validér, minificér
Om dette værktøj
Format, validate and minify JSON. Privvert pretty-prints with custom indent, validates strictly with line/column errors, sorts keys alphabetically for consistent diffs, and minifies for shipping or storage.
Useful for inspecting API responses, cleaning up handwritten config files, preparing JSON for production, or quickly checking whether a payload is valid. All processing happens in your browser.
Funktioner
- Pretty-print with custom indent (2/4 spaces or tabs)
- Minify (remove whitespace)
- Strict validation with line/column error messages
- Sort keys alphabetically (deep)
- Live two-way panel
- Browser-only - data never uploaded
- Free and unlimited
- Highlights the exact character position of any syntax error
Sådan bruger du det
- Paste JSON.
- Pick format (with indent), minify, or sort keys.
- Copy the result.
Alt sker inde i din browser med JavaScript og WebAssembly. Dine filer bliver aldrig uploadet, aldrig gemt og aldrig set af os.
Ofte stillede spørgsmål
Strict JSON only. Strip comments and trailing commas before pasting, or use a JSON5 tool.
Trailing commas, single quotes, unquoted keys, missing commas, mismatched braces - and points to the exact line and column where the error starts.
Sorted JSON produces consistent diffs in version control. Two equivalent objects with keys in different order will diff as identical after sorting.
Hundreds of MB work in modern browsers. Very large JSON may slow your tab; consider streaming tools for files over ~100 MB.
Yes, up to the limit of your browser's memory and how fast the syntax highlighter can re-render. Documents of a few MB are fine on a modern machine; files of tens of MB may stutter while you type but still parse correctly.
No. The parser is strict RFC 8259 JSON - trailing commas, single quotes, unquoted keys and // comments will all be flagged as syntax errors. If you're working with config files that use those extensions, strip them before pasting.