Title: BEA &#8211; Sanitize Filename
Author: BE API
Published: <strong>February 3, 2018</strong>
Last modified: April 7, 2026

---

Search plugins

![](https://ps.w.org/bea-sanitize-filename/assets/banner-772x250.png?rev=1814820)

![](https://ps.w.org/bea-sanitize-filename/assets/icon-256x256.png?rev=1814820)

# BEA – Sanitize Filename

 By [BE API](https://profiles.wordpress.org/beapi/)

[Download](https://downloads.wordpress.org/plugin/bea-sanitize-filename.2.0.10.zip)

 * [Details](https://vec.wordpress.org/plugins/bea-sanitize-filename/#description)
 * [Reviews](https://vec.wordpress.org/plugins/bea-sanitize-filename/#reviews)
 *  [Installation](https://vec.wordpress.org/plugins/bea-sanitize-filename/#installation)
 * [Development](https://vec.wordpress.org/plugins/bea-sanitize-filename/#developers)

 [Support](https://wordpress.org/support/plugin/bea-sanitize-filename/)

## Description

This plugin allows you to sanitize files on upload, which is pretty handy. It means
all punctuation and accents from the filename of uploaded files will be removed.

### Features

 * All accented letters will be converted to same letters without accent
 * Special characters will be deleted
 * Underscores will be replaced by hyphens

### Warning For Mac Owners

On MAC, you can also create an accented character with the combination of ` and 
the wanted letter. This has the effect to create a character with a special filename
system encoding format which is not sanitized. An [issue](https://github.com/BeAPI/bea-sanitize-filename/issues/1)
is already open about this.

### Who ?

Created by [Be API](https://beapi.fr), the French WordPress leader agency since 
2009. Based in Paris, we are more than 30 people and always [hiring](https://beapi.workable.com)
some fun and talented guys. So we will be pleased to work with you.

This plugin is only maintained, which means we do not guarantee some free support.
Consider reporting an [issue](https://github.com/BeAPI/bea-sanitize-filename/issues)
and be patient.

To facilitate the process of submitting an issue and quicker answer, we only use
Github, so don’t use WP.Org support, it will not be considered.

## Installation

#### Requirements

#### WordPress

 * Download and install using the built-in WordPress plugin installer.
 * Site activate in the “Plugins” area of the admin.
 * Nothing more, this plugin is ready to use !

## FAQ

### Will this plugin affect existing files ?

No.

Only after plugin activation, while a file is uploaded to the library. However, 
inf the future a tool will be available to sanitize old files.

### Can I use into a multisite ?

Yes.

You just need to activate on each site.

## Reviews

![](https://secure.gravatar.com/avatar/f53c62c259c69e161c0b489418464ba5b985a4d07a80739acf43a3b1bce6acfe?
s=60&d=retro&r=g)

### 󠀁[Works Fine](https://wordpress.org/support/topic/works-fine-981/)󠁿

 [Olivier GBLEM](https://profiles.wordpress.org/keographix/) February 17, 2019

A very good plugin. Thanks

![](https://secure.gravatar.com/avatar/fcb0b0a6e64dd735ed08eb979f16fd1d8c981a41e7f9818638749b070b6a363e?
s=60&d=retro&r=g)

### 󠀁[Tip top !](https://wordpress.org/support/topic/tip-top-4/)󠁿

 [GregRuelle](https://profiles.wordpress.org/selfemedia/) February 7, 2018 1 reply

Il est intégré à tous mes projets depuis plusieurs mois, content qu'il soit maintenant
sur le repo officiel !

![](https://secure.gravatar.com/avatar/2fced0f4a0ada3a144ce6fb13158b9e7fb867551f21b20d83c9be1bc55d30fd6?
s=60&d=retro&r=g)

### 󠀁[essential](https://wordpress.org/support/topic/essential-190/)󠁿

 [madvic](https://profiles.wordpress.org/madvic/) February 7, 2018 1 reply

This script is missing from the core

![](https://secure.gravatar.com/avatar/989824b0e7508599671c7f979acc5f858c1a8313c0ae0e6a11a5d26bb3639805?
s=60&d=retro&r=g)

### 󠀁[An absolutely must have](https://wordpress.org/support/topic/an-absolutely-must-have/)󠁿

 [Cyrille Sanson](https://profiles.wordpress.org/css31/) February 6, 2018 1 reply

Hi, This plugin is an absolutely must have. It will correct at the upload each file
name that are not respecting good practices. I don't understand why it's not a part
of WordPress. Good job guys!

 [ Read all 4 reviews ](https://wordpress.org/support/plugin/bea-sanitize-filename/reviews/)

## Contributors & Developers

“BEA – Sanitize Filename” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ BE API ](https://profiles.wordpress.org/beapi/)
 *   [ Maxime Culea ](https://profiles.wordpress.org/maximeculea/)
 *   [ Amaury Balmer ](https://profiles.wordpress.org/momo360modena/)

[Translate “BEA – Sanitize Filename” into your language.](https://translate.wordpress.org/projects/wp-plugins/bea-sanitize-filename)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/bea-sanitize-filename/),
check out the [SVN repository](https://plugins.svn.wordpress.org/bea-sanitize-filename/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/bea-sanitize-filename/)
by [RSS](https://plugins.trac.wordpress.org/log/bea-sanitize-filename/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.0.10 – 07 Apr 2026

 * Improve `sanitize_file_name` handling so only the real file suffix is transformed(
   avoid stripping when an extension-like segment appears earlier in the name)
 * Expand PHPUnit coverage with data providers and upload-style filename cases
 * Tidy `sanitize_file_name_chars` flow and align PHPCS with PHP 8.0; refine Composer/
   npm test scripts

#### 2.0.9 – 02 Apr 2026

 * Fix invalid smart quotes in special characters list
 * Migrate tests to `wp-env` with PHPUnit unit tests only
 * Improve testing documentation and scripts

#### 2.0.8 – 02 Apr 2026

 * Add `@` character to the sanitized characters list

#### 2.0.7 – 20 Sept 2022

 * Non Latin characters in filename are handled

#### 2.0.6 – 05 Oct 2018

 * #8 : Add More accentuated characters

#### 2.0.5 – 12 Feb 2018

 * i18n

#### 2.0.0 – 02 Feb 2018

 * Go to WP

#### 1.0.4 – 19 Dec 2017

 * Branding refactor

#### 1.0.3 – 19 Dec 2017

 * Fix some PHP notices

#### 1.0.2 – 08 Sept 2017

 * Update `sanitize_file_name_chars` list

#### 1.0.1 – 05 Aug 2017

 * Add readme
 * Replace underscore by hyphen
 * Only lowercase

#### 1.0.0 – 27 Nov 2015

 * Initial

## Meta

 *  Version **2.0.10**
 *  Last updated **6 months ago**
 *  Active installations **1.000+**
 *  WordPress version ** 4.0 or higher **
 *  Tested up to **7.0.7**
 *  PHP version ** 8.0 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/bea-sanitize-filename/)
 * Tags
 * [media](https://vec.wordpress.org/plugins/tags/media/)[sanitize](https://vec.wordpress.org/plugins/tags/sanitize/)
   [uploads](https://vec.wordpress.org/plugins/tags/uploads/)
 *  [Advanced View](https://vec.wordpress.org/plugins/bea-sanitize-filename/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/bea-sanitize-filename/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/bea-sanitize-filename/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/bea-sanitize-filename/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/bea-sanitize-filename/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/bea-sanitize-filename/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/bea-sanitize-filename/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/bea-sanitize-filename/reviews/)

## Contributors

 *   [ BE API ](https://profiles.wordpress.org/beapi/)
 *   [ Maxime Culea ](https://profiles.wordpress.org/maximeculea/)
 *   [ Amaury Balmer ](https://profiles.wordpress.org/momo360modena/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/bea-sanitize-filename/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://paypal.me/BeAPI)