toolfree

Batch rename

Rename every file in a folder from a pattern, in Chrome or Edge. The files never leave your disk, and collisions are caught before anything is written.

Runs in your browser

This tool needs the File System Access API, which only Chromium browsers have — Chrome, Edge, Opera, Arc and Brave on a desktop.Firefox and Safari cannot grant a web page permission to rename files on your disk at all, so there is no fallback to offer. Everything below still explains what the tool does.

Chrome, Edge or another Chromium browser only

This is the one tool here that does not work everywhere, and it is worth being plain about why.

Renaming files on your disk needs the File System Access API, which lets a page ask for write access to a folder you explicitly choose. Only Chromium browsers implement it — Chrome, Edge, Opera, Arc and Brave, on a desktop.

Firefox and Safari have declined to ship it. That is not an oversight to be worked around: there is no other way for a web page to rename a file in place, so there is no fallback and nothing to offer as a substitute. On those browsers the page says so rather than presenting controls that cannot work.

Nothing is uploaded on any browser. The folder you pick is opened directly by the browser, and the files are read and written on your own disk.

Every name is worked out before anything is written

The dangerous failure in a batch rename is two files ending up with the same name. The second one overwrites the first, and the file that was there is gone.

So the whole rename is computed first, as a table, and checked before a single file is touched. If two files would collide, the button does not become available at all — the preview marks the offending rows in red and explains what happened. The same applies to names containing characters a filesystem will not accept.

Collision checking is case-insensitive, because macOS and Windows treat Photo.jpg and photo.jpg as the same file even though the text differs. Checking exact strings would call that pair safe and then destroy one of them.

The pattern

TokenBecomes
{name}The original name, without its extension
{ext}The extension, without the dot
{n}A counter
{n:03}The counter, padded to three digits
{i}Position in the list, always from 1

The extension is kept automatically. A pattern of holiday-{n} turns DSC0042.jpg into holiday-1.jpg — you do not have to remember .{ext}, and forgetting it cannot strip the extension from every file in the folder. Write {ext} yourself only when you want it somewhere other than the end.

Pad your counters. {n} on a folder of 120 files produces 1, 2, … 120, and every file manager sorts 10 before 2. {n:03} produces 001, 002, … 120, which sorts correctly everywhere.

{i} and {n} differ once you change the starting number or the step: {i} is always the position in the list, {n} is the counter you configured.

Find and replace

Find and replace runs on the original name before the pattern is expanded, and only on the part before the extension — so replacing txt cannot change .txt into .doc.

It is a literal search by default. IMG. matches the four characters IMG. and nothing else. Tick regular expression to use a pattern instead, where . means any character and $1 in the replacement refers to the first captured group: find ^IMG_(\d+)$, replace with photo-$1.

What “rename” actually does here

The API has no rename operation, so each file is copied to the new name and the old one deleted. The content is identical, but two things differ from a true rename:

Files are processed in the order your file manager shows them — sorted by name, with numbers compared as numbers — so {n} follows the order you can see.

Try it on a copy first

Not because the preview is unreliable, but because it costs nothing and this is the one tool here that modifies files you already have.