JSON Formatter in Bytepliers: Repair, Tree, jq and cURL
Format, minify and validate JSON in Bytepliers: Lenient vs Strict parsing, NDJSON, the Tree view and path bar, jq/JSONPath filters, URL fetch and limits.
Updated 7 min read
On this page
The Bytepliers JSON Formatter formats, minifies and validates JSON, repairs broken JSON, shows it as a tree, filters it with jq or JSONPath, and loads JSON from a URL or cURL command.
Open it with ⌘1 (Command-1), from Tools ▸ Format ▸ JSON Formatter, or with the link bytepliers://open/json. JSON files that you open in Bytepliers from Finder or the Dock also open here. These include .json, .geojson, .ndjson and .jsonl.
Format, minify and validate JSON with the Bytepliers JSON Formatter
- Put your JSON in the JSON pane. You can paste it (⌘V), drop a file on the pane, or press ⌘O to open a file.
- Choose Format or Minify in the toolbar. The output updates as you type.
- Copy the result with ⇧⌘C (Shift-Command-C), or save it with ⌘S.
When the input parses, the status line reads "Valid JSON · N values". When it doesn't, the editor tints the error line red, underlines the column and shows a badge such as "⚠ Ln 3:7" with the message.


Toolbar options
| Option | What it does | Default |
|---|---|---|
| Format / Minify | Pretty-print or compact the output | Format |
| Indent | 2 spaces, 4 spaces or Tab (Format only) | 2 spaces |
| Sort Keys | Sorts object keys recursively | Off |
| Parsing: Lenient / Strict | Repair broken JSON, or accept RFC 8259 only | Lenient |
| NaN and Infinity | As strings or As null (Lenient only) | As strings |
| One per line / Wrap as array | Sets how multiple documents are output. Appears only when several documents are detected. | One per line |
| Text / Tree | Shows the output as text or as a tree. Your choice is remembered. | Text |
Number literals and key order are kept exactly as written. The only exception is key order when Sort Keys is on.
Lenient vs Strict parsing
Lenient mode accepts almost-JSON, such as JSON copied from logs, config files or code, and outputs strict JSON. It repairs:


- comments and trailing commas
- single quotes, smart quotes, and unquoted or numeric keys
True,False,None,undefined,NaNand±Infinity- documents wrapped in a string or escaped with backslashes
- raw control characters
When it fixes something, the formatter shows "Repaired N issues". Click it to see a list of each fix with its line and column.
Strict mode accepts RFC 8259 JSON only. Use it to check that a payload will pass a strict parser. If Strict rejects the input but Lenient could parse it, a Switch to Lenient button appears.
NDJSON and multiple documents
Sometimes the input holds several JSON documents separated by line breaks, as in NDJSON or JSON Lines. The status then reads "N documents · N values" and two tabs appear:
- One per line keeps each document on its own line.
- Wrap as array combines them into one JSON array.
Browse the Tree view and path bar
Choose Tree to see the JSON as an outline with Key, Value and Type columns. The Type column shows chips such as "Object · 6". The first two levels expand automatically, and the header has buttons for Find, Expand All, Collapse All and Copy. The tree is a viewer only, so you can't edit values in it.


These keys work when the tree has focus:
| Keys | Action |
|---|---|
| ⌘B | Zoom into the selected node |
| ⌘Z | Zoom back out (or click the breadcrumb) |
| ⌘F | Find keys and values (↩ next, ⇧↩ previous, ⎋ close) |
| ⌘C | Copy the selected value |
| Space or ⌘Y | Preview a leaf value |
Find searches keys and scalar values and ignores case and accents. Right-click a row for Quick Look, Copy Value, Copy Key, Copy Path, Zoom In, Expand All and Collapse All.
The path bar shows where the selected node sits:
- Click a segment to select it.
- ⌘-click a segment to copy its path.
- ⌥-click a segment to copy its value.
Each segment also has a menu with Select, Copy Path, Copy Value and Copy Key. Use Path Notation to choose how copied paths are written: JSONPath (default), Dot, JavaScript or jq.
The value preview (Space or ⌘Y on a leaf) shows what a single value means:
- a date, for an epoch number or a date string
- a colour swatch
- an image, for Base64
- pretty JSON, for JSON stored in a string
- a decoded JWT
- unescaped text
Each preview has Copy and an Open in … button for the matching tool.
If your edits make the input invalid, the tree keeps showing the last valid version, dimmed, until the JSON parses again.
Filter with jq or JSONPath
The filter bar sits under the output.


