How to Change a File Extension on Windows & Mac in 4 Ways

5 mins read

Updated on 2026-09-04 10:10:40 to Wiki

Changing a file extension is usually as simple as showing the extension in File Explorer or Finder and renaming the letters after the final period. For example, you can rename notes.text to notes.txt when a file has the wrong extension.

However, changing an extension does not convert the actual file format. This guide explains how to change file extension correctly on Windows and Mac and what to do if something goes wrong.

how to change file extension

File Extension vs File Format: What's the Difference?

A file extension is the part at the end of a filename after the final period. Common examples include .jpg, .pdf, .docx, .txt, and .mp4.

For example:

report.docx

Here, “report” is the filename and .docx is the file extension. The extension helps the operating system identify the file type and determine which apps can open it.

change file extension vs convert file format

Change File Extension vs Convert File Format

Changing an extension and converting a file format are not the same thing.

Action Example What Happens
Change extension photo.jpgphoto.png Changes the filename suffix
Convert format JPEG → PNG Changes the actual file format

For example, simply renaming photo.jpg to photo.png does not convert the JPEG image into a PNG image. Microsoft confirms that changing a filename extension does not convert the underlying file format.

This distinction is important when you edit a file extension. An incorrect extension may cause an app to misidentify the file or fail to open it.

How to Actually Change a File Format

To change the actual format, use an app that supports file conversion. Depending on the program and file type, you can usually:

  • Use "Save As" and select another supported format.
  • Use "Export" and choose the desired output format.
  • Use a compatible file converter when the original app does not support the target format.

For example, you can convert HEIC to JPEG instead of simply changing .heic to .jpg. On Mac, Apple also recommends using the app that created the file or another compatible app when you need to change the actual format rather than its extension.

How to Change a File Extension in Windows 11/10?

The easiest way to change a file extension in Windows is through File Explorer. Before you rename anything, make sure extensions are visible so you can edit the correct part of the filename.

Method 1. Change a File Extension in File Explorer

On Windows 11, you can display extensions directly from the File Explorer View menu.

  • Open "File Explorer".

  • Select "View > Show > File name extensions".

    show file name extensions in file explorer
  • Locate the file whose extension you want to change.

  • Right-click the file and select "Rename". You can also select it and press F2.

    rename the file extension in file explorer
  • Replace the characters after the final period. For example, rename example.text to example.txt.

  • Press Enter and confirm the warning if Windows asks whether you want to change the extension.

This is the most direct way to change the extension of a file in Windows. However, use the new extension only when it is appropriate for the file's actual format.

Method 2. Change a File Extension in File Properties

You can also check the file through its Properties window before renaming it. This is useful when you want to check the file type, associated app, or attributes first.

  • Right-click the file and select "Properties".

  • Check "Type of file" to identify the current extension and file type.

    check file type in file properties
  • Close the Properties window.

  • Right-click the file again and select "Rename".

  • Modify the file extension and press Enter.

If the extension is not visible in the filename, enable "File name extensions" in File Explorer first.

How to Change a File Extension on Mac?

macOS often hides filename extensions, so you may need to display them before you can modify a file extension. Apple lets you show extensions for all files or for an individual file.

Method 1. Change a File Extension in Finder

First, make extensions visible in Finder:

  • Open "Finder", then choose "Finder > Settings > Advanced".

  • Select "Show all filename extensions".

    show all filename extensions finder
  • Find and select the file you want to rename, then click the filename or press Return.

  • Replace the current extension with the correct one, then confirm the change when macOS displays a warning.

Apple warns that changing an extension may prevent the app that created the file from opening it. You can also enable "Show warning before changing an extension" under Finder's Advanced settings.

Method 2. Change a File Extension with Get Info

You do not have to display extensions for every file. To work with a single file:

  • Select the file in Finder.

  • Choose "File > Get Info", or press Command + I.

  • Expand "Name & Extension".

    change file extension with get info
  • Clear "Hide extension" if it is selected.

  • Edit the filename and enter the correct extension.

  • Close the window and confirm the change if prompted.

Apple's filename extension guide also explains how to show or hide extensions for individual files.

How to Change Multiple File Extensions at Once?

Renaming files individually is manageable for a few files. When dozens or hundreds of files need the same extension change, Windows command-line tools can make the process faster.

Before using a batch command, make a backup of important files and test the command on a few copies first. A batch rename affects many files at once, and it still does not convert their actual formats.

Method 1. Change File Extensions with Command Prompt

Command Prompt is useful when every file with one extension needs the same new extension.

Open the folder containing the files in File Explorer, click the address bar, type cmd, and press Enter.

type cmd in the address bar

The Command Prompt window will pop up directly. Then run:

ren *.jpeg *.jpg

run command prompt to batch change file extensions

This renames all .jpeg extensions in the current folder to .jpg, for example:

image1.jpegimage1.jpg
image2.jpegimage2.jpg

This command only renames the file extensions. It does not convert the actual file format.

Method 2. Change File Extensions with PowerShell

PowerShell provides more control when you need to modify file extensions across multiple files.

Open PowerShell from the Start menu. Use cd followed by the folder path to go to the folder containing your files. For example:

cd "C:\Users\YourName\Pictures"

Then run:

Get-ChildItem *.jpeg | Rename-Item -NewName { $_.Name -replace '\.jpeg$','.jpg' }

change file extension with powershell

This finds files ending in .jpeg in the current folder and changes their extensions to .jpg.

Check the target folder and file pattern carefully before running the command, as a bulk rename can affect many filenames at once.

