How to Change File Extension in Windows, Mac & Mobile (2026)

Learn how to change file extension safely on Windows 11, Mac, iPhone, and Android. Step-by-step guide with batch rename tips and troubleshooting.

Ever received a file your computer refuses to open? The culprit is often a mismatched file extension. The good news? You can fix it in seconds—if you know how to change file extension safely. This guide walks you through every platform, without breaking your files.

I've spent the better part of fifteen years wrestling with file formats across every operating system imaginable. And if there's one thing I've learned, it's this: most people either don't know what a file extension actually is, or they assume changing it is riskier than it really is. Both misconceptions cost time. Let me clear them up.


Neatly arranged blue office binders labeled with dates and names for organized storage.

What Is a File Extension and Why Does It Matter?

Think of a file extension as the name tag at a conference. It tells your operating system, "Hi, I'm a JPEG. Please open me with a photo viewer." The extension is those three or four letters after the dot in a filename—.pdf, .docx, .mp4, and so on.

Without that name tag, your computer would have to guess what kind of data it's dealing with. And computers are terrible at guessing.

File Extension vs. File Format: The Crucial Difference

Here's where most people get tripped up. The extension is just a label. The file format is the actual internal structure of the data—the way the bytes are organized inside.

ExtensionFile FormatTypical Use
.jpg / .jpegJPEG imagePhotos, web graphics
.pngPortable Network GraphicsImages with transparency
.mp4MPEG-4 Part 14Video files
.csvComma-Separated ValuesTabular data, spreadsheets
.txtPlain TextUnformatted text
.docxOffice Open XMLWord documents
Changing the extension does not change the format. It's like putting a "CEO" sticker on your name tag—you're still doing the same job underneath. This distinction matters more than anything else in this guide, so keep it in mind.

Why You Might Need to Change a File Extension

In my consulting work, I've seen three recurring scenarios where changing an extension is genuinely useful:

Compatibility issues. You've got a .mov file from an old camera, but your video editing software only accepts .mp4. If the underlying codec is compatible, a simple rename might do the trick.

Mislabeled files. This happens more often than you'd think. A client once sent me a file named data.txt that was actually comma-separated data. Renaming it to .csv made it open correctly in Excel.

Workflow requirements. Some legacy systems and upload portals only accept specific extensions. I've seen government portals reject perfectly valid files simply because the extension didn't match their whitelist.


Color-coded office binders organized neatly in a storage shelf, featuring labels and a striking red binder.

How to Change File Extension on Windows 10 and Windows 11

Windows makes this straightforward, but there's a catch: file extensions are hidden by default. You'll need to flip that setting first.

Step 1: Show File Extensions in File Explorer

Windows 11: Open File Explorer, click View in the top toolbar, then hover over Show and check File name extensions.

Windows 10: Open File Explorer, click the View tab at the top, then check the File name extensions box in the Show/Hide section.

Prefer the classic route? Both versions let you go through File Explorer Options (formerly Folder Options). Click View in the dialog, then uncheck Hide extensions for known file types.

Once you've done this, every file will display its full name with the extension visible. You'll wonder how you ever worked without it.

Step 2: Rename the File Extension

Now for the actual change:

  1. Right-click the file and select Rename (or press F2).
  2. Locate the part after the dot—that's your extension.
  3. Change it to whatever you need (e.g., .txt to .csv).
  4. Press Enter.

Windows will pop up a warning: "If you change a file extension, the file might become unusable." This isn't Windows being dramatic—it's a legitimate heads-up. Click Yes only if you're confident the new extension matches the file's actual format.

How to Batch Change File Extensions in Windows

Renaming one file at a time gets old fast. When you've got hundreds of files to process, here are your options:

Method 1: Command Prompt. Open Command Prompt in the folder (type cmd in the address bar of File Explorer) and use the ren command:

ren *.txt *.csv

This renames every .txt file in the folder to .csv. Simple, fast, and effective.

Method 2: PowerShell. For more complex operations, PowerShell gives you greater control:

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

Method 3: Third-party tools. Tools like Bulk Rename Utility or Advanced Renamer offer graphical interfaces for batch operations. I've used both—they're reliable, but always download from official sources. Freeware sites can be a minefield of bundled adware.


How to Rename File Extension on Mac (macOS)

Mac users have it slightly easier in one respect: Finder makes extensions visible with a single checkbox. But there's a quirk that trips up newcomers.

Step 1: Display File Extensions in Finder

