Best Free JSON Formatter & Validator
Kuchenesa, minify uye kuongorora JSON nechokwadi matambudziko meseji - free, hapana akachengetwa.
Maitiro ekushanda
- Paste JSON. Dzvanya yako JSON mubhokisi.
- Choose an action. Kuchenesa ne 2 kana 4 nzvimbo, kana minify kune imwe mharidzo; zvakasiyana siyana kutsvaira mabhureki.
- Get the result. Zvakarurama JSON anogadzirwa nguva dzose; zvisina kururama JSON anodzokera zvakajeka romugwagwa uye kodhi yematambudziko.
Nezve iyi chirongwa
Peta JSON kuti uiprinte zvakanaka nekudzvanya kwaunoda, wedzera kumusoro kana pasi kusvika pamhinduro imwe chete, kana tarisa kuti iri nyore. Kana kuparsing kusingaiti, unowana meseji yakajeka ine mharidzo yemutsara nemusoro wenyaya, kuitira kuti ugone kuwana shoko rako rakaipa kana bracket yasara. Unogonawo kuisa mabhureki ezvinhu muzvinyorwa. Inoshanda paserver-side ne Python's JSON parser, isingachengeti chero chinhu, uye haina kubhadhara.
Chii vanhu vanoshandisa kuti
- Kuita minified API mhinduro inoverenga
- Find the line and column of a JSON syntax error
- Minify JSON pamberi pekuisa mu config
- Kugadzirisa zviratidzo zvechigadzirwa kuti zviwedzere pakati pezvimwe JSON mafaera
Developer API
Automatize iyi chirongwa kubva yako pachako code. Send a POST request to the endpoint below and get the same result the web tool produces. It is rate-limited per IP and needs no signup - API keys for higher limits are coming.
https://best.free/api/tools/json-formatter/
| Parameter | Mufananidzo | Anodarika | Nhoroondo |
|---|---|---|---|
text |
{"b":2,"a":1} |
Yes | Raw JSON to format. |
action |
format |
Hapana | "format" or "minify". |
indent |
2 |
Hapana | 0-8 spaces. |
sort |
True |
Hapana | 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);
Kutenda: JSON with the formatted string + validity.
{"ok": true, "json": "{\n \"a\": 1,\n \"b\": 2\n}", "json_valid": true}