File

Batch Rename Files

Rename many files at once with a rule pipeline: find and replace, insert prefixes and suffixes, trim characters, fix case, add sequential numbers, clean up extensions, and rebuild names from placeholders like {name}, {n}, {date}, and {parent}. Every change shows up in a live before-and-after preview with conflict and invalid-name detection. When your browser supports the File System Access API you can rename files in place; otherwise export a ready-to-run bash, PowerShell, CMD, or Python script.

  • Live before-and-after preview updates as you edit rules. Nothing changes on disk until you run it
  • Direct in-place renaming via the File System Access API in Chromium browsers, with collision-safe two-phase moves
  • Falls back to generated bash, PowerShell, CMD, or Python scripts that work on any platform
  • Stackable, reorderable rule pipeline: replace, insert, remove, case, numbering, and template
  • Placeholders for original name, extension, parent folder, counter, modified date, file size, and random strings
  • Useful for photo batches, web assets, dataset files, downloaded reports, and release folders
  • Detects duplicate targets, illegal characters, reserved names, and empty results before you commit
  • Runs entirely in the browser. Files are never uploaded to a server
tools/Batch Rename

Choose a folder

Pick a folder to rename files in place, then preview and run. Everything stays in your browser.

or drop files here

No rules yet. Add one to start transforming filenames.

Add rule
Choose a folder or files to see the before-and-after preview here.
{name}Current base name; accepts lower, upper, title, camel, snake, and kebab
{name:kebab}Convert the base name to kebab-case for web assets
{ext:lower}Lowercase the extension with dot, for example .JPG becomes .jpg
{parent}Parent folder name
{n:3}Counter padded to 3 digits, such as 001
{date:YYYYMMDD_HHmmss}Modified date and time; supports YYYY, YY, MM, DD, HH, mm, and ss
{size:mb}File size; use bytes, kb, mb, gb, or omit the mode for automatic units
{rand:8}Custom 8-character random string; default is 6 characters

Overview

A focused flow: import files, stack rename rules, preview before and after, then rename in place or export a script.

  1. 01

    Rule pipeline

    Stack find-and-replace, insert, remove, case, numbering, and template rules. Reorder and toggle each one independently.

  2. 02

    Placeholder templates

    Rebuild names from {name}, {ext}, {n}, {date}, {parent}, and {rand} for fully structured naming schemes.

  3. 03

    Live preview

    Every filename shows its before and after side by side, recomputed instantly as you edit rules.

  4. 04

    Conflict detection

    Duplicate targets, illegal characters, reserved names, and empty results are flagged before anything is applied.

  5. 05

    In-place renaming

    In Chromium browsers, rename files directly on disk with the File System Access API using collision-safe two-phase moves.

  6. 06

    Script export

    Generate bash, PowerShell, CMD, or Python scripts so you can review and run renames in any terminal on any OS.

  7. 07

    Runs locally

    Parsing, preview, and renaming all happen in the browser. Files are never sent to a server.

How to use

Recommended order: import, build rules, confirm the preview, then rename or export.

  1. 01

    Pick a folder to rename in place, or pick files to generate a script.

  2. 02

    Add rules from the dropdown: find and replace, insert, remove, case, numbering, or template.

  3. 03

    Drag rules into the right order and toggle any of them off to compare results.

  4. 04

    Use placeholders like {name}, {n:3}, and {date} in a template rule to build structured names.

  5. 05

    Check the live preview. Rows with conflicts or invalid names are highlighted in warning colors.

  6. 06

    In Rename mode, click Rename to apply changes on disk. In Script mode, copy or download the generated script.

  7. 07

    For script mode, save the generated file in the target folder, then run it from any terminal location.

Details

Built around batch file renaming, structured naming schemes, and safe preview-before-apply workflows.

  • Stackable rule pipeline with per-rule enable toggles and reordering
  • Find and replace with plain text or regular expressions, including capture groups
  • Insert text as a prefix, suffix, or at a specific character index
  • Remove a range of characters from any position in the name
  • Case conversion: lowercase, UPPERCASE, Title Case, camelCase, snake_case, and kebab-case
  • Sequential numbering with configurable start, step, digit padding, separator, and position
  • Template rule rebuilds the whole name from placeholders
  • Placeholders for original name, extension, parent folder, counter, modified date, file size, and random strings
  • Base names and parent folder names can be converted to lowercase, snake_case, kebab-case, and other naming styles; extensions can be lowercased or uppercased
  • Date placeholder supports YYYY, YY, MM, DD, HH, mm, and ss, with common forms like yyyy-mm-dd and HHMMSS accepted
  • Scope each rule to the base name, the extension, or the full filename
  • Sort files by name, modified date, size, or keep the selected order for numbering
  • Live before-and-after preview with duplicate, illegal-character, reserved-name, and empty-name detection
  • In-place renaming on disk in Chromium browsers via the File System Access API
  • In-place renaming uses collision-safe two-phase moves so chained and cyclic renames do not overwrite each other
  • Script export for bash, PowerShell, CMD, and Python with proper per-shell escaping and self-location
  • Free to use, no signup or install, suitable for individuals and teams

