Batch File Renamer

Rename many files at once with find and replace (regular expressions too), numbering, date prefixes, case changes and new extensions. Preview every new name, then download renamed copies as a ZIP or a script that renames the originals in place.

Tool Media & Files Updated Oct 16, 2026
How to Use
  1. Drop the files or a whole folder on the box, or use choose a folder. Sub-folders are kept as they are.
  2. Set the rules you need: find and replace, a new name, case, a number, the date modified, a prefix or suffix, and the extension. The table shows every new name as you type.
  3. Choose the Order the numbers follow: as listed, by name (2 before 10) or by date modified.
  4. Check the warnings: names already taken get “ (2)” added, and characters Windows forbids are replaced with “_”.
  5. Download the renamed copies as a ZIP, or the PowerShell (Windows) or bash (macOS, Linux) script and run it in the folder to rename the originals where they are.
Input
Drop files or a folder, or
Only the names are used; nothing is uploaded
No files yet.
blank = keep
before the extension
Presets
Old Names and New Names
Files
—
Renamed
—
Duplicates fixed
—
Unchanged
—

Worked Example

Camera files by date. IMG_4321.JPG and IMG_4322.JPG were last saved on 11 July 2026 and VID_0007.MP4 on 14 July. With the date-modified prefix and lower-case extensions they become 2026-07-11_IMG_4321.jpg, 2026-07-11_IMG_4322.jpg and 2026-07-14_VID_0007.mp4. Year-month-day order matters: names sorted alphabetically are then sorted by date too.

A numbered set. DSC00017, DSC00002, DSC00110 and DSC00009 sorted by name (by the value of their numbers) give the order 00002, 00009, 00017, 00110. With the new name “vacation-2026”, numbering after the name from 1 in steps of 1, three digits and “-” as the joiner, they become vacation-2026-001.jpg to vacation-2026-004.jpg; file k gets 1 + (k − 1) × 1.

The common mistake: two files ending up with one name. Removing “ (1)” and “ - Copy” from report.pdf, report (1).pdf and report - Copy.pdf would make all three report.pdf, and a careless rename overwrites two of them. Here the second becomes report (2).pdf and the third report (3).pdf, flagged in orange, and the scripts never rename onto an existing file. Names are compared without regard to case, because Windows and macOS treat Report.pdf and report.pdf as the same file.

Show Work

Drop files or press a preset to see every rule applied to the first file, step by step.

The Rules, in Order

1. Find and replace
base.replace(find, replacement)
On the name without its extension; text or a regular expression
2–3. New name, case
base → new name → case
Web-safe case drops accents: “Été” → “ete”
4. Number for file k
nk = start + (k − 1) × step
Padded with zeros to the chosen number of digits
5–7. Date, prefix, extension
prefix + base + suffix + .ext
Date as YYYY-MM-DD, from the file’s last-modified time
8. Clean-up
< > : " / \ | ? * → _
Trailing dots and spaces removed; CON, NUL, COM1… get “_”
9. Duplicates
name taken ⇒ name (2), name (3)…
Compared per folder, ignoring upper and lower case

Background: What a File Name May Contain

Every system has its own rules. Microsoft’s documentation for Windows forbids the characters < > : " / \ | ? * and the control characters, says a name should not end with a space or a period, and reserves the device names CON, PRN, AUX, NUL, COM1 to COM9 and LPT1 to LPT9 — also with an extension, so NUL.txt and NUL.tar.gz both mean the NUL device. Windows also compares names without regard to case. Linux file systems forbid only the slash and the zero byte and macOS is nearly as permissive, which is why a name that is fine on a Mac can fail to copy to a Windows PC or a USB stick.

Two habits make names easier to live with. Dates written year-month-day (the ISO 8601 order, 2026-07-11) sort chronologically even when sorted as plain text, and numbers padded with zeros (001, 002 … 010) keep their order in programs that sort alphabetically, where photo10 would otherwise come before photo2.

About This Tool

This tool works out new names for any number of files from a set of rules and shows each one before anything happens. It makes the names safe for Windows, fixes duplicates instead of overwriting, and explains each rule’s effect on the first file. Because a web page cannot rename files on your disk, it hands you a ZIP of renamed copies, a PowerShell or bash script that renames the originals in two safe steps, and a CSV record of the changes.

Everything runs in your browser and nothing is uploaded; for the scripts and the CSV only the names are used. It suits photographers, anyone tidying downloads or scans, and anyone preparing files for a website or an archive.

Related tools: Text Case Converter, File Splitter and Checksum Calculator.

Frequently Asked Questions

Can a website rename the files on my computer?

No: a web page is not allowed to change files on your disk. So the tool gives you the result in the form you need: a ZIP holding renamed copies, or a PowerShell or bash script that renames the originals when you run it in their folder. A CSV lists every old and new name, which is handy as a record or for undoing.

Is the rename script safe to run?

It only renames the files listed in it, inside the folder where you run it, and never deletes anything. It works in two steps: every file first gets a temporary name, then its new one, so a swap such as a.txt ↔ b.txt cannot overwrite a file. If a new name already exists, that file is left with its temporary name and the script says so. Read it first if you like: it is a plain text file.

How do I number files in the right order?

Pick an Order. “By name” sorts numbers by value, so photo2.jpg comes before photo10.jpg, which a plain alphabetical sort gets wrong. “By date modified” follows when the files were last saved, which for camera files is usually when they were taken. Numbers start where you say, go up by the step you choose and are padded with zeros to the width you set, such as 001.

Which characters can a file name not contain?

On Windows: < > : " / \ | ? * and the control characters, and a name may not end with a space or a dot or be a reserved device name such as CON, PRN, AUX, NUL, COM1 or LPT1 — even with an extension, so NUL.txt is not allowed either. Linux forbids only / and the zero byte, and macOS is almost as relaxed. The tool replaces forbidden characters with “_” so the names work everywhere.

What does the regular-expression option do?

It lets Find match patterns instead of fixed text. For example \s*\(\d+\)$ matches “ (1)”, “ (2)” at the end of a name, and $1 in Replace puts back what the first bracket matched. A pattern runs in a separate worker that is stopped after 1.5 seconds, so a pattern that would take forever cannot freeze the page.

How do I use the Batch File Renamer?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Does it cost anything or need an account?

No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.

Is anything I type uploaded?

No. The tool works entirely on your device, so the values you enter never leave your browser.

Common Use Cases

Camera photos by date

IMG_4321.JPG saved on 11 July 2026 becomes 2026-07-11_IMG_4321.jpg, so photos sort by date in any folder.

Numbered sets

DSC00002, DSC00009, DSC00017 and DSC00110 become vacation-2026-001 to vacation-2026-004 in that order.

Web-safe names

“My Report (Final) v2.PDF” becomes my-report-final-v2.pdf, ready for a website or a URL.

Removing “(1)” copies

Strip “ (1)” and “ - Copy” from downloads; names that would collide get “ (2)” instead of overwriting.

Last updated: