JSONLens is a small, fast JSON workbench. Paste something messy, hit Format, and get a tidy document plus a tree you can fold, search and copy from. No build step, no accounts, no uploads. Your data never leaves the page.
| Action | How |
|---|---|
| Format or minify | Toolbar buttons, or Ctrl/Cmd + Enter to format |
| Validate | Happens as you type, with line and column when the parser reports one |
| Explore | Collapsible tree with colored keys, strings, numbers, booleans and nulls |
| Search | Filters the tree to matching keys or values and highlights them |
| Copy | Whole document from the toolbar, or any single value from the tree |
| Import | File picker or drag a .json file onto the page |
| Stats | Keys, objects, arrays, values and approximate size |
| Themes | Dark and light, remembered between visits |
git clone https://github.com/CyberLoop-dev/jsonlens.git
cd jsonlens
# open index.html in your browser, or serve the folder:
python3 -m http.server 8000There is nothing to install.
flowchart LR
A[Editor / file / example] --> B{JSON.parse}
B -- ok --> C[Tree + stats]
B -- error --> D[Line and column message]
C --> E[Search, fold, copy]
jsonlens/
βββ index.html # layout and toolbar
βββ styles.css # theme tokens and components
βββ app.js # parsing, tree, search, stats
βββ assets/ # logo and README banner
- The editor is a plain textarea, so syntax coloring lives in the inspector tree rather than the input.
- Very large files (tens of MB) will feel slow because the whole tree is built in the DOM.
- Numbers beyond JavaScript's safe integer range lose precision, as with any
JSON.parse.
- Syntax-highlighted editor overlay
- JSON path display and copy
- Virtualized tree for huge documents
Issues and pull requests are welcome. Keep it dependency-free and keyboard accessible.