Use Batch File Renamer

Enter your data below to use the Batch File Renamer

📌 Try these examples:
RESULT

Last updated

Batch File Renaming Strategies

Batch file renaming applies a consistent transformation to multiple filenames at once. Common operations include adding prefixes/suffixes, replacing text, changing case, adding sequential numbers, and changing file extensions. This is essential for organizing photo libraries, normalizing asset names, and preparing files for upload to systems with naming conventions.

Renaming Patterns

OperationBeforeAfter
Add prefixphoto.jpg2026_photo.jpg
Add sequenceimg.jpgimg_001.jpg
Replace textIMG_1234.jpgvacation_1234.jpg
LowercaseMyFile.TXTmyfile.txt
Remove spacesmy file.pdfmy_file.pdf
Change extensionimage.jpegimage.jpg

Batch Rename with Node.js

JavaScript
import { readdir, rename } from 'fs/promises';
import path from 'path';

async function batchRename(dir, transform) {
  const files = await readdir(dir);
  let count = 0;
  for (const [i, file] of files.entries()) {
    const newName = transform(file, i);
    if (newName !== file) {
      await rename(
        path.join(dir, file),
        path.join(dir, newName)
      );
      console.log(`${file} → ${newName}`);
      count++;
    }
  }
  console.log(`Renamed ${count} files`);
}

// Add sequential prefix
batchRename('./photos', (name, i) =>
  `${String(i+1).padStart(3,'0')}_${name}`
);

// Replace spaces with underscores, lowercase
batchRename('./docs', name =>
  name.toLowerCase().replace(/\s+/g, '_')
);

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.