How to Use This Formatter
- Click inside the Input JSON panel and paste a payload, or click Open file to load a local
.jsonfile (up to 10 MB). - Choose
2 spaces,4 spaces,Tabs, orMinify. Leave Keys: Keep Order on to preserve exact property order, or toggle Sort A–Z (case-insensitive) when comparing configs. - If validation fails, check the exact Line and Column banner. Review the listed repairs before clicking Apply fixes.
- Switch the output panel to Tree to copy any canonical JSONPath, or use the JSONPath tab (for example,
$.users[*].nameor$..['key']).
Why Lossless Formatting Matters (Verified Examples)
Production API responses frequently include 64-bit Snowflake IDs, decimal flags like 1.0, or accidentally duplicated object keys from upstream proxies. Standard JSON.parse formatters silently alter all three:
// Input payload
{"z":12345678901234567890,"a":1.0,"dup":1,"dup":2}
// Typical JSON.parse() formatter (DATA CORRUPTED):
// {"z": 12345678901234567000, "a": 1, "dup": 2}
// Lasita lossless formatter (EXACT DATA PRESERVED + duplicate warning):
{
"z": 12345678901234567890,
"a": 1.0,
"dup": 1,
"dup": 2
}Common JSON Mistakes That Break Production Parsers
- Trailing commas:
{"a": 1,}works in JavaScript literals but fails strict RFC 8259 JSON parsers. - Single, curly quotes, or unquoted keys: Every property name and string value must use ASCII double quotes (
"key"). - Comments: Standard JSON forbids
//and/* */comments; removed comments are replaced with a space so adjacent tokens like[1/**/2]never silently fuse into[12]. - Unescaped control characters: Raw newlines inside string values must be escaped as
\n.
Limits & Edge Cases
- Maximum file size is capped at 10 MB and maximum nesting depth at 512 levels so malformed inputs never hang your browser.
- Outputs larger than 200 KB display a fast preview while Copy output and Download .json always use the complete formatted file.
- Simple JSONPath supports
$,.key,['key'](including keys containing]),[0],[*], and recursive descent... Every match is counted, the first 200 are shown, and a search that is too big stops early and says so.