Open Finder, then press Cmd + , (that's Command + Comma) to open Preferences. Click the Advanced tab and check Show all filename extensions.

That's it. Every file in Finder will now show its extension.

Step 2: Rename the Extension in Finder

Right-click the file and select Rename. Finder will highlight the filename—but here's the catch: it might only highlight the name part, not the extension.

If the extension is visible, just edit it directly. If it's not, or if you're having trouble selecting it, use Get Info instead:

  1. Right-click the file and select Get Info (or press Cmd + I).
  2. In the Name & Extension field, edit the extension.
  3. Click Rename to confirm.

One thing I've learned the hard way: if you see a dialog asking whether you want to use the new extension or keep the old one, choose Use .newextension only if you're sure about the format match.

Using Terminal to Change File Extensions on Mac

For power users, Terminal is the fastest route. Open it via Finder > Utilities > Terminal.

Single file rename:

mv oldname.txt newname.csv

Batch rename with a loop:

for f in *.txt; do mv "$f" "${f%.txt}.csv"; done

This loops through every .txt file and renames it to .csv. The ${f%.txt} syntax strips the old extension, and we append the new one.

A word of caution: Terminal commands execute immediately with no undo button. I once ran a batch command with a typo and renamed 200 files incorrectly. Always test on a single file first.


How to Change File Extension on Mobile (iPhone & Android)

Mobile operating systems hide extensions more aggressively than desktop ones. But it's still doable.

On iPhone (iOS) Using the Files App

Apple's Files app lets you rename files, including their extensions:

  1. Open the Files app and locate your file.
  2. Tap and hold the file until the context menu appears.
  3. Select Rename.
  4. Edit the extension part after the dot.
  5. Tap Done.

The Files app will warn you if you're changing the extension. Pay attention to that warning—iOS is stricter about format mismatches than desktop systems.

On Android Using a File Manager App

Stock Android's file manager often hides extensions. You'll need a third-party file manager for full control. I recommend CX File Explorer or Solid Explorer—both are reliable and widely used.

  1. Open your file manager and navigate to the file.
  2. Long-press the file and select Rename.
  3. Change the extension and confirm.

If you can't see extensions, check the app's settings for an option like Show file extensions or Show hidden files. It's usually tucked away in Display or Advanced settings.

On Chromebook (ChromeOS)

Chromebooks handle this surprisingly well:

  1. Open the Files app.
  2. Right-click the file and select Rename.
  3. Change the extension and press Enter.

If extensions are hidden, click the three-dot menu in the Files app and select Show file extensions. ChromeOS keeps things simple, which is refreshing.


How to Change File Extension Without Corrupting the File

Here's the part that separates safe users from those who lose data.

The Golden Rule: Renaming ≠ Converting

I cannot stress this enough: renaming a file does not change its format. It only changes the label.

Let me give you a concrete example. If you rename report.docx to report.pdf, you haven't created a PDF. You've created a file with a .pdf extension that still contains Word document data. When someone tries to open it in a PDF reader, it will fail—or worse, display gibberish.

The reverse is equally problematic. Renaming photo.jpg to photo.png doesn't add transparency support. The file is still a JPEG.

Best Practices to Avoid File Corruption

Over the years, I've developed a checklist that has saved me—and my clients—countless headaches:

  • Always back up the original file. Copy it to another folder or rename it with a .bak extension before making changes.
  • Only change the extension if you're certain the format matches. If you're not sure, use a file identification tool like file on Mac/Linux or TrID on Windows.
  • Use "Save As" or "Export" for true conversion. If you need a .pdf, open the document in Word and use File > Save As > PDF. That's real conversion.
  • Revert immediately if the file won't open. Don't keep trying different extensions hoping one will work. That's a recipe for data loss.

Troubleshooting: Why Can't I Change File Extension?

Sometimes the rename option is there, but things don't go as planned. Here are the most common issues I've encountered.

File Extensions Are Hidden

This is the #1 reason people can't change extensions. They simply can't see them.

PlatformHow to Show Extensions
Windows 10/11File Explorer > View > Show > File name extensions
MacFinder > Preferences > Advanced > Show all filename extensions
iPhoneFiles app > Settings > Show All Extensions
AndroidFile manager settings > Show file extensions
ChromebookFiles app > Three-dot menu > Show file extensions

The File Is in Use or Protected

If a program has the file open, Windows and Mac will refuse to rename it. Close the application first.

On Windows, check if the file is marked Read-only. Right-click > Properties > uncheck Read-only.

On Mac, use Get Info (Cmd + I) and check the Sharing & Permissions section at the bottom. Make sure your user account has Read & Write access.

The 'Rename' Option Is Grayed Out

This usually means you're dealing with a system file or a file in a protected folder. Don't force it.

Try copying the file to your Desktop or another user folder first. If it's a system file—like something in C:\Windows or /System—leave it alone. Forcing a rename on system files can break your operating system. I've seen it happen, and it's not pretty.


FAQ

How do I change the .txt extension to .csv?

On Windows, show file extensions in File Explorer, right-click the file, select Rename, and change .txt to .csv. On Mac, enable "Show all filename extensions" in Finder Preferences, then rename the file. This is safe only if the file actually contains comma-separated data. If it's plain text with no commas, renaming it won't make it a functional CSV file.

Is it safe to change a file extension?

Renaming is safe only if the file format matches the new extension. For example, renaming a .txt file to .csv is safe if the content is comma-delimited. But renaming a .docx to .pdf will corrupt the file's usability. For true format conversion, always use "Save As" or "Export" in the original application.

Why can't I see file extensions on my computer?

Windows and Mac hide extensions by default to keep filenames clean. On Windows, open File Explorer > View > Show > File name extensions. On Mac, go to Finder > Preferences > Advanced > Show all filename extensions. On mobile, check your file manager's settings for a similar option.

How do I change multiple file extensions at once?

On Windows, use Command Prompt with the ren command: ren *.txt *.csv. On Mac, use Terminal with a loop: for f in *.txt; do mv "$f" "${f%.txt}.csv"; done. For a graphical approach, third-party tools like Bulk Rename Utility (Windows) or Name Mangler (Mac) work well.


Final Thoughts

Changing a file extension is one of those tasks that seems trivial—until it isn't. The steps are simple across Windows, Mac, and mobile devices, but the golden rule remains: renaming is not converting.

Always back up your files before making changes. If you're unsure whether a rename is safe, test it on a copy first. And if you need a true format conversion, use the application that created the file—its "Save As" or "Export" function is the only reliable way.

Found this guide helpful? Bookmark it for later, and if you're looking for a powerful tool to batch-rename files, check out our recommended software list below. Have a question? Drop it in the comments—we're here to help!

← Back to Home