Show or hide filename extensions on Mac
A filename extension appears at the end of some filenames, and looks like a period followed by a few letters or words (for example, .jpg). A file’s filename extension shows what type of file it is and what apps can open it.
Filename extensions are usually hidden in macOS, but if you find them useful, you can show them. If extensions are hidden, macOS still opens files with the proper apps.
For one file
On your Mac, select a file, then choose File > Get Info, or press Command-I.
Click the arrow next to Name & Extension to expand the section.
To show or hide the filename extension, select or deselect “Hide extension.”
For all files
In the Finder on your Mac, choose Finder > Settings, then click Advanced.
Select or deselect “Show all filename extensions.”
If you select “Show all filename extensions,” all extensions are shown, even for files that have “Hide extension” selected. If you deselect “Show all filename extensions,” then file extensions are shown or hidden based on their individual “Hide extension” settings.
When you rename a file or folder, don’t change its filename extension, or you may no longer be able to open the file with the app that was used to create it. To be warned before you change an extension, select “Show warning before changing an extension” in the Advanced pane of Finder settings.
If you want to change a file’s format, use the app you used to create the file. For example, TextEdit can convert a document from plain text format (.txt) to a rich text format (.rtf), and Preview can convert many types of graphics files.