Fix OneDrive for Mac Rejecting Valid File Names
Question details
Users experience synchronization failures in OneDrive for Mac where files with seemingly valid names are rejected, marked with a red X, and fail to upload.

- Product
- OneDrive
- Device & OS
- macOS
- Scenario
- Synchronizing local Mac files or migrating a large batch of documents to OneDrive cloud storage.
- Observed behavior
- Files fail to synchronize and display a red X error icon in Finder, despite the file names appearing to be perfectly normal to the user.
Ensure you can successfully log into your OneDrive account via a private or incognito web browser window to rule out any underlying account access issues before modifying local app files.
Remove Trailing Spaces and Invalid Characters
Identify and correct hidden naming violations, such as trailing spaces, which are a common cause of OneDrive sync failures on macOS.
macOS allows certain file naming conventions that are strictly prohibited by Microsoft OneDrive. Even if a file name looks valid at first glance, a hidden space at the very end of the file name (before the extension) will trigger a synchronization block.
Open Finder and navigate to your local OneDrive folder. Look for any files or folders marked with a red X synchronization error icon.
Click on the problematic file once to select it, then press the 'Return' key on your keyboard to make the file name editable.
Place your cursor at the very end of the file name. If there is a trailing space, delete it. Also, ensure the name contains no restricted characters like slashes, asterisks, or question marks.
Press the 'Return' key again to save the new file name. Allow a few moments for OneDrive to detect the change and attempt synchronization again.

Run the OneDrive Reset Command
Resetting the OneDrive application clears local cache and application settings, forcing a fresh synchronization state without losing your personal files.
Use Migration Tools for Large Transfers
For bulk migrations, use dedicated upload tools that can bypass certain local client limitations before syncing back to the Mac.
Switch to WPS Office for Seamless Document Management on Mac
Tired of dealing with complicated sync errors and strict file naming limits? WPS Office provides a lightweight, highly compatible alternative for Mac users. Enjoy built-in cloud storage (WPS Cloud) alongside full compatibility with all your existing Microsoft Office files.

Frequently Asked Questions
Why does OneDrive for Mac show a red X on my files?
A red X indicates a synchronization error. This usually happens when the file name violates OneDrive's restrictions, such as containing hidden trailing spaces, leading spaces, or unsupported characters like slashes, asterisks, and question marks.
Will resetting OneDrive on Mac delete my local files?
No, resetting the OneDrive app on your Mac using the ResetOneDriveApp command only clears the app's settings and internal sync cache. Your local files and cloud data will remain completely intact, though you will need to log in and reconfigure your sync preferences.
What specific characters are restricted in OneDrive file names?
OneDrive does not allow file names to contain characters such as " * : < > ? / \ |. Additionally, file and folder names cannot end with a period or a space.
How do I best handle large file migrations to OneDrive on Mac?
For migrating a massive number of files, it is recommended to use dedicated cloud migration tools like the Mover app or the SharePoint Migration Tool. These tools handle bulk uploads much more efficiently than directly dragging large folders into the local Mac OneDrive sync directory.




