⊹ FAST.JSON.VIEWER share write-up ← back to viewer

How long can a URL fragment (#) be?

The bit after # — the fragment — never leaves your browser. It isn't sent to a server, so it isn't bound by the 4–8 KB URL limits servers and CDNs impose on the query string. The only real ceiling is what your browser will hold. Press Start and this page finds yours, live.

How it works. The test writes a steadily longer #aaaa… fragment to this page's own address bar and reads back how many characters the browser actually kept (location.hash.length). While the two agree it keeps doubling; once they diverge — the browser truncated, rejected, or the tab froze — it binary-searches to pin the exact maximum. Nothing is uploaded; progress is saved to localStorage so a crash can resume. Your address bar will briefly show a very long URL during the test — that's expected.
Largest kept so far
Currently trying
First length refused
Idle. Press Start to measure your browser's fragment limit.

Attempts

#RequestedKeptResult
no attempts yet

What this means

A query string (after ?) is part of the request the browser sends to the server, so it's capped by the strictest hop — often just 4–8 KB at a CDN or proxy — and overflow returns 414 URI Too Long. A fragment (after #) is held client-side only, so it can be far larger: typically tens of thousands of characters at minimum, and many megabytes in Chromium-based browsers. That's why Fast JSON Viewer puts shared JSON in the fragment — it keeps your data off the wire and lets a link carry far more than a query ever could.

Fast JSON Viewer's own Linkify share links cap the encoded document at 1 MB of JSON — comfortably inside every browser's fragment limit, and small enough to stay reliable across clipboards and link shorteners. Read the share-with-a-URL write-up for the full story.