How to change the default app for JSON files on Mac
JSON is the text format most configuration files and API responses use. A Mac opens .json files in TextEdit, or in Xcode once Xcode is installed. Xcode takes several seconds to launch for a file you only wanted to glance at. Most developers move JSON to a lighter editor.
Change it in Finder
- In Finder, select any
.jsonfile. - Choose File → Get Info, or press ⌘ I.
- Expand Open with and pick the app. If it isn't listed, choose Other….
- Click Change All… and confirm.
Without Change All…, only that one file changes. Since macOS 26.4, Finder also asks you to confirm before a file-type default changes.
Apps that open JSON files on Mac
- Visual Studio Code, Zed, Sublime Text. Syntax colouring, folding and formatting.
- BBEdit, CotEditor. Mac-native editors that open instantly.
- Xcode. Takes over many code file types when installed.
- A browser. Firefox shows JSON as a collapsible tree.
Xcode claims these types again
Xcode declares itself an editor for dozens of source and data types. After a major Xcode update, files you had moved elsewhere can go back to opening in Xcode.
Change it from Terminal
The free command-line tool duti sets defaults without Finder. Install it with Homebrew:
brew install duti
Then, to make Visual Studio Code open every .json file:
duti -s com.microsoft.VSCode .json all
The first argument is the app's bundle identifier. To find it for any app:
osascript -e 'id of app "Visual Studio Code"'
macOS may still ask you to confirm the change.
macOS identifies this file type as public.json.
Change it in Defaultify
- Open Defaultify and choose Code & Developer, or search for
.json. - On the JSON Data (.json) row, open the app menu and choose the app you want.
- Confirm in the Finder dialog.
The free version shows which app opens this type. Changing code and developer types is part of Defaultify Pro ($6.99, once). You can also drag any file onto the Defaultify window to see what opens it.
Manage every default in one place
Defaultify for Mac shows all your file-type and link defaults in one window, flags missing ones, and with Pro warns you when an app takes one over.
If it changes back
Some apps claim file types again when they update. See how to stop apps from changing your defaults, and what to check when a change doesn't stick.