To change file associations in macOS, select a file in Finder, press Command-I to open its Info window, and choose a new app from the "Open with" section. This article explains the different ways to set default apps for file types, how to fix misassociations, and what to do when a file won't open with the app you expect.
How macOS Chooses the Default App
macOS uses a system called Launch Services to decide which application opens a given file type. Each file has a file extension (like .pdf or .jpg) and a Uniform Type Identifier (UTI) that the system maps to an app. When you double-click a file, the Finder asks Launch Services for the default handler, and that app launches. This mapping is stored per user, so changing a default on one account does not affect other users on the same Mac.
Most apps declare which file types they can open in their Info.plist, and the system trusts that declaration. When you install a new app, it may register itself as the default for certain types—sometimes without asking. That is why a PDF that used to open in Preview might suddenly open in a different reader after you install it.
Changing the Default App for One File Type
The most reliable method is through the Finder's Info window:
- Right-click (or Control-click) the file in Finder.
- Select Get Info from the context menu.
- In the Info window, expand the Open with section.
- Click the dropdown and choose the app you want to use.
- Click the Change All… button below the dropdown.
- Confirm in the dialog that appears.
This changes the default for all files of that type, not just the one you selected. For example, if you change a .txt file to open in TextEdit, every text file on your system will now open in TextEdit. If you only want to open that single file with a different app, skip the "Change All" step.
If the app you want isn't in the dropdown, choose Other… and navigate to the application. You can also check "Always Open With" in the Open With dialog to make it permanent.
Setting a Default in the App Itself
Some apps include their own preference for file associations. For example, in Safari, you can set how downloaded files are handled by going to Safari > Settings > General and changing the "Open safe files" option. In Mail, you can choose whether attachments open in Preview or a specific app. However, this only affects files that the app itself opens—it does not override the system-wide association for that file type.
For most situations, the Info window method is the one that works. If an app has a built-in setting that conflicts, the system-level association usually wins when you double-click a file in Finder.
Using the Open With Menu for a One-Time Change
If you only want to open a file with a different app once—without changing the default—right-click the file and choose Open With. A submenu lists suggested apps. If the one you want isn't there, select Other… and browse to it. This does not change the default association, so next time you double-click, the original app will still open.
This is handy when you have two apps that can handle the same file type and you want to compare them, or when you need to open a file in a specific version of an app that isn't the default.
Common Problems and Fixes
Sometimes the Info window method doesn't work as expected. Here are the most common issues and their solutions:
- The "Change All" button is grayed out. This happens when the file type isn't recognized by any app. Try opening the file with the desired app first, then use Get Info again.
- The file still opens in the old app. The system may have cached the old association. Log out and back in, or restart your Mac. Alternatively, use the
Open Withmenu and choose the new app, then check the "Always Open With" checkbox. - The app isn't in the list. The app may not declare support for that file type. You can still choose it via Other…, but the system might warn that the app may not be able to open the file.
- File type shows as "Document" or "Unknown". The file extension may be missing or the UTI is not recognized. Rename the file to include the correct extension (e.g., .pdf, .jpg).
If you have a file with no extension, macOS will not know what to do with it. You can force an app to open it by right-clicking and choosing Open With > Other, but the system will likely warn you.
Resetting All Associations to Defaults
If you've made many changes and want to start fresh, you can reset Launch Services. Open Terminal and run:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
This command rebuilds the Launch Services database, which resets all file associations to the factory defaults. You'll need to reapply any custom associations afterward. This is a safe operation, but it may take a minute and you should quit all running apps first.
After running the command, restart your Mac to ensure the changes take effect.
Frequently Asked Questions
Why does my Mac keep changing the default app for a file type?
When you install a new app that supports the same file type, it may register itself as the default. Some apps do this without asking, especially if they are the first to open that type. To prevent this, you can re-set your preferred app via Get Info > Change All. There is no built-in way to lock an association, but you can avoid installing apps that hijack associations, or use the Open With menu to choose the app each time.
How do I change the default app for all PDF files?
Select any PDF file, press Command-I, go to the "Open with" section, choose your preferred PDF reader, and click "Change All…". Confirm the dialog. This applies to every PDF on your system, not just the one you selected. If you don't see the app you want, click "Other…" and locate it in the Applications folder.
What if the file type isn't listed in the Open With menu?
Choose "Other…" from the Open With submenu to browse for any app. If the app doesn't appear, it may not declare support for that file type. You can still select it, but macOS may warn that the app might not open the file correctly. If the file has no extension, add one—for example, rename report to report.pdf—so the system can recognize it.
Can I change file associations from the command line?
Yes, you can use the duti utility (if installed via Homebrew) to set default handlers from the terminal. For example, duti -s com.apple.Preview public.pdf all sets Preview as the default for all PDF files. This is more advanced but useful for scripting or managing multiple Macs. Without duti, the Info window is the only built-in method.
Why does a file open in the wrong app even after I changed it?
This can happen if the app you chose cannot actually open that file type, or if the file has a non-standard extension. Check the file's extension and ensure it matches the app's supported types. Also, some apps override the system default by registering themselves as the handler for that UTI. Try resetting Launch Services with the lsregister command, then set your preferred app again.
Does changing the default app affect all users on the Mac?
No, file associations are stored per user. Each user account has its own Launch Services preferences. If you change the default app for a file type, it only affects your account. To change it for another user, log into that account and repeat the process.