انتقل إلى المحتوى
Toolza

لم تُترجم هذه الصفحة بالكامل إلى لغتك بعد، لذا يظهر بعض النص بالإنجليزية.

JSON Formatter and Validator

Paste JSON to make it readable, check whether it's valid, or compress it to a single line. Errors are reported with the exact line and column so you can fix them quickly.

ملفاتك تبقى على جهازك. لا يُرسل أي شيء تُدخله هنا إلى خوادمنا.

طريقة استخدام تنسيق JSON

  1. 1Paste or type your JSON.
  2. 2Click Format to beautify it, choosing 2 spaces, 4 spaces or tabs, or click Minify to compress it.
  3. 3If the JSON is invalid, jump to the reported line and column to fix it.
  4. 4Copy the result or download it as a .json file.

الميزات الرئيسية

JSON (JavaScript Object Notation) is the most common format for exchanging data between web services, and it's used for many configuration files. It's simple but strict: keys must be in double quotes, strings must use double quotes, and trailing commas and comments aren't allowed. A single misplaced character makes the whole document invalid.

Formatting turns a dense, single-line API response into an indented structure where nesting is easy to follow. Minifying does the opposite, stripping whitespace to save space. Validation tells you whether a parser will accept the text and, if not, exactly where it stopped, which is far faster than hunting through hundreds of lines by eye.

Sorting keys is a handy trick when comparing two JSON files: once both are formatted and sorted the same way, a regular text diff shows only the real differences rather than changes in key order.

الأسئلة الشائعة

No. Formatting and validation run entirely in your browser, so it's safe to paste API responses or config files.

Trailing commas after the last item, single quotes instead of double quotes, unquoted keys, comments, and missing commas between items. JSON is stricter than JavaScript and allows none of these.

Only the order of keys inside objects changes. Values stay the same, and the order of items in arrays is never changed.

It's purely a style preference. 2 spaces is common in JavaScript projects, 4 spaces in many Python and Java codebases. Use whatever your team or tools expect.

Minified JSON is smaller, which saves bandwidth when sending data over a network or storing it. It's harder to read, so keep a formatted copy for editing.