Office 365 SharePoint and OneDrive for Business allow maximum pathname for files and folders to be 400 characters.

This limit applies to the total length of the URL path to a folder or a file in SharePoint Online and OneDrive for Business but not to the length of any parameters. Also, these limitations apply only to un-encoded URLs, not to encoded URLs.

For additional information on SharePoint Url composition, refer to the details below:

The total length of a SharePoint URL equals the length of the folder or file path, including the protocol and server name and the folder or file name, plus any parameters that are included as part of the URL.

The formula is as follows:

URL = protocol + server name + folder or file path + folder or file name

For example, the following is a typical URL path to a file stored in SharePoint:

Where the parts of the URL path are as listed in the following table.

URL part Example
Protocol http://
Server name
Folder or file path sites/marketing/documents/Shared%20Documents/Promotion/
File name Some%20File.xlsx