- Pick jq (default) or JSONPath from the language menu.
- Type a filter, such as
.items[] | .namein jq or$.items[*].namein JSONPath. The result updates as you type. - Optional: turn on Raw to print strings without quotes, like
jq -r. - Press ⎋ to clear the filter.
Filtered output uses your Format/Minify, Indent and Sort Keys settings.
To keep a filter, click ★ Save Filter. The saved-filters menu lists saved filters newest first and holds up to 30. Clear Saved Filters empties the list.
Supported jq features
- paths,
|,,and? select,map,keys,lengthto_entries,from_entries,with_entriessort_by,group_by,unique_by,min_by,max_by- object and array construction, string interpolation,
// if/elif/else,try/catchas $xwith destructuring,reduce,foreach- assignment operators
del,paths,getpath,setpath,pick,walktest,sub,gsub,splitlimit,first,until,while- the
@base64,@base64d,@csv,@tsv,@json,@text,@html,@uriand@shformats
What's not supported
- jq:
def,label/break,input/inputs,match/capture/scan,repeat,tostream/fromstream,strftime/strptime/mktime,?//and streaming. - JSONPath: function extensions such as
length(),count()andmatch(), and script expressions.
To run the same jq filter on other data, add a jq Filter step in Pipelines.
Load JSON from a URL or cURL command
- Press ⌘U, or click the link icon in the input header.
- In the Open URL or cURL sheet, paste a URL or a full
curl …command into URL or cURL command. - Click Send (⌘↩).
- If the response is JSON, click Open in JSON Formatter (⏎).


The sheet shows the status, timing, size and body of the response. Use Show response headers to see the headers.
How requests behave:
- New hosts: the first request to each host asks "Send requests to
<host>?". Once you confirm, you aren't asked about that host again. -k: a command with-kasks "Connect without checking the certificate?" every time. Click Connect Anyway to go ahead.- Redirects:
- A plain URL always follows redirects to the same host.
- A cURL command follows them only when it includes
-L. - A redirect to another host, or from https to http, stops and offers Follow.
- No stored session: each request starts a fresh session with no cookie store, saved credentials or cache, and authentication challenges are rejected.
- Credentials and cookies are sent only if you include them with
-u,-bor-Hin the command. - Multipart
-Ftext fields work, but@fileuploads are refused.
- Credentials and cookies are sent only if you include them with
- Timeouts: a request times out after 30 seconds, and a whole transfer after 120 seconds. Response bodies are capped at 50 MB.
- History: nothing from the request is saved.
This is the only part of the JSON Formatter that uses the network. It runs only when you click Send, and it connects straight from your Mac to the server you entered.
Limits
| Limit | Value |
|---|---|
| Input size | 64 MB |
| Nesting depth | 100 levels ("Nesting too deep") |
| Tree auto-expand / Expand All | Up to 60,000 values ("Too large to expand at once") |
| jq filter length | 10,000 characters |
| jq filter nesting | 64 levels |
| jq run time | 2 seconds |
| jq results | 10,000 (results nested over 1,000 levels are refused) |
| Saved filters | 30 |
| Fetched response body | 50 MB |
Opening a file larger than 50 MB asks for confirmation first.
Troubleshooting
- "Nesting too deep": the JSON is nested more than 100 levels deep, which is more than the formatter can parse.
- Strict reports an error but the JSON looks fine: it probably contains a comment, a trailing comma or single quotes. Click Switch to Lenient.
- The Quick Panel's Format JSON fails on input the formatter accepts: the Quick Panel and Detect & Replace use the strict parser. Open the JSON in the main window instead (⌘O in the Quick Panel).
- The jq filter shows an error: jq errors start with "jq: …". "The filter is too long (over 10,000 characters)" and "Filter nested too deeply" mean the filter hit a limit. Otherwise, check the filter for a jq feature from the unsupported list above.
- "The server's certificate isn't trusted. Add -k to the cURL command to connect anyway.": add
-konly if you trust the server, then click Connect Anyway. - "Plain http isn't allowed for this host; use https": change the URL to
https://. - "The response isn't JSON" or "Binary response (…)": the server returned something other than JSON, so Open in JSON Formatter isn't offered.