Disable File Extension Change Warning in macOS
In this article
To disable the file extension change warning in macOS, open Terminal and run defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false, then restart Finder. This turns off the confirmation dialog that appears when you change a file’s extension (like .txt to .md), letting you rename extensions without interruption.
Why macOS Shows the Warning
macOS displays the warning to protect you from accidentally breaking a file. When you change an extension, the system often loses the association with the app that normally opens it. For example, renaming a .jpg photo to .png does not convert the image data—it only changes the label. The file may still open in Preview, but other apps might refuse it. The warning is a safety net, especially for users who are not familiar with how extensions work.
The setting is controlled by a hidden preference in Finder. Apple does not expose it in System Settings, so you must use Terminal or a third-party tool. The command modifies the global domain for Finder, which is read every time Finder launches.
How the Setting Works
The Finder preference FXEnableExtensionChangeWarning is a boolean (true/false) value. By default, it is set to true, meaning the warning appears. Setting it to false disables the dialog. The change is stored in the file com.apple.finder.plist in your user’s Preferences folder. Finder reads this at startup, so you must restart Finder (or log out and back in) for the change to take effect.
This setting is per-user, not system-wide. If you have multiple accounts on the Mac, each user must run the command individually. It also applies to all file types—there is no way to disable it for only certain extensions.
Step-by-Step: Turn Off the Warning
- Open Terminal (in Applications > Utilities).
- Type or paste the exact command:
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false - Press Return.
- Restart Finder by typing
killall Finderand pressing Return. Your desktop and windows will briefly disappear and reappear.
Alternatively, you can hold Option and right-click the Finder icon in the Dock, then choose Relaunch.
To re-enable the warning later, run the same command with true instead of false, then restart Finder again.
What Happens After You Disable It
Once disabled, you can change an extension without any pop-up. For instance, renaming report.docx to report.pdf will succeed silently, but the file will not actually become a PDF. Opening it might show garbled text or fail entirely. This is the trade-off: convenience versus safety.
If you frequently work with plain text, code, or data files where extensions are just labels, disabling the warning can speed up your workflow. For example, a developer might rename .txt to .md or .json to .txt for quick edits, and the warning becomes an annoyance.
However, for most users, keeping the warning is recommended. Accidentally changing a photo extension from .heic to .jpg can make it unopenable in some apps, and the warning gives you a chance to undo.
Common Problems and Fixes
The command does not work. Make sure you type it exactly, including the space before -bool. If you see an error, check that Terminal has permission to modify preferences (it should by default).
The warning still appears after restarting Finder. Sometimes Finder caches the setting. Try logging out and back in, or restarting your Mac. If you use a third-party file manager, it may have its own warning settings.
You want to disable it only for certain folders. That is not possible with this setting. The warning is global. You could use Automator or a script to automate renames, but that is more complex.
You changed the extension and now the file won’t open. The warning would have prevented this. To fix it, rename the file back to its original extension. If you don’t remember it, right-click the file, choose Get Info, and look under Name & Extension—but if you already changed it, you may need to guess. For images, try opening with Preview; for documents, try TextEdit.
Alternatives to Disabling the Warning
If you want fewer interruptions but still keep some safety, consider these options:
- Use “Get Info” to change extensions. When you rename via Get Info, the warning still appears, but you can check “Hide extension” to avoid seeing it later.
- Use a batch rename tool. Finder’s built-in “Rename Items” (select files, right-click, Rename) does not trigger the warning for multiple files at once. It changes the base name, not the extension, unless you specifically replace the extension.
- Keep the warning but learn to ignore it. The dialog has a “Use .xxx” button that you must click; there is no “Don’t warn again” checkbox. So the only way to permanently bypass it is the Terminal command.
For power users, the Terminal method is the cleanest. It is a one-time change that persists across reboots and macOS updates (though major upgrades sometimes reset it).
Safety and Risks
Disabling the warning does not damage your system. It only removes a confirmation dialog. The risk is to your files: you might change an extension without realizing the consequences. Always double-check the new extension. If you are not sure what a file type should be, leave the warning on.
There is no security risk in running the defaults command itself. It is a standard macOS command used by many system tweaks. However, be cautious when copying commands from the internet—make sure they are for com.apple.finder and not something else.
Frequently Asked Questions
Will this setting survive a macOS update?
Generally, yes, minor updates (like 14.1 to 14.2) preserve it. Major upgrades (e.g., macOS 13 to 14) sometimes reset Finder preferences. If you notice the warning returning, run the command again.
Can I disable the warning for only one file type?
No. The setting is global for all file types. There is no built-in per-extension option.
Does this work on macOS Sonoma or Ventura?
Yes, the command works on all modern versions of macOS, including Ventura (13), Sonoma (14), and Sequoia (15). The underlying Finder preference has remained the same for years.
What if I don’t have Terminal access?
If you are on a managed Mac (e.g., work or school), the administrator may have restricted Terminal. In that case, you cannot change this setting without admin rights. You could ask your IT department.
Is there a way to disable it using System Settings?
No, Apple does not provide a GUI toggle for this. The only official method is the Terminal command or a third-party app like TinkerTool or OnyX, which essentially run the same command for you.
What does the warning actually say?
The dialog reads: “Are you sure you want to change the extension from ‘.txt’ to ‘.md’? If you make this change, your document may open in a different application.” It offers “Use .md” and “Keep .txt” buttons. Disabling the warning removes this prompt entirely.