Skip to content
86% off$349 $48.86code BF2026

Docs

Bytepliers docs37 pages

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

  1. 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.
  2. Choose Format or Minify in the toolbar. The output updates as you type.
  3. 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.

JSON Formatter with unquoted keys, single quotes and trailing commas on the left, strict JSON on the right and a Repaired 3 issues badge
Lenient mode repairs the input and says what it fixed.

Toolbar options

OptionWhat it doesDefault
Format / MinifyPretty-print or compact the outputFormat
Indent2 spaces, 4 spaces or Tab (Format only)2 spaces
Sort KeysSorts object keys recursivelyOff
Parsing: Lenient / StrictRepair broken JSON, or accept RFC 8259 onlyLenient
NaN and InfinityAs strings or As null (Lenient only)As strings
One per line / Wrap as arraySets how multiple documents are output. Appears only when several documents are detected.One per line
Text / TreeShows 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:

JSON Formatter in Strict mode marking an unquoted key as an error, with a Switch to Lenient button
Strict mode marks the first error and offers Lenient mode.
  • comments and trailing commas
  • single quotes, smart quotes, and unquoted or numeric keys
  • True, False, None, undefined, NaN and ±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.

JSON Formatter Tree view of the bookstore sample with the path bar

These keys work when the tree has focus:

KeysAction
⌘BZoom into the selected node
⌘ZZoom back out (or click the breadcrumb)
⌘FFind keys and values (↩ next, ⇧↩ previous, ⎋ close)
⌘CCopy the selected value
Space or ⌘YPreview 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.

JSON Formatter with a jq filter listing book titles over 10
  1. Pick jq (default) or JSONPath from the language menu.
  2. Type a filter, such as .items[] | .name in jq or $.items[*].name in JSONPath. The result updates as you type.
  3. Optional: turn on Raw to print strings without quotes, like jq -r.
  4. 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, length
  • to_entries, from_entries, with_entries
  • sort_by, group_by, unique_by, min_by, max_by
  • object and array construction, string interpolation, //
  • if/elif/else, try/catch
  • as $x with destructuring, reduce, foreach
  • assignment operators
  • del, paths, getpath, setpath, pick, walk
  • test, sub, gsub, split
  • limit, first, until, while
  • the @base64, @base64d, @csv, @tsv, @json, @text, @html, @uri and @sh formats

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() and match(), 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

  1. Press ⌘U, or click the link icon in the input header.
  2. In the Open URL or cURL sheet, paste a URL or a full curl … command into URL or cURL command.
  3. Click Send (⌘↩).
  4. If the response is JSON, click Open in JSON Formatter (⏎).
Empty Open URL or cURL sheet with its URL field

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 -k asks "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, -b or -H in the command.
    • Multipart -F text fields work, but @file uploads are refused.
  • 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

LimitValue
Input size64 MB
Nesting depth100 levels ("Nesting too deep")
Tree auto-expand / Expand AllUp to 60,000 values ("Too large to expand at once")
jq filter length10,000 characters
jq filter nesting64 levels
jq run time2 seconds
jq results10,000 (results nested over 1,000 levels are refused)
Saved filters30
Fetched response body50 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 -k only 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.

Every app.
One purchase.