The fastest way to rename a file on Mac

To rename a file on your Mac, click it once to select it, then press the Enter key. The filename will highlight and become editable — type the new name and press Enter again. That's the complete process for most files.

This works in Finder (the file browser that opens when you click the Finder icon in your dock) and on your desktop. The method is the same whether you're renaming a document, photo, folder, or any other file type.

If pressing Enter doesn't work, your file may be locked or you may not have permission to rename it. The sections below cover those situations and other common problems.

Key Takeaways

  • Select a file with one click, press Enter, type the new name, and press Enter again to rename it.
  • You can rename multiple files at once by selecting them all, right-clicking, and choosing "Rename Items".
  • If a file won't rename, check whether it's locked by right-clicking it, selecting "Get Info", and looking for a lock icon next to the filename.
  • Renaming a file does not change what program opens it — the file type (like .jpg or .pdf) stays the same unless you deliberately change the extension.
  • You can undo a rename by pressing Command+Z immediately after, before you do anything else.

Renaming a single file step by step

Open Finder by clicking the Finder icon in your dock (it looks like a blue and white face). Navigate to the folder containing the file you want to rename, or look on your desktop if the file is there.

Click the file once to select it. You should see it highlight in blue. Now press the Enter key on your keyboard. The filename will turn into an editable text box with the name highlighted in blue.

Type the new name. As you type, the old name disappears. You can include spaces and most punctuation marks, but avoid forward slashes (/) and colons (:) — Mac will not allow these in filenames. When you're done typing, press Enter to confirm the new name.

The file is now renamed. If you made a mistake, press Command+Z immediately to undo the rename and go back to the original name.

Renaming multiple files at the same time

If you need to rename several files with a similar pattern — for example, changing "Photo 1", "Photo 2", "Photo 3" to "Vacation 1", "Vacation 2", "Vacation 3" — Mac has a built-in tool for this.

In Finder, select all the files you want to rename by clicking the first one, then holding Shift and clicking the last one. All files in between will select automatically. If the files aren't next to each other, hold Command and click each file individually.

Right-click one of the selected files and choose "Rename Items" from the menu. A dialog box will open. Choose how you want to rename them: you can replace text, add text before or after the current name, or change the file format number. Type what you want to change and what you want to change it to, then click "Rename".

All selected files will rename at once using the pattern you set. This is much faster than renaming files one at a time when you have many to change.

What to do if a file won't rename

If you select a file and press Enter but nothing happens, the file is likely locked. A locked file cannot be changed or deleted without unlocking it first.

Right-click the file and select "Get Info". A window will open showing details about the file. Look at the bottom of this window for a checkbox that says "Locked". If it's checked, click it to uncheck it. Close the Get Info window and try renaming the file again.

Another reason a file won't rename is that you don't have permission to change it. This usually happens with files in system folders or files owned by another user account on your Mac. If you're not the owner, you'll need to ask the person who is, or you'll need to move the file to a folder where you have full control.

If you're trying to rename a file that's currently open in another program, close that program first. Some applications lock files while they're in use to prevent corruption.

Understanding file extensions and renaming

Every file on your Mac has a file extension — a short code at the end of the filename after a period. For example, a photo might be "vacation.jpg" and a Word document might be "letter.docx". The extension tells your Mac which program should open the file.

When you rename a file using the method above, the extension usually stays hidden and doesn't change. You can type just the name part ("vacation" or "letter") and Mac keeps the extension (.jpg or .docx) automatically. This is the safest approach for most people.

If you need to change the extension itself — for example, to convert a file type — you can do that, but it requires extra steps. Right-click the file, select "Get Info", and look for a checkbox that says "Hide extension". Uncheck it. Now when you rename the file, you'll see the full name including the extension. You can change the extension, but be aware that changing it doesn't actually convert the file to a different format — it just changes what program tries to open it. This can cause problems if you're not careful.

Renaming files in iCloud Drive and cloud folders

If your file is stored in iCloud Drive, Google Drive, Dropbox, or another cloud service, the renaming process is the same: select the file, press Enter, type the new name, and press Enter again. The change syncs to the cloud automatically.

However, if you're working offline or if your internet connection is slow, the rename might take a few seconds to sync. You'll see a small cloud icon next to the filename while it's syncing. Don't rename the file again or move it until the sync is complete, or you may create duplicate versions.

If you rename a file that's shared with other people, they'll see the new name the next time they refresh their view. The file itself doesn't change — only the name does — so any links or shortcuts to that file will still work.

Undoing a rename and recovering the original name

If you rename a file and immediately realize you made a mistake, press Command+Z to undo. This works only if you haven't done anything else since the rename — as soon as you perform another action, the undo option disappears.

If you've already done other things and can't undo, you'll need to rename the file back manually. If you can't remember the original name, check the Trash to see if an older version is there, or look through your file history if you use Time Machine backups.

To check Time Machine, click the Time Machine icon in your menu bar (top right of your screen) and select "Enter Time Machine". Navigate backward through your files to find a point when the file had its original name. Click the file and select "Restore" to bring back that version.

Frequently Asked Questions

Can I rename a file while it's open in an application?

Not while it's actively being edited. Close the file in the application first, then rename it in Finder. If you try to rename a file that's open, Mac will either prevent the rename or the application may not recognize the new name when you try to save changes.

What characters can't I use in a Mac filename?

Avoid forward slashes (/) and colons (:) — Mac treats these as special characters and won't allow them in filenames. Periods, hyphens, underscores, and spaces are all fine. If you try to use a forbidden character, Mac will show an error message.

Does renaming a file change what program opens it?

No, as long as you don't change the file extension. The extension (.jpg, .pdf, .docx, etc.) is what tells Mac which program to use. Renaming "vacation.jpg" to "beach.jpg" doesn't change anything — it still opens in Photos or your default image viewer.

Can I rename files on my Mac using Siri?

Siri doesn't have a built-in command to rename files. You'll need to use Finder and the Enter key method described above. This is faster anyway for most people.

What happens if I rename a file to a name that already exists?

Mac will show a warning asking whether you want to replace the existing file or keep both. Choose "Keep Both" if you want to preserve the original file — Mac will add a number to one of the names to make them different.