does the 400 character limits for file url length cover the site url and list url?

john john Pter 1,385 Reputation points
2023-12-21T02:25:31.4066667+00:00

Inside SharePoint limitation @ https://v4.hkg1.meaqua.org/en-us/office365/servicedescriptions/sharepoint-online-service-descriptio... it is mentioned that file path can only be 400 characters, does this include the tenant, site and library URLs?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Answer accepted by question author
  1. Ling Zhou_MSFT 23,670 Reputation points Microsoft External Staff
    2023-12-21T06:49:50.42+00:00

    Hi @john john Pter,

    Thank you for posting in this community.

    The 400-character limit includes the length of your site name, document library name, folders, and file. It does not count the characters in the domain/tenant name.

    For example, if the folder/document URL is

    crescent.sharepoint.com/ sites/accounting/Shared Documents/Folder A/Document 123, it only counts the characters highlighted in BOLD above (starting with sites).


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Virendra Kumar 0 Reputation points
    2025-12-10T21:51:12.1166667+00:00

    How SharePoint Online File Path Length is Counted

    • Decoded Path Length (the real limit): SharePoint Online enforces a 400‑character limit on the decoded path.
    • That means spaces, special characters, folder and file names are counted as they appear in plain text, not in their encoded %20 or %2F form.
    • What Counts Toward the Limit: 
    • ✅ Site name (after the domain)
    • ✅ Document library name
    • ✅ Folder and subfolder names
    • ✅ File name
    • What Does Not Count: 
    • ❌ The domain (https://tenant.sharepoint.com/)
    • ❌ File extension (e.g., .docx.xlsx)

    Example

    https://tenant.sharepoint.com/sites/ProjectX/SharedDocuments/2025/Design/Blueprints/Final Draft v2.docx

    • Count starts after sites/ProjectX/
    • Includes: Shared Documents/2025/Design/Blueprints/Final Draft v2
    • Excludes: https://tenant.sharepoint.com/ and .docx

    If that decoded string exceeds 400 characters, the file won’t upload, sync or migrate properly.

    SharePoint Online’s file path limits are often misunderstood. Below article breaks down what actually counts toward the 400?character limit, clears up common myths, and shows practical ways to count length. Whether you’re an admin or end user, you’ll learn how to manage paths effectively and keep your files accessible.

    Confused About SharePoint Online File Path Limits? Here’s What You Should Really Count

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.