Best Free JSON Formatter & Validator
Beautify, minify and validate JSON with clear error messages. Free, nothing stored.
Yadda yake aiki
- Paste JSON. Drop your JSON into the box.
- Zaɓi aiki. Beautify with 2 or 4 spaces, or minify to one line; optionally sort keys.
- Get the result. An yi wa JSON da ta dace siffar a hankali; JSON da ba ta da inganci na mayar da layin da kuma ƙudurin kuskure.
Game da wannan kayan aiki
Paste JSON to pretty-print it with the indent you choose, minify it down to a single line, or just check that it is valid. If parsing fails you get a clear message with the line and column of the problem, so you can find the stray comma or missing bracket quickly. You can also sort object keys by alphabet. It runs server-side with Python's JSON parser, stores nothing, and needs no account.
Abin da mutane suke amfani da shi ga
- Yi wa mai amsa API mai ƙarancin girma karatu
- Ka gano layin da ƙuƙumma na kuskure na harshe JSON
- Ka rage JSON kafin ka sanya shi cikin tsari
- Yi tsari da maɓallan abu don bambanta fayiloli biyu JSON
Mai ƙãga halitta
Yi amfani da wannan kayan aiki daga cikin lissafinka. Ka aika da tambaya zuwa ga maɓallin ƙarshe a ƙasa kuma ka samu sakamakon da kayan aikin yanar gizo ke samarwa. Yana da iyakacin gudun ga IP kuma ba ya buƙatar yin rajista - maɓallan API don iyaka masu girma suna zuwa.
https://best.free/api/tools/json-formatter/
| Parameters | Misali | Required | Notes |
|---|---|---|---|
text |
{"b":2,"a":1} |
Yes | Raw JSON to format. |
action |
format |
No | "format" or "minify". |
indent |
2 |
No | 0-8 spaces. |
sort |
True |
No | Sort keys. |
curl -X POST https://best.free/api/tools/json-formatter/ \
-H 'Content-Type: application/json' \
-d '{"text": "{\"b\":2,\"a\":1}", "action": "format", "indent": 2, "sort": true}'
import requests
r = requests.post(
"https://best.free/api/tools/json-formatter/",
json={"text": "{\"b\":2,\"a\":1}", "action": "format", "indent": 2, "sort": True},
)
print(r.json())
const r = await fetch("https://best.free/api/tools/json-formatter/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: "{\"b\":2,\"a\":1}", action: "format", indent: 2, sort: true }),
});
const data = await r.json();
console.log(data);
Mawallafi: JSON with the formatted string + validity.
{"ok": true, "json": "{\n \"a\": 1,\n \"b\": 2\n}", "json_valid": true}