JSON Workbench is a fast, static, browser-based workspace for validating, formatting, exploring, and diffing JSON.
It runs entirely on the client as a single-page app, with no backend required.
- Real-time JSON validation with line/column diagnostics, fix hints, and click-to-jump error focus
- Two-pane workflow: source JSON on the left, generated or edited output on the right
- Right-side view modes:
JSON: pretty printed, syntax highlighted, and foldableMinify: compact JSON outputTable: tabular rendering for top-level arrays (auto-shown when available)Inspector: Miller-column style navigator with breadcrumbs and searchDiff: inline unified diff with context folding and optional auto-recompute
- Path tools: copy both dot-path and JSONPath for the currently selected Inspector node
- Quality-of-life tools: load sample payload, resync right side from left, copy right output
- Pane resizer with pointer and keyboard support (
ArrowLeft,ArrowRight,Home,End)
public/index.html: static app shellpublic/assets/styles.css: all styling and layoutpublic/assets/favicon.svg: favicon assetsrc/app.ts: app bootstrap + UI orchestrationsrc/types.ts: shared TypeScript typessrc/utils/json-utils.ts: JSON parsing diagnostics + stats helperssrc/utils/diff-utils.ts: diff algorithm + row shaping helperssrc/utils/path-utils.ts: path/search/container helperspublic/dist/*.js: generated browser runtime (compiled fromsrc/**/*.ts)- TypeScript compiler only (no framework, no bundler)
- Node.js + npm
- Python 3 (used by the local static dev server script)
- Install dependencies:
npm install- Compile TypeScript:
npm run build- Start local server:
npm run dev- Open:
http://localhost:4173
npm run build: compilesrc/**/*.ts->public/dist/*.jsnpm run typecheck: run TypeScript type checking without emitnpm run dev: servepublic/viapython3 -m http.server 4173 --directory public
- Paste JSON into the left editor.
- Right editor unlocks automatically.
- Switch right-side modes depending on task:
- Use
JSONfor readable formatted output and folding. - Use
Minifyfor compact output or manual right-side edits. - Use
Inspectorfor navigation/search through nested structures. - Use
Diffto compare left and right payloads. - Use
Tablewhen right JSON is a top-level array.
- Use
- Copy output or paths as needed.
- Right-side JSON mode is read-only when valid and displayed with syntax highlighting/folding.
- Invalid JSON in either pane surfaces parser diagnostics with contextual hints.
- Diff mode requires both sides to be valid JSON and can auto-recompute on edits.
- Inspector search is bounded (up to 80 hits) to keep interactions responsive.
- On narrow screens, layout collapses to a single-column flow automatically.
This project is configured for static deployment on Vercel.
- Build command:
npm run build(seevercel.json) - No server/runtime needed after build
- Security headers are set in
vercel.json
.
├── public/
│ ├── index.html
│ ├── assets/
│ │ ├── styles.css
│ │ └── favicon.svg
│ └── dist/
├── src/
│ ├── app.ts
│ ├── types.ts
│ └── utils/
│ ├── json-utils.ts
│ ├── diff-utils.ts
│ └── path-utils.ts
├── package.json
├── tsconfig.json
└── vercel.json