Skip to content

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.

  1. Open the JSON file and choose File → Save Formatted Copy….

  2. Choose the options; see Formatting options.

  3. Check Save to. It suggests a name next to the source, such as data.pretty.json or data.min.json. Select Choose… to pick another folder or name.

  4. 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.

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.

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.