Skip to content
UniKit

Batch file renamer

Compute new names for a whole list of files with literal or regex find-and-replace, letter case, numbering and a shared prefix or suffix. Extensions are preserved, blank lines ignored, and colliding or illegal names are flagged line by line. Everything runs locally and never writes to disk.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

One file name per line — paste a list copied from your file manager or the output of ls. Blank lines and surrounding whitespace are ignored.

Rename rules

New file names

Computed with the rules below, one name per line, ready to copy and rename yourself.

Enter file names to see the rename preview

Files: 0 · To rename: 0 · Unchanged: 0 · Invalid: 0 · Conflicts: 0

What this tool does

  • Turn a folder of camera exports such as IMG_2032.JPG into tidy numbered names, one per line, ready to copy and rename yourself.
  • Clean up a download folder: strip the site suffixes inside file names and normalise them to lower or upper case in one pass.
  • Sanity-check a batch before renaming: see at a glance which lines would collide and which names contain characters Windows rejects.

Example

Input

IMG_2032.JPG
IMG_2033.JPG
IMG_2034.JPG

Output

01_img_2032.jpg
02_img_2033.jpg
03_img_2034.jpg

Rules used above: letter case = lowercase, numbering = before the name, padding = 2. Rules are applied in this order: find and replace → letter case → split extension → numbering → shared prefix and suffix.

Frequently asked questions

Does it actually rename files on my computer?

No. A web page cannot rewrite file names on disk, so this tool only computes the target names and shows a line-by-line preview. Copy the new names and rename with your file manager or a shell command such as mv or rename. Paste the name list copied from your file manager, or the output of ls.

How are extensions treated?

The extension is kept by default: prefix, suffix and numbering go before it, and only the final dot counts — archive.tar.gz has the extension .gz, dotfiles like .gitignore count as having none, so does README. Turn "Keep extension" off to run the rules over the whole name.

When is a line flagged as invalid or as a conflict?

A name containing any of \ / : * ? " < > |, an empty result, nothing but dots, or more than 255 characters is flagged invalid. Two files in the same batch mapping to one target are flagged as a duplicate target (comparison is case-sensitive). Flags only mark problem lines; the rest of the batch still computes.

What should I know about the regex option?

With "Treat Find as a regular expression" enabled the pattern uses JavaScript syntax, is always global, and supports $1 back-references; a broken pattern reports an error immediately. With it disabled the search is literal, so $& and friends are not treated as replacement patterns. The numbering step may be negative, padding accepts 0–12 digits, and the number separator defaults to an underscore.

Can I leave a line untouched?

Yes: drop that line before pasting, or use a find pattern that only matches the intended rows. Rows the rules did not change are reported separately as unchanged, so it is easy to verify nothing was missed.

Keywords:batch file renamerrename filesrename

Related tools