⊹ FAST.JSON.VIEWER generator test suite ← back to viewer v0.1.18

Guide

How to open, share, and explore JSON in Fast JSON Viewer.

Opening JSON files

There are three ways to load JSON into the viewer:

Files never leave your browser. There is no upload and no server-side parsing, so private and sensitive JSON stays on your device.

Tabs

The viewer has five tabs. Press 1 / 2 / 3 / 4 / 5 to switch.

Sharing JSON via URL

Append #jsonString= followed by your JSON to the viewer URL and the page opens with that JSON already loaded. There is no upload — the JSON travels entirely inside the URL fragment, which the browser never sends to a server.

Raw (default)

Percent-encode the JSON and append it to #jsonString=. For {"I":"love json"}:

https://fastjsonviewer.com/#jsonString=%7B%22I%22%3A%22love%20json%22%7D
▸ Try it

Base64url

For shorter or noisier URLs, base64url-encode the JSON (RFC 4648 §5 — -/_ instead of +//, padding optional) and add &encoding=base64:

https://fastjsonviewer.com/#jsonString=eyJJIjoibG92ZSBqc29uIn0&encoding=base64
▸ Try it

Build a link from the console

// raw (percent-encoded)
location.hash = 'jsonString=' + encodeURIComponent(JSON.stringify({ I: 'love json' }));

// base64url
const b64 = btoa(JSON.stringify({ I: 'love json' }))
  .replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', '');
location.hash = 'jsonString=' + b64 + '&encoding=base64';
Size cap. Maximum 1 MB of decoded JSON per URL. Larger payloads show a clear error in the status bar — open the file locally instead.

Sample JSON files

The test page is a gallery of small JSON examples: ~80 valid and intentionally invalid fixtures. Click any link to open it in the viewer.

How to perf-test this app

Open the JSON test-file generator, pick a target size (anywhere from 1 KB to 20 GB), and the page streams a synthetic JSON file straight to your disk via the File System Access API. Drop the result onto the viewer and watch the Stats tab to compare parse throughput across machines, browsers, and file shapes. The first key of the generated file is always a generated header so you can tell test files apart later.

Browser support for generation: Chrome, Edge, Opera (any Chromium browser). Safari and Firefox haven't implemented showSaveFilePicker yet — the generator will tell you.

How it works

A look under the hood at the parsing pipeline and viewer.

Parallel chunk parsing

The file is split into N equal chunks, one per web worker. Each worker streams its chunk in 256 KB blocks, running a branchless byte-level parser across 23 boundary scenarios. Results are stitched on the main thread by selecting the scenario that matches the prior chunk's exit state.

Virtual scroll viewer

A sparse line → byte-offset index is built during parsing. The viewer slices only the bytes needed for the visible viewport. First-page rendering begins immediately, before parsing finishes.

UTF-8 chunk boundaries

Before dispatching workers, the main thread sniffs each chunk boundary to ensure it does not split a multi-byte UTF-8 sequence. Boundaries are nudged backward by up to 3 bytes as needed.

Keyboard shortcuts

1 / 2 / 3 / 4 / 5viewer / raw / hex / stats / yaml
gg / Homego to top
G / Endgo to bottom
j / scroll down one line
k / scroll up one line
d / uscroll half page
Ctrl+F / /focus search
Ctrl/+Vpaste JSON from clipboard
Enter / ⇧Enternext / prev match
Escclear search / close
?toggle settings