I've been pasting JSON into random online tools for years. Formatter, type generator, diff —
you name it, there's already 10 versions of it online.
So why build another one?
One day I was debugging a prod API response and copy-pasted the payload into the first
JSON formatter that came up in Google. Then I looked at the network tab.
It had sent my data to a server.
Not a big deal in isolation, but it got me thinking: how many times have I done this
without checking? How many times has someone on my team done it?
What I built
Jsonic — a small toolkit of JSON utilities that run entirely
in the browser. No server. No uploads. Nothing leaves your machine.
Current tools:
- Formatter / Minifier / Validator — the basics, done cleanly
- JSON → TypeScript — infers proper types including nested objects, arrays, nullable fields
- JSON → CSV — handles nested structures by flattening
- JSON → YAML
- CSV → JSON
- JSON Diff — structural diff, not a naive text comparison
The interesting technical bits
The TypeScript inference was harder than expected. The naive approach (just map
JSON types to TS primitives) falls apart quickly:
- Arrays with mixed types →
(string | number)[] - Fields that are
nullin the sample but probably typed →string | null - Deeply nested objects → recursive interface generation
The diff was the other tricky one. Text diff on JSON is nearly useless — whitespace
and key order changes produce noise. I implemented a structural diff that compares
the parsed objects, which means reordered keys and re-formatted values don't show
up as changes.
What's next
More tools (TOML, XML, Base64), and eventually some light content so it ranks for
the searches that bring people to these tools in the first place.
If you use JSON tools regularly, I'd love to know what you reach for most.
Top comments (1)
I have pasted sensitive JSON into random tools without thinking too. Running everything in-browser is such a simple idea but actually solves a real trust issue.