⊹ 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

Deflate (shortest — what Linkify makes)

Compress the JSON with raw DEFLATE (RFC 1951 — the algorithm inside a .zip, without the zip framing), base64url the result, and add &encoding=deflate. On typical JSON the link comes out about half the length of plain base64. The browser inflates it with its built-in DecompressionStream, so nothing extra is downloaded. {"I":"love json","again":"love json","and_again":"love json","one_more_time":"love json"} is 119 characters as base64 and 64 deflated:

https://fastjsonviewer.com/#jsonString=q1byVLJSyskvS1XIKs7PU9JRSkxPzMxDF8tLiccmnp-XGp-bX5QaX5KZm4oiVwsA&encoding=deflate
▸ Try it

All three spellings keep working: links made with encoding=base64 — every Linkify link before September 2026 — open exactly as they always did. Linkify also falls back to base64 on its own when a document is so small that compressing it would make the link longer. Why deflate and not gzip, brotli or zstd.

Choose which tab to land on

Add &view= to pick the tab the link opens on once the JSON loads. Without it the link lands on the default Viewer. Values: viewer, raw, hex, stats, yaml, csv, and graphical (graph and tab= also work). Tabs that need a valid parse — or the CSV tab, which needs an array root — quietly fall back to the viewer when they don't apply.

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

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';

// deflate (what Linkify makes) — raw DEFLATE, then base64url
const packed = new Uint8Array(await new Response(
  new Blob([JSON.stringify({ I: 'love json' })]).stream()
    .pipeThrough(new CompressionStream('deflate-raw'))).arrayBuffer());
location.hash = 'jsonString=' + btoa(String.fromCharCode(...packed))
  .replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', '') + '&encoding=deflate';
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