What to Do If You Can't Change a File Extension?

Sometimes the extension is missing, cannot be edited, or the operating system refuses the change. Try the following solutions based on what is preventing the rename.

Tip 1. Show Hidden File Name Extensions

You may be editing only the visible filename because the actual extension is hidden.

On Windows 11, open "File Explorer > View > Show > File name extensions". On Mac, go to "Finder > Settings > Advanced" and enable "Show all filename extensions".

Once the suffix becomes visible, you can edit the file extension directly.

Tip 2. Remove the Read-Only Attribute

A read-only setting can prevent certain changes to a file.

On Windows:

  • Right-click the file and select "Properties".

  • Look under "Attributes".

  • Clear "Read-only" if it is enabled.

    remove read only attribute
  • Click "Apply > OK".

  • Try renaming the file again.

Keep in mind that some protected or system files may have additional restrictions.

Tip 3. Check File Permissions

Your account needs permission to modify the file. This commonly becomes an issue with files copied from another account, shared folders, external drives, or protected locations.

On Windows, right-click the file and check "Properties > Security". On Mac, select the file, press Command + I, and check "Sharing & Permissions".

check file permissions windows

If your account has read-only access, you may need permission from the file owner or administrator before you can rename it.

Tip 4. Close Apps Using the File

An app may temporarily lock a file while it is open or being processed.

Save your work, close the app using the file, and try the rename again. If you still cannot edit the file extension, restart the app or computer and retry.

What If a File Won't Open After Changing Its Extension?

A file that stops opening immediately after an extension change is often not damaged. The new extension may simply not match the file's actual format.

Equivalent extensions such as .jpeg and .jpg usually still work because they describe the same format.

Fix 1. Change the File Back to Its Original Extension

First, undo the rename.

For example, suppose you changed:

photo.jpgphoto.png

Rename it back to:

photo.jpg

Because changing the extension normally changes only the filename, restoring the correct extension may allow the original app to recognize the file again.

Fix 2. Open the File with the Correct App

The file may be associated with the wrong program after the extension was modified.

Try opening it with the app that originally created it or another app known to support its actual format.

For example, if you are working with a database file, make sure you know how to open a DB file with a compatible program instead of changing its extension. Do not keep trying random extensions.

Fix 3. Check the File's Actual Format

A filename extension is an identifier, not the file's underlying data.

If you downloaded the file, check the original download source or file information to confirm its format. If someone sent it to you, ask what program or format was originally used.

Once you know the real format, restore the corresponding extension.

Fix 4. Convert the File to the Format You Need

When your goal is to use another file format, rename is the wrong approach.

Open the original file in a compatible app and use "Save As", "Export", or another supported conversion feature. This creates a file whose internal format actually matches its extension.

How to Recover Files Lost While Changing File Extensions?

Changing a file extension itself does not normally delete file data. However, files may be accidentally deleted or lost while you rename extensions in bulk, reorganize folders, or manage original and converted copies.

If a file is missing, check the Recycle Bin or an available backup first. If you cannot find the original file there, 4DDiG File Recovery can scan the affected storage device for recoverable files. It supports recovery from USB drives, HDDs, SSDs, SD cards, and other storage devices and lets you preview recoverable files before recovery.

FREE DOWNLOAD

Secure Download

FREE DOWNLOAD

Secure Download

To recover the missing files with 4DDiG:

  • Open 4DDiG and select the drive or partition where the original file was stored before it was lost while renaming or changing file extensions. Then start the scan.

    launch 4ddig and enter interface

  • While the scan is running, use the "File Type" filter or "Search" feature to find the lost file. You can search by its original filename or narrow the results by its original file type, such as JPG, PDF, DOCX, or MP4.

    click type to see all files 4ddig

  • Once the scan results appear, select the file you want to restore and preview it when available. Check the filename, file type, and content to make sure you have found the correct original file, then click "Recover".

    preview and recover the files

  • Choose a different drive or another safe location for the recovered original file, then click "Save Now" to complete the recovery.

    save the recoverable files
Important:

To avoid overwriting the lost original file or other recoverable data, save recovered files to a different drive or to cloud storage such as OneDrive or Google Drive. Do not save them back to the original location.

FAQs

Does changing a file extension change the file type?

No. Changing a filename extension changes the filename, not the file's underlying format. For example, renaming image.jpg to image.png does not convert a JPEG image into PNG.

Does changing a file extension damage the file?

Usually, no. Changing the extension does not modify the file's underlying data, but using an incorrect extension may prevent apps from recognizing or opening the file correctly.

Why can't I see file extensions in Windows 11?

Windows may hide filename extensions. Open "File Explorer > View > Show > File name extensions" to display them.

How do I change multiple file extensions at once?

You can use Command Prompt or PowerShell to batch rename file extensions in Windows. For example, ren *.jpeg *.jpg changes all .jpeg extensions to .jpg in the current folder.

Conclusion

Once you know how to change file extension on Windows or Mac, renaming individual or multiple files is straightforward. Just remember that changing an extension does not convert the actual file format. If an original file is accidentally lost during the process, 4DDiG Data Recovery can help recover it when no backup is available.

FREE DOWNLOAD

Secure Download

FREE DOWNLOAD

Secure Download

William Bollson (senior editor)

William Bollson, the editor-in-chief of 4DDiG, devotes to providing the best solutions for Windows and Mac related issues, including data recovery, repair, error fixes.

(Click to rate this post)

You rated 4.5 ( participated)