代码、数据与二维码工具

JSON排序

JSON排序;输入、输出与参数范围在实施前细化。

优先本地处理无需注册隐私说明 ↗

Standard JSON only, up to 2 MB. Keys are sorted recursively.

Paste JSON to begin.

使用步骤

如何使用

  1. Paste valid JSON up to 2 MB into the editor.
  2. Choose recursive key sorting, array order, compact output, and indentation.
  3. Format the result, then copy or download the normalized JSON.

Predictable recursive sorting

Every JSON object is rebuilt with keys in locale-independent lexicographic order. Nested objects follow the same rule, so the result is stable and easy to compare in code review or generated files.

Arrays stay meaningful by default

Array order is preserved unless you explicitly enable array sorting. When enabled, primitive values sort predictably and nested values use their compact JSON representation; mixed or object-heavy arrays may be easier to read with order preserved.

Local processing and clear limits

Parsing and formatting happen in your browser. Input is limited to 2 MB to keep the page responsive, and JSON values remain JSON values: comments, trailing commas, NaN, and Infinity are invalid.

常见问题

你可能还想知道

Does sorting change array order?

No. Arrays keep their order by default. Turn on Sort arrays when you deliberately want array values reordered.

Are object keys sorted at every depth?

Yes. The tool recursively sorts keys inside objects nested in objects and arrays.

Can it format JSON with comments or trailing commas?

No. It accepts standard JSON only. Remove comments and trailing commas before formatting.

Is my JSON uploaded?

No. Parsing, sorting, formatting, copying, and downloading run locally in your browser.