Format JSON, clean up JSON-like logs, and escape or unescape JSON strings without leaving Raycast.
Everything runs inside Raycast. No browser formatter, terminal workflow, external editor, or network service is required after installation.
Paste JSON into Raycast and get a readable, pretty-formatted result immediately, with whole-result copy actions built in.
If strict parsing fails, JSON Toolkit keeps surrounding text intact and only reformats balanced JSON-like spans conservatively.
Decode exactly one JSON string layer and jump straight into formatted JSON when the unescaped text is JSON.
- Format JSON entered manually, copied to the clipboard, or selected in another app.
- Pretty-print any valid JSON root, including objects, arrays, primitives, and
null. - Preserve stringified JSON as a string instead of silently reinterpreting it.
- Best-effort format relaxed JSON-like text embedded in logs.
- Preserve single quotes, comments, unquoted keys, trailing commas, and surrounding text in fallback mode.
- Escape full text values as JSON strings.
- Unescape exactly one JSON string layer.
- Reject inputs larger than 5 MB before parsing or rendering.
| Command | What it is for |
|---|---|
Format JSON |
Paste JSON, relaxed JSON, or log text manually |
Format JSON from Selected Text |
Format the active selection from another app |
Format JSON from Clipboard |
Format the current text clipboard contents |
Escape JSON String |
Serialize plain text as a JSON string |
Unescape JSON String |
Decode one JSON string layer |
The input source commands are intentionally separate. If selected text is unavailable, the extension reports that state instead of silently falling back to the clipboard.
JSON Toolkit always tries strict JSON.parse first.
- Shows pretty JSON in a fenced
jsoncode block - Supports
Copy Pretty JSONwithCommand-C - Supports
Copy Minified JSONwithCommand-Shift-C
- Shows a concise
Invalid JSON · Best-effort formattingnotice - Conservatively reformats balanced JSON-like fragments in place
- Preserves surrounding text and token spelling
- Does not invent missing quotes, commas, or delimiters
- Does not strip comments or normalize relaxed syntax into standard JSON
Requirements:
- macOS with Raycast installed
- Node.js
22.22.2or newer - npm
- GNU Make, optional but recommended
With Make:
make install
make localWithout Make:
npm install
npm run devmake help # List available commands
make test # Run the Vitest suite
make test-watch # Run tests in watch mode
make lint # Run Raycast manifest, ESLint, and Prettier checks
make lint-fix # Apply automatic lint and formatting fixes
make typecheck # Run TypeScript checks
make build # Build the production bundle locally
make check # Run all automated checksThe automated suite covers:
- Valid, primitive, and stringified JSON roots
- Invalid and relaxed JSON
- Embedded JSON-like spans inside logs
- Preservation of malformed or unsupported content
- Escape and one-layer unescape behavior
- Markdown fence safety
- UTF-8 size limits
- Large deterministic fixtures up to 5 MB
Run everything with:
make checkBefore release, also verify all five commands manually inside Raycast, including selected text, clipboard flows, copy actions, and 5 MB edge cases.
Contributions are welcome.
- Open an issue before making substantial user-visible changes.
- Preserve the product invariants in AGENTS.md.
- Add or update tests for every behavior change.
- Run
make check. - Open a pull request with behavior notes and manual verification details.



