Save a formatted copy
Save Formatted Copy writes a new file with the same JSON, either pretty-printed with one value per line or minified onto one line. Only the spaces and line breaks between values change: every key, string, and number is copied exactly as written, in the same order. It works on JSON files of any size without loading them into memory, and the open document is not changed.
It is available for JSON files in UTF-8, including .gz and .zst archives of them, but not for NDJSON files. To format a pasted document, save it with Save As, open the saved file, and format that.
Write the formatted copy
Section titled “Write the formatted copy”-
Open the JSON file and choose File → Save Formatted Copy….
-
Choose the options; see Formatting options.
-
Check Save to. It suggests a name next to the source, such as
data.pretty.jsonordata.min.json. Select Choose… to pick another folder or name. -
Select Save Copy.
On a large file, the status bar shows reformatting… N%. When the copy is done, a notice confirms it with an Open button that opens the copy in a new tab.
If a file with the name in Save to already exists, JSON Digger asks “Replace name?” before it writes the copy; select Replace to overwrite it. It does not ask again about a file you picked with Choose…, because the save dialog has already asked. A name you type into Save to needs its full path, for example C:\Data\orders.pretty.json; a name alone is refused.
Formatting options
Section titled “Formatting options”| Option | Choices | Starts as |
|---|---|---|
| Format | Pretty-print or Minify | The opposite of the source: Minify for an indented file |
| Indent | 2 spaces, 4 spaces, or Tab | The source’s indentation |
| Line endings | LF (Unix) or CRLF (Windows) | The source’s line endings |
| End with a newline | On or off | On if the source ends with a line break |
| Keep the byte order mark | On or off; shown when the source has one | On |
A pretty-printed copy can be much larger than a minified source. When the drive may not have room, JSON Digger asks “Low disk space” first; select Write anyway to try.
What the copy contains
Section titled “What the copy contains”If the open document has unsaved edits, the copy includes the edits you have applied, but not a value still open in an editor; apply or cancel it first.
If the file is not valid JSON, no copy is written and the dialog shows where the error is. To fix the file first, see Open malformed JSON.
The copy of a .gz or .zst file is uncompressed JSON. Give it a name that ends in .json in Save to.