Skip to content
All guides

A little guidance

How to open a folder of JSON files, edit them and save

Open a project or config folder in JSON Prettifier to see all its JSON files, change one in the tree and save it straight back to your computer.

Advertisements

Edit JSON files

Fix the port in a project’s dev config

We opened a small project folder with package.json, tsconfig.json and config and locales subfolders. Its first file, config/dev.json, opened at once; we double-clicked the port, changed it from 3000 to 5173 and saved.

JSON Prettifier with a project folder open: the Files list on the left shows config/dev.json highlighted with an amber unsaved square, the tree shows the changed port, and Save a copy and Save are in the bottom bar.
The open file is highlighted in the list; Save writes it back. View full size
StepWhat you see
Open the folder6 JSON files in a tree with their sizes; the first one opens
config/dev.jsonIts row is highlighted in the list
Change the portA dot next to the file, and Save can be pressed
SaveSaved; the file on disk has the new port

For these screenshots the folder came from the browser’s private storage instead of the folder picker, so it behaves exactly like a folder on your computer.

Repeat this example

  1. Click the import icon next to Files and pick the folder.
  2. Click the file in the Files list, if it isn’t the first one.
  3. Double-click a value, change it and press Save or Ctrl/Cmd+S.

Check the result

After saving, the dot next to the file disappears and Save is greyed out again.

A common mistake

Choosing your whole Downloads or home folder: browsers block those; pick a folder inside them.

Open JSON Prettifier

Sources and credits

Sample JSON made for these guides. The bookshop orders, names and emails are invented. Every screenshot shows the real tool working on that JSON.

Open the folder

Click the folder bar at the top of Files and pick a folder; you can also drop the folder onto the Preview. The Files list shows every JSON file in it and its subfolders (node_modules, .git and build folders are skipped), and the first file opens at once.

Open another file

Click a file in the list. It opens in the tree, and its row is highlighted in the list.

Edit and save

Double-click a value to change it; the check at the bottom keeps telling you whether the JSON is valid, and an amber square in the list marks unsaved changes. Save becomes available; press it or Ctrl/Cmd+S to write the file back. The browser asks once for permission to save.

Keep the original instead

Save a copy asks where to save the changed JSON as a new file and leaves the original untouched. Saving works in Chrome, Edge and Opera on a computer; in other browsers Save and Save a copy download the file.

  • JSON Prettifier

    How to view and edit JSON in a tree

    JSON Prettifier shows JSON as a tree: open and close objects and arrays, see how many keys or items each one has, and change, add, move or delete keys and values in place.

Advertisements