HTML Formatter
Auto-indent and organize HTML markup for better readability.
Sort JSON object keys alphabetically to keep structure consistent.
Recursively sorts every JSON key in ascending order, including nested objects and arrays. Everything runs locally.
Sorts object keys **at every level**, while leaving array order untouched (array order usually carries meaning, so the tool does not reorder it).
Comparison is by UTF-16 code point, not locale rules: `A` comes before `a`, and `"10"` before `"9"` (character by character, `1` < `9`). Normalise your key names if you want human-friendly order.
One language-level exception worth knowing: **integer-like keys** (`"2"`, `"10"`) ignore sorting entirely — JavaScript always emits them in numeric order.
Paste the JSON
Objects, arrays of objects and nested structures all work; invalid JSON is reported instead of half-processed.
Choose the indentation
Sorting and indentation are produced together, ready for comparing two configs.
Copy the result
You get JSON with ordered keys, which is what makes config diffs readable.
Because the comparison is by code point: all uppercase letters (U+0041–U+005A) precede lowercase ones (U+0061–U+007A). This matches the most common default in the JSON world and the intuition of comparing `JSON.stringify` output character by character, though it is less "human" than locale collation — to get case-insensitive alphabetical order, normalise the case of your keys first.
That is the language, not the tool: JavaScript emits **integer-like keys** (strings that can serve as array indices, such as `"0"` or `"10"`) in ascending numeric order during enumeration and serialisation, and neither insertion order nor a sort changes it. Rename them to something like `id_10` and they appear in the order you expect.
Auto-indent and organize HTML markup for better readability.
Minify HTML by removing extra spaces and non-essential characters.
Minify or prettify CSS code for production and maintenance workflows.
Beautify JavaScript code with consistent indentation and spacing.
Minify JavaScript to reduce file size for faster page delivery.
Format, validate, and beautify JSON for easier reading and debugging.
Compress JSON by removing unnecessary whitespace and line breaks.
Format SQL queries to improve readability and team consistency.