JSON Formatter
Pretty print or minify JSON with optional key sorting. Includes clear parse errors and copy buttons.
Paste JSON, choose options, then click Format.
Output
Formatted JSON
Minified JSON
Formulas
Tool description
This JSON formatter parses JSON safely in your browser and outputs both pretty-printed and minified versions. Optional key sorting can make diffs more stable for configs and API responses.
How to use
- Paste JSON into the input box.
- Select indent level and optional key sorting.
- Click Format to see formatted/minified outputs.
- Copy the version you need.
Why it’s useful
- Fix formatting quickly for PRs and diffs.
- Minify payloads for testing or embedding.
- Spot parse errors with clear messages.
Use cases & interpretation
- Debugging: format API responses to inspect nested fields.
- Config files: sort keys to reduce diff noise.
- Web dev: minify JSON for quick test fixtures.
FAQs
JSON objects are unordered by specification, but some tools preserve insertion order. Sorting changes the order of keys, not the values.
Formatting runs in your browser, but avoid pasting secrets into any web tool if you are unsure of your environment or browser extensions.
Other tools in this category
Base64 Converter
Encode/decode Base64 safely (Unicode-friendly) with copy and reset.
iFrame Generator New
Generate a safe, copy-ready HTML iframe snippet with optional sandboxing and preview.
Number Base Converter New
Convert integers between bases (binary, octal, decimal, hexadecimal, base36) with BigInt support.
Regex Tester New
Test regular expressions with flags, view matches/groups, and preview replacements.
Unix Timestamp Converter New
Convert Unix timestamps (seconds/milliseconds) to dates and back with UTC/local output.
URL Encoder/Decoder New
Encode or decode URLs and components with options for query-string plus spacing.
UUID Generator New
Generate UUID version 4 values in bulk with copy and formatting options.
Lorem Ipsum Generator New
Generate Lorem Ipsum placeholder text by words, sentences, or paragraphs with copy and reset.
Encode/decode Base64 safely (Unicode-friendly) with copy and reset.
iFrame Generator New
Generate a safe, copy-ready HTML iframe snippet with optional sandboxing and preview.
Number Base Converter New
Convert integers between bases (binary, octal, decimal, hexadecimal, base36) with BigInt support.
Regex Tester New
Test regular expressions with flags, view matches/groups, and preview replacements.
Unix Timestamp Converter New
Convert Unix timestamps (seconds/milliseconds) to dates and back with UTC/local output.
URL Encoder/Decoder New
Encode or decode URLs and components with options for query-string plus spacing.
UUID Generator New
Generate UUID version 4 values in bulk with copy and formatting options.
Lorem Ipsum Generator New
Generate Lorem Ipsum placeholder text by words, sentences, or paragraphs with copy and reset.
Encode/decode Base64 safely (Unicode-friendly) with copy and reset.
iFrame Generator New
Generate a safe, copy-ready HTML iframe snippet with optional sandboxing and preview.
Number Base Converter New
Convert integers between bases (binary, octal, decimal, hexadecimal, base36) with BigInt support.
Regex Tester New
Test regular expressions with flags, view matches/groups, and preview replacements.
Unix Timestamp Converter New
Convert Unix timestamps (seconds/milliseconds) to dates and back with UTC/local output.
URL Encoder/Decoder New
Encode or decode URLs and components with options for query-string plus spacing.
UUID Generator New
Generate UUID version 4 values in bulk with copy and formatting options.
Lorem Ipsum Generator New
Generate Lorem Ipsum placeholder text by words, sentences, or paragraphs with copy and reset.