unstringify for VS Code
Paste the mess. Read the structure. — now inside the editor.
The engine behind unstringify.com, where VS Code keeps
such things: broken JSON fixed with named fixes on the lightbulb and in the
Problems panel; CSV, NDJSON and logs read as records through the reading
question; conversion into a new editor; comparison by structure in the diff
editor; stringified JSON opened in place.
Everything runs on your machine. Nothing you open is uploaded — the only
request this extension ever makes is to the licence service, when you enter a
licence key.
What it does
Each thing lives where VS Code keeps such things — a command, a quick fix on
the lightbulb, a hover, the diff editor, the status bar — not in a panel of
its own.
|
Where |
What happens |
| Fix JSON |
command · context menu · the status bar |
The fixes appear in the Refactor Preview, one per changed line — "line 12 · Single → double quotes", "line 31 · Python None → JSON null". Keep the ones you want, apply, and the editor's undo restores every byte. On a JSON Lines file each broken record is fixed alone. |
| Quick fixes |
the lightbulb · the hover's Quick Fix… · the Problems panel |
The fix for the line under the cursor, named after what it does, plus "Fix all N" — tied to the diagnostic it resolves, the way a linter with a fixer offers its fixes. Hovering VS Code's own JSON error meets the same fix. |
| Diagnostics |
the gutter · the Problems panel |
The lines the parser gives up on, marked with the sentence the fix would print, on JSON, JSONC and JSON Lines. |
| The fact |
the status bar |
"Not valid JSON yet · 6 fixable" on a document; "CSV · 1,284 rows", "NDJSON · 312 records · 3 broken", "Log · 1,277 records · 7 raw lines kept" on a rows file. Click it. |
| Read as records… |
command · context menu · the status bar |
The reading question, as QuickPick steps with the measured default first: separator · first row · the split decimal for CSV and TSV (asked only when the file holds one); which known shape — measured over the file — or a regex with named groups for a log. Then a target, and the records open beside the text. NDJSON and a Markdown table have nothing to decide and are not asked. |
| Convert to… |
command · context menu |
YAML · XML · CSV · NDJSON · Markdown table · TypeScript · JSON · minified, from a JSON, YAML or XML document or a selection — and from CSV, TSV, NDJSON, a Markdown table or a log, through the reading question — into a new editor beside it. |
| Python dict → JSON |
command |
The same fixes, for the print(event) you copied out of a log: single quotes, True / False / None, trailing commas. |
| Generate TypeScript interfaces |
command |
One interface per object, arrays typed from every element, a key missing in some elements optional. |
| Copy JSON path |
command · context menu |
$.items[0].sku for the value under the cursor, the way the tree writes it. |
| Sort keys · Minify |
command · context menu |
Every object's keys sorted, at the editor's indent; or the document on one line (JSON and XML). Undo restores the layout. |
| Open on unstringify.com |
command · context menu |
The document opens on the site, carried in the link's fragment — compressed, and never sent to a server, because a browser does not send a fragment. Refused past 16 kb compressed, with the size. |
| Unpack (Pro) |
command · the hover |
A string value that holds JSON, XML or YAML shows what it holds on hover, pretty, with the two Unpack doors; the command opens it in place — undo packs it back — or into a new editor. An SNS envelope reads as one tree. |
| Compare by structure with… (Pro) |
command · context menu |
Another open document, the clipboard or a file, in VS Code's own diff editor over the structural reading: keys sorted and whitespace normalised for a document, one record per line for a rows file — so a reordered key is no difference and a changed value is. |
Coming to Pro: a records view of its own for CSV, NDJSON and logs (rows, level
chips, filter, the record panel), and Fix across a workspace. Until then the
rows open as a new document beside the text, and the site has the view.
Install
From the Extensions view — search unstringify — or from
the Marketplace listing.
Cursor, Windsurf, VSCodium and code-server find it through
Open VSX.
Trial, Free, Pro
Every install starts a 14-day trial of everything. When it ends:
- Free, forever: Fix JSON and the quick fixes, Python dict → JSON, Read as records, Convert, Generate TypeScript, Copy path, Sort keys, Minify, diagnostics, Open on unstringify.com.
- Pro: Unpack and Compare by structure, and what follows them — a one-time personal licence, $19,
three activations, from unstringify.com/vscode.
unstringify: Pro: enter a licence key activates this machine;
unstringify: Pro: deactivate this machine frees the seat. The key is kept in
VS Code's secret storage and re-checked at most once a week, with a 30-day
offline grace.
Privacy
No telemetry. No document ever leaves the editor. The one network call is
api.lemonsqueezy.com — activate, validate, deactivate — carrying the licence
key and this machine's name, and only when you use those commands or a weekly
re-check is due. Open the network panel of the extension host and watch it
stay empty otherwise.
Settings
unstringify.fix.preview — show the Refactor Preview (default) or apply all fixes at once.
unstringify.diagnostics.enabled — lint JSON and JSON Lines as you type.
unstringify.diagnostics.maxBytes — skip live linting, and the status-bar count, above this size (default 1 MB).
Languages
.csv and .tsv / .tab files get the csv and tsv language ids (another
extension naming them the same merges, it does not clash); .ndjson joins VS
Code's own JSON Lines. YAML and XML keep the diagnostics of the extensions that
own them — our quick fixes attach to those squiggles.
Not open source
The extension and the engine are proprietary; see LICENSE. Questions to
hello@unstringify.com.
| |