# SharePoint 400 Character Path Limit and Sync Errors

> For the full documentation index, see https://250highstreet.com/llms.txt

> SharePoint allows 400 characters in a path, but Windows and OneDrive sync stop sooner. See the limits in Microsoft's table and how to shorten paths.

As of November 2026, SharePoint and OneDrive in the cloud allow 400 characters for the full path, but Windows File Explorer and desktop Office apps stop at 260. That gap is why a file you can open in the browser may fail on your computer.

## What is the complaint?

A Microsoft Q&A user reported: "We're unable to utilize the 400 character limit for Sharepoint when using the local machine / File Explorer." Microsoft's support page explains why.

## What are the limits?

The full path counts, from the root down to the file name and extension, including separators, spaces and the extension. In a browser, a space becomes %20, and Microsoft says those encoded forms count toward the 400.

| Where | Limit |
|---|---|
| OneDrive and SharePoint in the cloud, Office for the web | 400 characters |
| OneDrive sync on a computer | 520 in total: local path up to 400, plus the OneDrive root folder up to 120 |
| Windows File Explorer | 260 characters |
| Office desktop apps on Windows (Word, PowerPoint, Excel) | 256 characters, which Microsoft also gives as 260 UTF-16 units |
| A single file or folder name in File Explorer or Finder | 255 characters |
| macOS Office desktop apps | 1,024 UTF-8 bytes, so accented or CJK characters reach it sooner |
| macOS Finder | 1,024 characters |
| Windows with long paths turned on | 32,767 characters, but Microsoft says File Explorer and Office do not currently opt in |

## What happens when a path is too long?

Per Microsoft, desktop Office apps cannot open files over the limit, and File Explorer cannot open, rename or move such items. OneDrive sync shows a path is too long notification and the sync client stops until the item is fixed. A file or folder name over 255 characters can work in the browser but will not sync to File Explorer or Finder.

Office also makes temporary lock files, such as ~$ files, by adding characters to the path. A save can fail even when the original path is under 260. Microsoft says an error that a file is open in another program can sometimes mean the path is too long.

## How do you fix it?

An IT admin can also shorten the OneDrive root folder name with the Group Policy called Set a custom name for the OneDrive folder, since the root counts toward the 520 total.

1. Open the OneDrive icon in the Windows tray or the Mac menu bar to see which files are affected.
2. Rename the item on the OneDrive or SharePoint website. Once the path is short enough, it syncs normally.
3. Shorten long file and folder names, and flatten deeply nested folders.
4. Keep files you use often near the top of your OneDrive folder.
5. To use a long-path file now, open it in the browser, where the 400 limit applies. Files On-Demand lets you browse OneDrive files in File Explorer without downloading them.
6. For a shared library shortcut, sync only a subfolder, ask the owner to flatten the structure, or rename the shortcut.

## How do you find the long ones?

Microsoft says you can measure a path in PowerShell with the .Length property on the path string, or in Terminal on macOS with wc -c. Check the longest folders first, and test with sample data before you rename a real tree.

## Can a flow help keep names short?

A flow can rename files on arrival so they follow a short pattern. Two of our guides: the [folder trigger for new files, now deprecated](/guides/power-automate-when-a-file-is-created-in-a-folder-deprecated/) and [a locked Excel file](/guides/excel-file-locked-by-another-user/) cover two parts of that work, since a locked file cannot be renamed until it is released.

## Want a naming rule that sticks?

Al Davies builds tools that cut busywork and missed steps for teams. If your folders have grown out of hand, a first call can review a short naming rule that a flow keeps for you. The first call is free and takes 45 minutes.

## FAQ

### What is the SharePoint path limit?

Microsoft says 400 characters for the full decoded path, including the file name.

### Why does File Explorer stop at 260?

Microsoft lists 260 characters as the limit for Windows File Explorer and Office desktop apps.

### What is the OneDrive sync total?

Microsoft says 520 characters: a local path up to 400 plus a root folder up to 120.

### Does a space count as one character?

In a browser address a space becomes %20, and Microsoft says the encoded form counts toward the 400 limit.

### Can I still open a long file?

Yes, in the browser, where the 400 limit applies. Microsoft's tip is to open a long-path file there instead of in a desktop app.

## Sources

- [What are file path length limits? (Microsoft Support)](https://support.microsoft.com/en-us/onedrive/what-are-file-path-length-limits)

## Related guides

- [Excel File Locked by Another User: Fix It for Good](/guides/excel-file-locked-by-another-user/)
- [When a File Is Created in a Folder (Deprecated): Replacement](/guides/power-automate-when-a-file-is-created-in-a-folder-deprecated/)
- [Why the 'Anyone with the link' option is missing in SharePoint](/guides/sharepoint-anyone-link-option-missing-teams-site/)
- [A SharePoint file is checked out and you cannot check it in](/guides/sharepoint-file-checked-out-cannot-check-in/)

Source: https://250highstreet.com/guides/sharepoint-400-character-path-limit-sync-error/
