How do I change which app opens a file?
PDFs opening in a browser, photos opening in something you never chose, links opening in the wrong browser. How default apps work, the difference between opening once and changing it for good, and what to do when the setting will not stick.
- Difficulty
- beginner
- Time
- 15 min
- Read
- 6 min
Short answer
Right-click the file, choose Open with, and pick Choose another app — that opens it once. Tick the box to always use that app, and it becomes the default for every file of that type. To change several at a time, use the defaults list in settings: Windows sets defaults per file type, and macOS uses Get Info on a file and then Change All.
Which program opens a file is a decision the system makes on your behalf based on the file's type, and every newly installed program tries to influence it. That is why a fresh photo editor quietly takes over every image on the machine, why a Windows update can reset the browser, and why PDFs so often end up opening in a web browser when someone was expecting a document reader. The mechanics are simple once you know that there are two separate operations — open this one file differently, and change the default for all of them — and that the interface puts them on the same menu without making the distinction obvious.
Step by step
- Turn on file extensions first.Without them you cannot see the file type you are changing the default for, and .docx and .doc behave differently. Both Windows and macOS have a setting for this and it is worth leaving on permanently. The catalogue has a short guide on it.
- Open once without changing anything.Right-click, Open with, and select the program. On Windows, choosing an application from this list without ticking the always box is a one-off. On a Mac, holding Option while right-clicking changes Open With to Always Open With, which is the reverse arrangement and catches people out.
- Change the default from the file itself.On Windows, Open with, Choose another app, select the program, tick "Always use this app to open .xxx files". On a Mac, select the file, Get Info, change the Open with dropdown, then click Change All to apply it to every file of that type.
- Use the settings list to change several at once.Windows Settings, Apps, Default apps lists both by application and by file type. Setting defaults by application is faster when you have just installed something; setting them by file type is more precise when only one type is wrong.
- Set the default browser deliberately.It is a separate setting from file types and it governs where links open from every other application. Windows 11 made this a single button after criticism; before that it required setting each link type individually, which is why some machines still have it split.
- Know why a program is not listed.Applications register the file types they can handle at installation. A program that is not in the list may still be selectable by browsing to its executable, or it may genuinely not support that file type — in which case forcing it produces an error rather than a result.
- Deal with the update that resets everything.Major Windows feature updates sometimes reset defaults to Microsoft applications, and some programs reassert themselves at every launch. Where a program has a setting for "check if I am the default at start-up", turning it off stops the tug of war.
- Be careful with file types you should not open at all.Never set a default for executable types such as .exe, .msi, .scr, .js or .vbs — those are programs, and "opening" one runs it. If an unexpected attachment has one of those extensions, the correct action is to delete it.
Common mistakes
- Uninstalling a program to stop it opening files — It is a large response to a small setting, and Windows will then have no default at all for those types. Change the default instead.
- Setting a default from an "open with" list without reading which program you picked — The list often contains several similarly named entries, including web-based options that will upload the file. Pick deliberately.
- Trying to force an unusual file to open in a program that does not support it — You get an error or, worse, a corrupted-looking result. The right response to an unrecognised file is to identify the type first.
If it doesn't work
PDFs open in a browser and you want a reader
Cause: The browser registered itself as the PDF handler — Fix: Change the default for .pdf specifically. Browsers are perfectly good PDF readers for viewing, so the change is worth making only if you need annotation, forms or signatures.
The setting reverts after a restart or an update
Cause: An application is reasserting itself, or a feature update reset defaults — Fix: Look in the application's own settings for a default-handler check and turn it off. Set the default again afterwards.
"How do you want to open this file?" appears every time
Cause: No default is registered for the type — Fix: Tick the always box in that dialogue, or set it in the defaults list. If the dialogue offers nothing useful, the machine has no application for that type — the catalogue's guide on opening an unknown file covers identifying it.
The wrong browser opens links from email or documents
Cause: The default browser setting rather than a file type — Fix: Set the default browser in settings. On Windows 11 there is a single Set default button on the browser's own page in the defaults list.
Changing it on a Mac only affected one file
Cause: Change All was not clicked — Fix: Get Info changes that one file until you click Change All, which applies it to the whole type. This is the most common macOS version of this question.
Photos open in an editor you do not want
Cause: The editor took the file types at installation — Fix: Set the image types back individually. Most editors ask during installation and default to taking everything, so it is worth reading that screen next time.
Questions people ask
Why did a Windows update change my defaults?
Feature updates — the large annual ones — have historically reset some defaults to Microsoft's own applications, particularly the browser and PDF handling. Smaller monthly updates do not. It is worth checking your defaults after a feature update rather than assuming an application broke.
Can I set different defaults for different folders?
No — defaults are per file type across the whole system, not per location. If you genuinely need two behaviours, the practical approach is to keep one application as the default and open the exceptions through Open with, or use different file extensions for different purposes.
What decides which icon a file gets?
The default application for that file type supplies the icon, which is why icons all change when you change a default. It is also a useful clue: a document showing a browser icon tells you at a glance which program will open it.
Is it safe to open a file with a different program than usual?
Yes, for ordinary document and image types — opening a photo in a different viewer cannot harm anything. The exception is anything that is itself a program, where "opening" means running. That is a matter of what the file is, not which application you choose.