← TenantTools365Blogone .sppkg · seven tools
SyncHealth365 · Concept

260, 259, 400, 520: the four path limits that break OneDrive sync, and which one you're actually hitting

SharePoint allows 400 characters. Windows Explorer stops at 260. Office at 259. The synced path adds your local folder on top. The error message is the same for all of them — here is how to tell which limit you hit and what fixes it.

Published 2026-09-17 · by HS Services

The error says We can't sync this item because the path is too long. It does not say which of four different limits you crossed, and they are enforced by different software at different lengths.

The four limits

LimitWho enforces itCountsTypical symptom
400SharePoint / OneDrive servicethe decoded URL path from the library root: folder/sub/file.docxUpload refused; sync error; "path is too long" in the browser
260 (MAX_PATH)Windows Explorer and classic appsthe full local path: C:\Users\jd\OneDrive - Contoso\Sales - Documents\folder\sub\file.docxFile visible in Explorer but cannot be opened, renamed or deleted; sync loops
259Word, Excel, PowerPoint, Accessfull local path incl. extension"The file name is too long" / "Sorry, we couldn't open" from Office only
520OneDrive sync clientlocal OneDrive root (up to 120) + relative path (up to 400)Sync client refuses to sync the item even with long paths enabled in Windows

Plus a fifth that is not a path limit: each segment (a single file or folder name) is capped at 255 characters.

Working out which one you hit

  1. Does it fail in the browser too? Then it is the 400 limit. Rare in practice; usually a migration from a deep network share.
  2. Works in the browser, fails on the PC in Explorer? 260. The most common case. The local prefix (C:\Users\<user>\OneDrive - <tenant name>\<site> - <library>\) is typically 60–90 characters before the SharePoint path even starts, so a 180-character SharePoint path is a 260+ local path.
  3. Opens in Explorer, fails only in Word/Excel? 259. One character tighter than Windows and it ignores the LongPaths setting.
  4. Windows long paths are on and it still won't sync? 520, or a 255-character segment.
  5. Mac only? macOS allows 1,024 in the path, but each segment is 255 bytes, not characters — accented and non-Latin names hit it early.

Fixes, from cheap to expensive

The June 2025 change

OneDrive tightened enforcement of these limits in mid-2025. Files that had quietly lived over the line stopped syncing, and in some reports were renamed or reverted to older versions by clients trying to resolve the conflict. If a user says "OneDrive deleted my files", check the sync client's error list and version history before assuming loss.

Seeing it before it breaks

The useful report is not "files over 400" — almost nothing is. It is "files whose local path would exceed 260 for a Windows user, 259 for Office, or 255 bytes per segment on a Mac", per client profile, ranked by which folder rename fixes the most of them. SyncHealth365 runs that scan for free, read-only, against Microsoft's documented limits per client, and it is the next post's subject.

Questions people also ask

Does OneDrive have a path length limit?

Yes — 400 characters for the decoded path in SharePoint and OneDrive, counted from the site's document library root. On a synced Windows device the local path, which includes the OneDrive root folder, must also stay under Windows' 260-character limit unless long paths are enabled.

What is the 260 character limit in Windows?

MAX_PATH. File Explorer and most classic Windows applications cannot open a file whose full local path exceeds 260 characters. Windows 10 and 11 can lift it with the LongPathsEnabled registry setting, but many applications, including parts of Office, still enforce it.

How do I shorten my OneDrive path?

Rename the longest folders near the top of the tree, move deep trees up a level, or shorten the local OneDrive root folder name (the "OneDrive - Company Name" folder). Renaming one high-level folder fixes every path beneath it.

Why does OneDrive say the path is too long when it is under 400 characters?

Because the local path is longer than the SharePoint path — it is prefixed by C:\Users\<name>\OneDrive - <Company>\<Site> - <Library>\ — and Windows applies its own 260-character limit to that. The 400 limit applies online; the 260 (or 259 for Office) limit applies on the device.