DEV Community

AI Predictions Dev
AI Predictions Dev

Posted on

Why I Built a JSON Toolkit That Never Touches a Server

Most of the time, when I need to inspect a complex JSON payload, I copy the raw string from my terminal or network tab, open a browser tab, and paste it into one of the many "JSON Formatter" sites that clutter the first page of Google. It’s a ritual we all do. We paste, we click "Format," and we wait.

For small payloads, this is fine. But when you are debugging a massive API response, a deeply nested configuration file, or a large dataset, that ritual breaks down. The browser freezes. The site asks you to upload a file. Worse, many of these tools send your data to a server for processing. If that JSON contains API keys, user PII, or internal schema definitions, you are essentially trusting a third-party service with your proprietary data every time you hit "pretty print."

I got tired of the latency and the privacy overhead. So I built JSONForge.

The core premise is simple: do everything locally. No server-side processing. No file uploads. No network requests for the core logic. Everything happens in your browser, powered by WebGPU for heavy lifting and a small model that runs in your browser for schema inference.

The WebGPU Advantage

JSON parsing is computationally cheap for a modern CPU, but rendering and diffing large structures is not. When you have a 5MB JSON file, the DOM manipulation required to display it as a tree view can cause significant jank.

By offloading the parsing and formatting logic to the GPU via WebGPU, JSONForge handles massive payloads without blocking the main thread. You can open a file, click "Pretty Print," and see the result instantly, even if the file is hundreds of kilobytes or larger. The UI remains responsive because the heavy computation is parallelized on the graphics card.

This also means the tool works offline. If you are on a plane, or your internet drops in the middle of a debugging session, your toolkit doesn’t vanish. You can continue to diff, validate, and format without interruption.

Schema Generation Without the Server Round-Trip

One of the most tedious parts of API development is keeping your JSON Schema in sync with your actual data. Traditionally, you might use a command-line tool or an online service to generate a schema from a sample JSON object.

JSONForge includes a schema generator that analyzes your JSON structure and infers the types, required fields, and constraints. Because this runs entirely in the browser, you can take a raw response from your staging API, paste it in, and immediately get a draft schema. You can then copy that schema directly into your OpenAPI spec or TypeScript definition files.

The inference engine uses a small model that runs in your browser to understand complex type patterns, but it does so without sending your data to a cloud API. This keeps the inference fast and your data private.

Diffing and Validation

Beyond formatting, the tool includes a visual diff engine. If you have two versions of a configuration file, you can paste both side-by-side and see exactly what changed. The diffing algorithm highlights added, removed, and modified keys, making it easy to spot unintended changes in your deployments.

Validation is another key feature. You can paste a JSON Schema and a JSON instance, and the tool will validate the instance against the schema in real-time. Errors are highlighted directly in the tree view, showing you exactly which path in the JSON failed validation and why. This is particularly useful when you are working with strict schemas that require specific types or formats.

A Honest Note on Pricing

JSONForge is a paid tool. I built it to be sustainable and to continue improving the performance and feature set. There is a 7-day free trial so you can test it with your own workflows. If you are looking for a quick, one-off format, the free tier might be enough, but for heavy daily use, the paid plan unlocks the full suite of features, including unlimited schema generation and advanced diffing.

Why This Matters

The web is becoming more capable. We have WebGPU, Web Workers, and efficient JavaScript engines. Yet, many developer tools still rely on the old pattern of "send data to server, process, return result." This pattern introduces latency, privacy concerns, and dependency on network availability.

JSONForge is an experiment in what we can do when we embrace these capabilities. It is not just a prettier printer; it is a local-first toolkit that respects your data and your time. If you spend a significant amount of your day working with JSON, I hope you find it useful.

You can try it out at https://jsonforge.bestpaid.app.

Top comments (0)