मुख्य सामग्री पर जाएँ
Toolioz logoToolioz
डेटा फ़ॉर्मैटिंग

JSON फ़ॉर्मैटर और वैलिडेटर

ब्राउज़र में JSON को व्यवस्थित करें, जाँचें, छोटा करें या YAML और TypeScript में बदलें।

फ़ॉर्मैटिंग
रूपांतरण

परिणाम

(फ़ॉर्मैट करने पर आउटपुट यहाँ दिखेगा)
संक्षिप्त उत्तर
डेवलपर टूल

Format, validate, and convert JSON to TypeScript or YAML

This page pretty-prints JSON with 2 or 4 spaces, minifies it, and can emit YAML or TypeScript from a value that parses. The text is not uploaded. The site still loads scripts and analytics.

मुख्य बातें

  • Pasted JSON stays in the tab when the page is labelled local processing. Analytics for the website still load.
  • TypeScript interfaces come from json-to-ts and the parsed sample.
  • The YAML converter turns parsed JSON into YAML syntax.
  • A parse error shows the JSON.parse message. The page does not highlight a line.

अक्सर पूछे जाने वाले सवाल

स्थानीय प्रोसेसिंग वाले पेज पर फ़ॉर्मैटिंग और रूपांतरण इसी टैब में होते हैं। JSON Toolioz पर अपलोड नहीं होता। वेबसाइट फिर भी स्क्रिप्ट और एनालिटिक्स लोड करती है।

YAML के लिए js-yaml में 2 स्पेस का इंडेंट इस्तेमाल होता है। TypeScript के लिए पार्स किए गए मान पर json-to-ts चलता है। दोनों क्रियाएँ JSON.parse के सफल होने के बाद होती हैं। टेक्स्ट अपलोड नहीं होता।

JSON.parse आख़िरी कॉमा, एकल उद्धरण चिह्न और बिना उद्धरण वाली कुंजियाँ स्वीकार नहीं करता। पेज पार्सर का संदेश दिखाता है, पंक्ति हाइलाइट नहीं करता। टेक्स्ट अपलोड नहीं होता।

प्रकाशक की टिप्पणियाँ · समीक्षा 10 September 2026

What this JSON formatter does with invalid input

The formatter pretty-prints JSON that already parses, and it reports the first syntax error when the text is not JSON. It is not a schema validator and it does not send the document to Toolioz when the page is labelled local processing.

Parse errors you will actually see

JSON requires double-quoted keys, no trailing commas, and no comments. A trailing comma after the last property is valid in JavaScript objects and invalid in JSON. Single quotes around strings fail. `undefined` is not a JSON value. The engine stops at the first violation and shows a position; fix that before looking for a second error.

Huge minified files can freeze a tab because parsing is synchronous on the main thread. Split the file or use a desktop tool if the browser complains. Formatting does not prove the payload matches an API contract. That check is JSON Schema, on a different page.

Privacy note

Tokens, passwords, and PII pasted here stay in the tab only if the page states local processing. The website still loads scripts and analytics. Do not paste production secrets into any website, including this one, if your policy forbids it.

हल किए गए उदाहरण

  • Trailing comma

    {"ok": true,} fails. {"ok": true} parses. Remove the comma after true.

इस पेज की सीमाएँ

  • Does not repair YAML, TOML, or JavaScript object literals automatically.
  • Duplicate keys: JSON.parse keeps the last value; that may not be what the API author intended.

स्रोत