Was macht JSON Formatter & Validator?
JSON Formatter & Validator hilft dabei, Daten zu formatieren und zu prüfen. Die Verarbeitung erfolgt im Browser und Grenzen werden klar beschrieben. Geprüfte Funktionen: Strict RFC 8259 parsing, 2-space, 3-space, 4-space, or tab indentation, JSON5 repair, Lossless large-number mode, Searchable tree view, Local file input and optional draft restore.
Choose strict, repair, or lossless behavior deliberately
Use strict formatting for API payloads, Repair JSON5 only for known relaxed input, Tree view for inspection, and Lossless numbers when every numeric digit must survive.
Wie wird es verwendet?
- Paste, type, or open one JSON document.
- Choose indentation, key sorting, minification, lossless numbers, or Tree view.
- Correct any reported syntax location, optionally repair JSON5 syntax, then copy or download formatted.json.
Echtes Ein- und Ausgabebeispiel
Format one compact object
Eingabe
{"project":"KitLumi","local":true}Ausgabe
{
"project": "KitLumi",
"local": true
}The parser validates the document first and then prints the same parsed values with two-space indentation.
Häufige Fehler und Korrekturen
| Symptom | Wahrscheinliche Ursache | Korrektur |
|---|---|---|
| Parsing stops near a property name. | The key uses single quotes or no quotes. | Wrap every property name and string in double quotes. |
| A large integer changes after formatting. | Standard mode uses JavaScript Number and the value exceeds safe-integer precision. | Enable Lossless numbers or represent identifiers as JSON strings. |
Strict JSON, explicit repair, and numeric precision
Konkrete Grenze dieses Werkzeugs: Strict mode rejects comments, trailing commas, single quotes, NaN, Infinity, and undefined. Repair JSON5 converts supported extensions; Lossless numbers keeps exact numeric text.
Standards und Implementierungsquellen
- RFC 8259 — JSON (opens in a new tab)Defines the JSON grammar and value types.
- MDN — JSON.parse() (opens in a new tab)Documents the browser parser used by the page.
JSON Formatter — FAQ
Does the JSON Formatter upload data?
No. Parsing, formatting, key sorting, and minification run in the current browser tab.
Does it accept JSON5 or comments?
Strict formatting rejects JSON5 extensions, but Repair JSON5 can deliberately convert comments, trailing commas, single quotes, and unquoted keys to strict JSON.
Can it preserve very large numbers?
Yes. Enable Lossless numbers to keep the original JSON number text instead of rounding through JavaScript Number.
Was wurde geändert?
Inhaltliche Aktualisierung: JSON Formatter: Added file input, three-space indentation, JSON5 repair, lossless-number mode, searchable tree view, undo and redo, auto-format control, opt-in draft restore, fullscreen, and printing.