Batch file renamer

Use text replacement, prefixes and custom numbering; preview conflicts and download a ZIP.

  • Runs locally
  • Free

Use the tool

Your files are processed in your browser and are not uploaded to a server.

About this tool

Batch rename files with {name}, {ext} and {index} templates, prefixes, suffixes and custom numbering, plus text replacement and case changes. Preview old and new names and conflicts, then download a ZIP. Originals are untouched.

Typical uses

  • Rename camera photos to “Event_001.jpg”
  • Remove a fixed prefix from many file names
  • Number scans in natural order

How to use

  1. Add files; configure a {name}/{ext}/{index} template, sequence start, step and padding. Optionally replace text, add prefixes/suffixes or change case.

  2. Sort naturally or drag to reorder. Review old/new names and collisions, then create the ZIP. Export a filename mapping CSV and save naming-rule presets.

Good to know

Up to 100 files / 100 MB; creates a ZIP of copies without changing originals. Replacement is literal and case-sensitive, with extensions retained by default. Case-insensitive or Unicode-normalized collisions are blocked unless automatic numbering is chosen. Filename compatibility adjustments are visible; names over 240 UTF-8 bytes are rejected. Presets save rule text, never filename lists or file contents.

What the default template {name}-{index}.{ext} does to different names

Untouched, the “Filename template” is {name}-{index}.{ext}, with “Start number” 1, “Number step” 1 and “Number padding” 3. Adding these six files in this order gives the following “New filename” column and notes in the preview:

Original filenameNew filenameNotes
IMG_0001.JPGIMG_0001-001.JPG—
IMG_0002.JPGIMG_0002-002.JPG—
notes.txtnotes-003.txt—
READMEREADME-004—
.bashrc.bashrc-005—
archive.tar.gzarchive.tar-006.gz—
  • The extension is whatever follows the last dot, so {name} for archive.tar.gz is archive.tar and the number lands before .gz.
  • README has no extension, so the dot written right before {ext} is dropped too: the result is README-004, with no stray dot and no note.
  • .bashrc starts with a dot, so the whole name counts as {name} and the extension is empty; the dot before {ext} is dropped the same way. A template that ends in a dot elsewhere (such as {name}.) still has that dot removed, and the row is flagged.
  • Original files are never renamed or modified. The tool puts the same contents under the new names into one ZIP.

Processing order: replace → case → prefix/suffix → template → cleanup