Use cases

Useful for organizing photos and downloads, normalizing project assets, preparing datasets, fixing extensions, and cleaning up messy filenames.

  1. Organize photos

    Rename a camera dump to a consistent scheme like 2024-06-15_trip_001.jpg using date and counter placeholders.

  2. Normalize web assets

    Lowercase and kebab-case image and icon filenames so they match URL and build-system conventions.

  3. Prepare datasets

    Add zero-padded sequence numbers and consistent prefixes so files sort and load in a predictable order.

  4. Fix extensions and casing

    Scope a rule to the extension or full filename to normalise .jpeg, .JPG, .PNG, and mixed-case asset names before delivery.

  5. Clean up downloads

    Strip tracking suffixes, version tags, and duplicate markers with find-and-replace and remove rules.

  6. Standardize documents

    Apply a {date}_{parent}_{n} template so exported reports and invoices carry a traceable, sortable name.

  7. Prepare release folders

    Add a product code, locale, or version prefix to every file in a folder before handing assets to a client or build pipeline.

  8. Audit before applying

    Generate a script, review every line, and run it in a terminal when you want a record of exactly what changed.

See also

When the files are images headed for publication, strip their metadata first with EXIF Remover so location and device details do not travel with them. For turning titles into clean, URL-safe name fragments, the Slug Generator pairs well with a template rule here.

Best practices

Batch renaming is fast but hard to undo. A little care keeps it safe and repeatable.

  • Always read the preview before renaming. Confirm the after column is exactly what you expect.
  • Keep a backup of important files before an in-place rename, since the operation is not automatically reversible.
  • Prefer zero-padded numbers (001, 002) so files sort correctly in every file manager.
  • Scope rules to the base name so you do not accidentally change or drop file extensions.
  • When renames may chain or form a cycle, use direct in-place renaming in a Chromium browser, because that path uses two-phase moves. Generated scripts stay simpler and easier to audit.
  • Use script mode when you need an auditable record of the change or want to run it on a server.

Limitations

Browser file access and OS naming rules shape what this tool can and cannot do.

  • In-place renaming needs a Chromium browser with File System Access API support. Other browsers fall back to script export.
  • Only files in the chosen folder are loaded. Subfolders are not traversed recursively.
  • Some operating systems treat filenames case-insensitively, so renaming only the case may be reported as a conflict.
  • Illegal characters and reserved names are checked against common rules, but the destination filesystem may add its own limits.
  • Date placeholders use the file modified time the browser reports, which is not always the original capture time.
  • Generated scripts use relative filenames because browsers cannot read absolute folder paths. Save the script in the target folder; it switches to its own folder before renaming.
  • Very large folders take longer to load metadata and preview. Process them on a capable device.
  • This tool renames files. It does not move them between folders or edit their contents.

FAQ

Common questions about in-place renaming, script export, placeholders, and safety.

Does this rename files directly on my disk?

Yes, in Chromium browsers that support the File System Access API. Pick a folder, grant write permission, and the Rename button applies changes in place. Other browsers fall back to generating a script.

Are my files uploaded anywhere?

No. Reading filenames, building the preview, and renaming all happen locally in your browser. Nothing is sent to a server.

What kind of script does it generate?

A ready-to-run rename script for bash, PowerShell, CMD, or Python. Each pair of names is escaped for that shell. Because browsers cannot read the absolute folder path, save the script in the target folder; the script changes to its own folder first, so it can be launched from any terminal location.

How do placeholders work?

In a template rule, {name} is the current base name, {ext} the extension, {parent} the folder name, {n} a counter, {date} the modified date, {size} the file size, and {rand} a random string. Base names and parent folders accept lower, snake, kebab, and similar modes; extensions accept lower or upper. Use {n:3} for a zero-padded counter and {date:YYYYMMDD_HHmmss} for formatted dates.

Can I undo a rename?

There is no automatic undo. Keep a backup before applying, or use script mode and keep the script so you can write a reverse script if needed.

Why is a row flagged as a conflict?

Two files would end up with the same name, a new name would collide with an existing unchanged file, the name has illegal characters, it is a reserved system name, or it is empty. Resolve these before renaming.

Does it change file extensions?

Only if a rule is scoped to the extension or the full name. By default rules apply to the base name, so the extension is preserved.

Can it rename files in subfolders?

No. It loads files from the folder you pick but does not recurse into subfolders. Pick each folder you want to process.

How does numbering decide the order?

The Order control sorts files by name, modified date, or size before numbering. Choose Selected order to keep the order the files were loaded in.

Will renaming only the case work on Windows or macOS?

Those filesystems are usually case-insensitive, so a case-only change can be reported as a conflict. Rename to a temporary name first if needed, or apply the change with a script that handles it.

Is regex supported in find and replace?

Yes. Enable the Regex toggle to use a regular expression with capture groups like $1 in the replacement.

Can I combine multiple rules?

Yes. Rules run top to bottom, so order matters. For example, replace text first, then add a sequence number, then change case.

Related tools

Pair batch renaming with EXIF cleanup and slug generation to build a complete file-prep flow.