Pretty-print, minify, sort keys, validate with line + column error reporting, and one-click convert any JSON shape into a TypeScript type alias.
Input JSON
197 BOutput
197 B{
"app": "lokal",
"version": "1.4.0",
"features": [
"translate",
"resize",
"compress"
],
"pricing": {
"starter": 9,
"pro": 29,
"team": 99
},
"released": true
}Paste your JSON
Anything valid — arrays, objects, nested deep. The tool reports line/column if something is off.
Pick an output mode
Pretty (2 / 4 / tab indent), minify, or TypeScript type inference.
Toggle sort keys
Alphabetises every object deeply — useful for diffs and lockfile-style comparisons.
Copy or download
One-click copy to clipboard, or save as .json / .ts (for the TypeScript output).
If every element has the same inferred type, the array becomes T[]. If elements differ, you get a union like (A | B)[]. Empty arrays become unknown[] so you can decide what to refine them to.
No. Arrays are positional — sorting them would destroy their meaning. Only object keys are sorted, and it happens recursively through nested objects.
When JSON.parse throws, we map the reported character offset back to a line and column number so you can jump to the error in your editor. Handy for large files where you can't eyeball the problem.
No. Everything happens in your browser. Paste paste paste, format, copy, done.
Regex tester
Test a regex against a string with real-time match highlighting and a common-pattern sidebar.
SVG optimizer
Paste or drop an SVG to strip metadata, minify paths, and optionally convert to React JSX.
Translating screenshots into every locale is what lokal was built for. Upload once, ship to every store.
Explore lokal