File Names

File Name Cleaner

Clean up unsuitable filename characters while preserving Unicode letters and accents, and preview the original and cleaned names.

All files are processed only in your browser and are never uploaded to a server.

About this tool

Turn one filename or a list of names into names that are easier to save and share. Choose a replacement character, preserve extensions by default, and handle common Windows reserved names.

How to use

  1. Enter one filename to clean per line.
  2. Choose a replacement character and whether to preserve extensions.
  3. Review the cleaned names and any warnings, then copy or download the filename list.

Features

  • Trims surrounding whitespace, collapses repeated spaces, and handles control characters.
  • Replaces common invalid characters such as < > : " / \ | ? *.
  • Handles trailing spaces and periods, plus reserved names such as CON, PRN, AUX, NUL, COM1–COM9, and LPT1–LPT9.
  • Preserves extensions and Unicode characters, including accented and non-Latin letters, by default.

Filename rules

  • Replace unsuitable characters with a hyphen, underscore, or space, or remove them.
  • Reserved names receive a safe prefix. For example, CON.txt can become _CON.txt.
  • Names are not automatically transliterated, and non-ASCII characters are not removed by default.
  • Filename restrictions vary by system. Check the cleaned names on the device where you plan to use them.

Limits

  • This page processes filename text without changing files on disk. Use the Batch File Renamer to download files with new names.
  • Empty, conflicting, or overly long names need adjustment. Compatibility with every file system is not guaranteed.

Privacy

All files are processed only in your browser and are never uploaded to a server.

File names, entered text, and results are processed only in your current browser. Your input is not saved automatically. Download any results you want to keep before clearing the tool or leaving the page.

FAQ

Which characters are not allowed in Windows filenames?

Common restricted characters include < > : " / \ | ? *. Control characters, trailing periods or spaces, and reserved names such as CON also need attention.

Can I keep accented and non-Latin filenames?

Yes. Unicode characters are preserved by default. The tool only cleans unsuitable characters and whitespace.

Does cleaning a filename change the file's contents?

No. This page only processes filename text. It does not read or re-encode file contents.

Will my original files be renamed?

No. This page produces a list of new names. Use the Batch File Renamer if you need downloadable copies of the files.

Back to Developer Tools