SharePoint path length checker
Last updated · By Sean Regan
Check a path
The site collection or subsite URL.
'Shared Documents' in the URL syncs locally as 'Documents'.
Folders between the library and the file, separated by /.
Including the extension.
The profile folder name under C:\Users\ for a typical user.
How the OneDrive sync root is named on the local machine.
SharePoint URL length
206/ 400
194 characters of headroom
Synced Windows path length
194/ 260
66 characters of headroom
Full URL
https://contoso.sharepoint.com/sites/ProjectDelivery/Shared Documents/2026 Program Delivery/Workstream 3 - Data Migration/Design Authority Papers/Data Migration Design Authority Paper v4 FINAL approved.docx
Projected local sync path
C:\Users\YOURUSERNAME\Contoso\ProjectDelivery - Documents\2026 Program Delivery\Workstream 3 - Data Migration\Design Authority Papers\Data Migration Design Authority Paper v4 FINAL approved.docx
The sync prefix alone consumes 58 characters before any of your folders, and the file name accounts for another 60. The longest single segment is Workstream 3 - Data Migration at 29 characters — renaming a segment that high in the tree shortens every path beneath it.
Why there are two limits
SharePoint Online enforces its own ceiling on the entire decoded URL — roughly 400 characters covering the hostname, the site path, every folder name and the file name.[1] Hit it and SharePoint refuses the upload or the rename outright, which is at least an honest failure.
The limit that actually generates helpdesk tickets is the local one. When a library is synced, Windows stores it under the user's profile with a prefix built from the organization name, the site name, and the library name. That prefix is charged against the classic 260-character MAX_PATH ceiling before a single one of your folder names is counted. A file that opens perfectly in the browser then fails to open, save, or sync on the desktop — and because the prefix contains the user's own profile folder, it can break for one person and not another.
Office adds a little more pressure: temporary and lock files sit alongside the document with extra characters in the name, which is why this checker warns before you reach 260 rather than at it.
How to shorten a path that is over
- Rename the highest folder first. One rename near the root shortens every descendant; renaming leaf folders fixes one file at a time.
- Shorten the library name. It is part of the sync prefix, so it is charged to every single file in the library.
- Flatten duplicated nesting. "2026 Program Delivery / Workstream 3 - Data Migration" repeats context that belongs in metadata columns and views.
- Strip dates and status words from file names where a column or version history already records them — "v4 FINAL approved" is 17 characters of path budget.
- Consider a separate site rather than deeper folders when a workstream grows; a shorter site URL buys headroom for everything inside it.
Finding every long path, not one at a time
This page answers the question for a single path. To find them across a library or a whole site, use SharePoint Smart Path Length, a free SPFx web part that scans and reports every item over your threshold with the local sync projection included, and exports the list so you can plan the renames. If you would rather flag them inside the library itself, the column formatting recipe highlights offenders directly in a view.
FAQ
- What is the SharePoint file path character limit?
- SharePoint Online rejects a full decoded URL longer than about 400 characters, counting the site URL, every folder name, and the file name. The separate practical limit is on the synced machine: many Windows applications still break past 260 characters on the local path.
- Why does OneDrive sync fail with 'path too long'?
- Sync prepends the local profile folder, the tenant name, and the library name to the SharePoint-relative path. A path that is comfortable in the browser can exceed 260 characters once that prefix is added, and Windows applications then refuse to open or save the file.
- How do I fix a path that is too long?
- Shorten folder names as high in the tree as possible, because one rename shortens every path beneath it. Flatten redundant nesting, drop date strings that duplicate a metadata column, and shorten the library name — the library name is part of the sync path.
- Does enabling long path support in Windows solve it?
- Only partly. The Windows registry LongPathsEnabled setting lifts the API limit, but each application must also opt in through its manifest. Plenty of Office and line-of-business applications still fail, so treat 260 characters as the working ceiling.
- How do I find long paths across a whole site?
- Checking paths one at a time does not scale. Smart Path Length scans a site or library and reports every item over your threshold, with the local sync projection, so you can fix the folders that cause the most breakage.
References
- [1] "The path or file name is too long" error — Microsoft Learn
- [2] Restrictions and limitations when you sync files with OneDrive — Microsoft Learn
Related
Looking for the other calculators? They all live on the tools & calculators page.
Get your first result in about 10 minutes
Download SharePoint Smart Path Length, follow the step-by-step install guide, and run it against a real site the same afternoon. Nothing to license, nothing to renew.
- Download the .sppkg package from the latest release.
- Upload it to your tenant App Catalog.
- Add the web part to a SharePoint page.
Email me when a new release ships
No marketing spam. One short email when a new release ships. You can unsubscribe anytime.
