All projects
Complete apps

JSON Formatter

A free JSON formatter, validator and collapsible tree viewer that runs entirely in your browser — no uploads, no signup, no ads

JSON Formatter
Vanilla JavaScriptHTML5CSS3DockernginxGitHub Actions

/ Overview

JSON Viewer is an online tool for formatting, validating and exploring JSON documents. What sets it apart is that all the logic runs in the browser: nothing you paste is ever sent to a server. When you are working with private API responses, tokens or production logs, that distinction matters. The project is written in plain JavaScript with no frameworks and no third-party libraries — there is no build step either, just static files. As a result the page opens instantly and keeps working when the connection drops. Particular attention went into error diagnostics. Most online tools stop at "Unexpected token"; this one reports the exact line and column, a message in plain language, an excerpt of the surrounding code with a caret on the offending character, and a button that jumps straight to it. Large files are not a problem either: line numbers are virtualized, so a 60,000-line document keeps only about 60 elements in the DOM.

/ Features

  • Collapsible tree view — click a key to copy its path ($.items[0].sku), click a value to copy the value
  • Precise error diagnostics — line, column, a readable message and jump-to-error; detects trailing commas, unquoted keys, unclosed brackets, comments and Python literals among others
  • Format, minify and sort keys A→Z; 2 spaces, 4 spaces or tabs
  • Automatic fast mode for large input — 884 KB and 60,000 lines open without freezing
  • Open a file, drag and drop, fetch from a URL, or download the result as .json
  • Filter across keys and values — matching branches are kept and every hit is highlighted
  • Dark and light themes, settings persisted in localStorage, full keyboard control
  • 100% client-side — no backend, no analytics, nothing leaves your machine