Each name goes through a fixed sequence, and every step works on the part before the extension. Take IMG_0001.JPG with “Find text (basename only)” IMG_, “Replace with” Kyoto_$&_, “Basename case” set to “Lowercase”, “Basename prefix” 2026-, “Basename suffix” _v and template {name}.{ext}. The result is 2026-kyoto_$&_0001_v.JPG.

  • Replacement is plain, case-sensitive text matching, not a regular expression; $& is written literally and does not mean “the matched text”.
  • Case conversion runs after replacement and before the prefix and suffix, so the inserted Kyoto is lowercased too while 2026- and _v are left as typed.
  • The extension always keeps its original form: .JPG is not lowercased, and “Uppercase” turns Café.TXT into CAFÉ.TXT.
  • With “Replace occurrences” set to “First only”, replacing a with X in a-b-a.txt gives X-b-a.txt.
  • The template does not have to contain {name}: photo.jpeg with the template {ext} becomes jpeg. Deleting {ext} removes the extension.
  • Only {name}, {index} and {ext} are recognised. {date}-{name}, or {name without its closing brace, gives “Only {name}, {ext} and {index} tokens are supported. Remove unknown tokens.”.

Numbering and file order

{index} = start number + position × step, padded on the left with zeros to the “Number padding” width. Padding is a minimum and never truncates: starting at 998 with 3 digits, three images get p998.png, p999.png, p1000.png; starting at 0 with step 10 and 2 digits, they get p00.png, p10.png, p20.png.

Numbers follow the list order. “File order” starts as “Import order”. “Natural name ascending” compares digits by value and ignores case, so scan 10.pdf, Scan 2.pdf, scan 1.pdf, scan 02.pdf become scan 1.pdf, Scan 2.pdf, scan 02.pdf, scan 10.pdf (2 and 02 are equal, so their import order decides). With the template scan-{index}.{ext} and 2-digit padding that gives scan-01.pdf, scan-02.pdf, scan-03.pdf, scan-04.pdf. Dragging a row or using ↑ ↓ switches the order to “Manual order” and renumbers.

Collisions and incompatible characters

Collision checks ignore case, matching Windows’ default behaviour (OSCAR, Oscar and oscar are the same name). Renaming x (2).txt, x.txt, X.txt with {name}.{ext} makes x.txt and X.txt collide:

Original filenameWarn and stopAppend (2), (3) automatically
x (2).txtx (2).txt · Unchangedx (2).txt · Unchanged
x.txtx.txt · Name collision; change rules · Unchangedx.txt · Unchanged
X.txtX.txt · Name collision; change rules · UnchangedX (3).txt · Collision resolved by numbering

Automatic numbering reserves every requested name first, so X.txt does not take the existing x (2).txt and becomes X (3).txt instead. The comparison also folds Unicode case, so straße.txt and STRASSE.txt collide too. With “Warn and stop”, both “Create renamed ZIP” and “Download filename mapping CSV” stay disabled until the collision is resolved.

Windows forbids < > : " / \ | ? * and control characters, does not support names ending in a space or a dot, and reserves device names such as CON, PRN, AUX, NUL, COM1–9 and LPT1–9 (including the superscripts ¹²³), even with an extension. The tool cleans names along those rules (template {name}.{ext}; text after · is the replacement or template that row uses instead):

Original filenameNew filenameNotes
report.docx · report → Q3: draft? <v2>Q3_␣draft_␣_v2_.docxAdjusted incompatible characters or reserved name
con.txt_con.txtAdjusted incompatible characters or reserved name
nul_nulAdjusted incompatible characters or reserved name
COM¹.log_COM¹.logAdjusted incompatible characters or reserved name
console.txtconsole.txtUnchanged
notes.txt · ␣{name}.␣notesAdjusted incompatible characters or reserved name
Cafe + U+0301.txtCafé.txtAdjusted incompatible characters or reserved name

The last row is a name in decomposed form (e followed by a combining accent, which looks identical to é). Names are converted to the composed NFC form, so the row is marked “Adjusted incompatible characters or reserved name” even though it looks the same. Names may be at most 240 UTF-8 bytes. A CJK character takes 3 bytes: 78 of them plus a.txt is 239 bytes and passes, 79 is 242 bytes and shows “Name too long (240 UTF-8 bytes max)”.

The ZIP, the mapping file and limits

One batch holds up to 100 files and 100 MB in total. Files are stored in the ZIP without compression (photos and PDFs are already compressed, so recompressing gains little), the ZIP may not exceed 102 MB, and packing that takes longer than 90 seconds is stopped. Every entry in the ZIP is dated 1 January 2000; the original modification times are not kept, so rely on the number in the name if you need chronological order.

“Download filename mapping CSV” downloads rename-list.csv with the columns “Original filename” and “New filename”. It has a UTF-8 BOM, and names starting with = + - or @ get a leading apostrophe so spreadsheet software does not treat them as formulas.

MessageWhen it appears
Check rules: start 0–999999999, step 1–999999, padding 1–12 digits.Start, step or padding is empty or out of range, for example padding set to 13.
Only {name}, {ext} and {index} tokens are supported. Remove unknown tokens.The template has braces around anything other than name, index or ext, or a brace without its partner.
Choose 1–100 files.Adding files would take the total above 100; that batch is not added.
Total file size must not exceed 100 MB.Adding files would take the total above 100 MB; that batch is not added.
The ZIP exceeds the output limit. Use fewer files.The ZIP would pass the 102 MB safety limit. With input capped at 100 MB this should not normally happen.
Packing timed out. Retry with fewer files.Packing did not finish within 90 seconds, most often on a slow device.

Sources

Frequently asked questions

Are my original files changed?

No. The tool creates renamed copies in a ZIP.

What about name collisions?

Collisions, including case-only differences, are detected; choose automatic numbering to resolve them.

Can I export a name mapping?

Yes, as a CSV. Up to 100 files and 100 MB total.