JSON Viewer & Formatter
View, format, validate, edit and beautify JSON online with an interactive tree view. Your JSON stays in your browser.
- Free — no signup, no account, no watermark
- Runs entirely in your browser — nothing is uploaded to a server
- Works on mobile, tablet and desktop
- Instant — results appear as soon as you enter your input
Why this is private
- Processed locally in your browser. Your JSON is never uploaded or stored.
- Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
- Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.
Overview
A JSON viewer and formatter for reading, checking and reshaping JSON in the browser. Paste, type, upload or drop a file, then format or minify it, jump around an interactive tree, run JSONPath queries, search keys and values, repair almost-JSON, sort keys, see structure statistics, and convert to or from CSV, YAML and XML — all without anything leaving your device.
How to use it
- 1Paste or type JSON in the editor, upload a .json file, or drop one onto the editor.
- 2Watch the status bar: it shows "Valid JSON" or the exact line and column of the first error.
- 3Click Format (or press Cmd/Ctrl+Enter) to beautify, or Minify to strip whitespace. Pick 2 spaces, 4 spaces or tabs.
- 4Switch the output to Tree to expand, collapse, search and copy any value, key or JSONPath.
- 5Use Repair for trailing commas or single quotes, Sort keys to reorder, the JSONPath box to query, or the Convert panel for CSV / YAML / XML.
- 6Copy, download or print the result, or click Share link to generate a link that carries the JSON itself (nothing is uploaded).
Formula
Strict JSON
keys are double-quoted · no trailing commas · no comments · values: string | number | true | false | null | object | array
This is RFC 8259 JSON — the format APIs and config parsers expect. The formatter and validator follow it exactly; the separate Repair step is what loosens the rules.
What Is a JSON Viewer?
A JSON viewer takes raw JSON text and shows it in a form that is easy to read and navigate: pretty-printed with consistent indentation, and as a collapsible tree where every object, array and value is a node you can expand, search and copy. It is the fastest way to make sense of a large API response or a minified config file.
This tool is a viewer and a formatter and a validator and an editor in one page, so you don't have to move JSON between separate tools to read it, check it and clean it up.
How to View JSON Online
Paste your JSON into the editor, upload a .json file, or drag a file onto the editor. Switch the output panel to Tree to browse the structure: click a caret to expand or collapse a branch, use Expand all / Collapse all, and click the menu on any node to copy its value, its key, or its full JSONPath (for example $.user.address.city). The Graph view shows the same structure as a zoomable node diagram.
How to Format JSON
Formatting (also called beautifying or pretty-printing) re-indents JSON and puts each key and array element on its own line so nested structure is visible. Choose an indent of 2 spaces, 4 spaces or tabs, then click Format or press Cmd/Ctrl+Enter. Formatting only changes whitespace — keys, values, types and order are preserved, and the output parses to an identical object.
How to Validate JSON
The tool validates continuously as you type. If the JSON is well-formed you get a "Valid JSON" badge; if not, the status bar shows the exact line and column of the first problem with a short explanation (for example "Expected ',' or '}'"), and the editor marks the spot. Strict validation follows the JSON specification: property names must be double-quoted, and trailing commas, comments and single quotes are not allowed.
What Is JSON Tree View?
Tree view renders JSON as an expandable hierarchy instead of text. Objects and arrays are branches you can open and close; strings, numbers, booleans and null are leaves. It is easier than scrolling through thousands of formatted lines when you only need one value, and it lets you copy the JSONPath to any node so you can reference it in code.
How to Minify JSON
Minifying removes every space and newline that isn't part of a string, producing the smallest valid JSON — useful before storing JSON in a database column or sending it over the wire. Click Minify; the tool also shows how many bytes and what percentage were saved. This is whitespace removal only, not gzip or any other compression.
How to Fix Invalid JSON
There are two separate steps. Validation is strict and never changes your input — it just tells you where the syntax breaks. Repair is opt-in: it attempts common fixes (removing trailing commas, converting single quotes to double quotes, quoting bare property names, stripping // and /* */ comments, converting Python-style True/False/None) and shows you a diff of exactly what changed before you choose to apply it. If a confident repair isn't possible, it says so rather than guessing.
JSON Viewer vs JSON Formatter
A JSON formatter's job is to re-indent text. A JSON viewer's job is to help you navigate structure — tree, search, copy-path, statistics. This page does both, plus validation and conversion, so "JSON viewer" and "JSON formatter" here are two views of the same tool rather than different products.
Is It Safe to Paste JSON Online?
With this tool, yes: every operation — parsing, formatting, the tree, JSONPath, repair, conversion, download — runs in your browser with JavaScript. Your JSON is never sent to our servers, never written to analytics, and never put into the page URL unless you explicitly click Share link, which encodes your JSON directly into the link (opened locally by whoever you send it to, never stored on a server). Autosave is off by default; if you turn it on, your last input is stored only in this browser's local storage and you can clear it at any time. As a general habit, still be careful pasting credentials or customer data into any online tool, and don't use Share link for anything sensitive.
Tips
- Press Cmd/Ctrl+Enter in the editor to format instantly.
- Validation is strict and never edits your input; use Repair (with its diff preview) to fix trailing commas, single quotes or comments.
- JSON.parse uses 64-bit floats — integers beyond 2^53 lose precision. The tool warns you when it detects one.
Frequently asked questions
What people use it for
Related guides
- How to format JSON (and actually understand the errors)JSON looks like a JavaScript object but follows stricter rules. Here's what those rules are and how to read the errors when they're broken.
- How to read JSON with a tree viewerA tree viewer turns a wall of brackets into a structure you can expand, search and copy paths from. Here's how to use one effectively.
- JSON parse errors explained: 'Unexpected token', 'Expected comma or brace', and the restWhat each common JSON error message actually means, the usual cause, and how to find the spot fast using line and column.
Related tools
All developer toolsReady to use JSON Viewer & Formatter?
JSON Viewer & Formatter