Local Preflight

Local Preflight / Path length limits

SharePoint and OneDrive path length limits

There are two limits, not one. The cloud limit is 400 characters. Once files sync to a Windows PC, Office desktop apps hit a much lower limit. Here is how each is counted, with a calculator.

Short answer

Sources: Microsoft Support, What are the file path length limits? and Restrictions and limitations in OneDrive and SharePoint.

Path length calculator

Paste where the file will live and its path inside the folder you are moving. Nothing leaves this page.

Worked example: why a file opens online but not in Excel

A file at sites/Finance/Shared Documents/Archive/2024 Clients/…/Board pack.xlsx might be 170 characters in SharePoint, well under 400. When Jane syncs the Archive folder, the OneDrive app places it under:

C:\Users\jane.doe\Contoso Ltd\Finance - Archive\2024 Clients\…\Board pack.xlsx

The organisation name, the site name and the library name are added to the front. That can push the same file past 218 characters, and desktop Excel refuses to open it even though it works in the browser. Nothing is wrong in SharePoint, so the admin often can't see the problem.

How to shorten paths without losing structure

  1. Move content higher. Put a department's folders directly in a library instead of Shared Documents/Department/Team/…. Each level removed saves its full name.
  2. Use short site and library names. sites/fin instead of sites/Finance-and-Accounting-Team saves about 25 characters on every file.
  3. Shorten the longest folder names first. One 80-character folder name near the top affects thousands of files.
  4. Sync less. Syncing a sub-folder instead of the whole library shortens every local path.

Check a whole folder at once

The calculator checks one path. Local Preflight checks every file in a folder against both limits, plus invalid names, and tells you how many characters to remove from each.

Check a folder (free)See a sample report

Last reviewed 28 September 2026.