A simple, secure, and user-friendly web-based tool for formatting, minifying, validating, and viewing JSON and NDJSON data. All processing happens locally in your browser—your data never leaves your device.
- Format and Validate JSON: Beautify and validate your JSON or NDJSON instantly.
- Minify JSON: Compress JSON or NDJSON to a compact format.
- Copy/Paste Support: Easily copy or paste JSON data with one click.
- Load from URL: Fetch and load JSON from a public URL (the server must allow cross-origin requests, or the browser blocks it).
- Tree View: Browse your JSON as a collapsible tree, with Expand all / Collapse all.
- Search: Find keys and values anywhere in the tree, including collapsed levels, and step through the matches.
- Copy Path or Value: Select any node to see its JSONPath (like
$.users[3].name) and copy the path or the value. - Secure Local Processing: Your JSON is never uploaded; everything runs in your browser.
- Keyboard Shortcuts: Ctrl+F (Cmd+F on Mac) on the View tab focuses the search; Enter and Shift+Enter move between matches; Escape clears the search and closes dialogs; Enter loads a URL.
- Clone or Download this repository.
- Open
index.htmlin your web browser. No build step or server required.
- Paste your JSON or NDJSON into the textarea.
- Click Format JSON to beautify and validate.
- Click Minify to compress the data.
- Use Copy and Paste buttons for clipboard operations.
- Click Load JSON to fetch data from a URL.
- Switch to the View tab to browse the JSON as a collapsible tree. Click the ▶ arrow to expand or collapse a row, or use Expand all / Collapse all. Clicking elsewhere on a row selects it and opens it if it's closed; click a selected row again to close it.
- Type in the search box on the View tab to find keys and values. Matches are highlighted, the tree opens to show each one, and the ▲ / ▼ buttons (or Shift+Enter / Enter) move between them. The search ignores case and doesn't match array indexes. Text with backslashes or quotes can be searched as it really is (
C:\temp) or as the tree shows it (C:\\temp). - Click any row to show its path at the bottom of the View tab. Copy path copies the JSONPath; Copy value copies the value (strings as plain text, everything else as JSON).
- NDJSON (one JSON value per line) is detected automatically. Format pretty-prints each record with a blank line between them; Minify turns them back into one record per line.
- Click About for more information and contact details.
index.html– The page markup.app.js– Page behavior: tabs, buttons, tree view, search and the path bar.json-utils.js– Parsing, JSONPath and search matching, with no browser dependencies.styles.css– Styles for the application.tests/– Tests forjson-utils.js.
The tests use Node's built-in test runner (Node 18 or newer), so there's nothing to install:
node --test
- All processing is local: Your JSON is never sent anywhere. The only network request is the one you make with Load JSON.
- Clipboard access: Uses browser APIs for copy/paste. Permissions may be required.
- No tracking or analytics: This tool does not collect or store any user data.
Contributions, bug reports, and suggestions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License. See LICENSE for details.
- Email: [email protected]
- GitHub: github.com/Gvo87/jsonviewer
- Inspired by other open-source JSON viewers and formatters.
- Built with plain HTML, CSS, and JavaScript for maximum compatibility and privacy.