Works on this device
Path Length Checker
Paste a list of file paths to see how long each one is and which ones go over a limit. The paths are measured as text on your device. No file or folder is opened.
Your paths
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Enter one or more paths, or choose Try an example.
Result
How it was worked out
How to use this checker
- Type or paste your paths, one on each line. You can also open a text file that has one path on each line.
- Choose the limit to compare with: the Windows limit of 260 characters, the Linux limits, or your own limit.
- Read the table. For each path it shows the length in three ways, the number of names, the longest name, the room left and the result.
- The paths that go over the limit are also listed as text. Choose Copy paths or Download paths to keep that list, or Download CSV for the whole table.
- To see how long a file name can be inside one folder, choose Room left for names below a folder in the menu.
How a path is measured
- Characters: Unicode code points. A letter with a separate accent mark counts as two, and an emoji made of several parts counts as several.
- UTF-16 units: what Windows counts. Most characters are 1 unit. Emoji and some rare characters are 2 units.
- UTF-8 bytes: what Linux counts. Plain English letters, digits and common signs are 1 byte. Other letters are 2 or 3 bytes, and emoji are 4.
- Depth: the number of names between separators. A drive letter such as
C:is not counted. In a network path the server and the share are counted. - Room left: the limit minus the length of the path, in the unit of the limit. It is below zero when the path is too long.
The named limits
| Limit | Whole path | One name | Counted in |
|---|---|---|---|
| Windows MAX_PATH | 259 (the limit is 260 with one ending character that you do not type) | 255 | UTF-16 units |
| Linux | 4,095 (PATH_MAX is 4,096 with one ending byte) | 255 (NAME_MAX) | UTF-8 bytes |
| Your own limit | The number you enter | The number you enter, or none | The unit you choose |
On Windows, a path on a drive is the drive letter, a colon, a backslash, the names with backslashes between them, and one ending character. So 259 characters can be used.
These are common limits, not a promise for your system. Windows can be set to allow longer paths, some programs have lower limits of their own, and file systems differ. The limit of a sync or backup service is often shorter; enter it as your own limit.
Worked example
The path C:\Users\Ana\Documents\Projects\2024\Quarterly report\Final version\report-final-v3.docx has 88 characters, 88 UTF-16 units and 88 UTF-8 bytes. It has 8 names, and its longest name has 20 units. Against the Windows limit it has 171 units of room left.
The folder C:\Users\Ana\Documents\Projects\2024\Quarterly report has 53 units. One separator is needed after it, so 259 - 53 - 1 = 205 units are left for everything below it.
Limits you should know
- The tool reads text only. It cannot scan a drive or a folder. Make the list of paths with your system first, for example with
dir /s /bon Windows orfind .on Linux, then paste it. - A relative path is measured as typed. The system joins it to the current folder before it applies its limit, so the real path is longer.
- Windows has more rules that are not checked here, such as the shorter limit for creating a folder and the long path setting.
- The tool takes up to 5,000 paths and 1,000,000 characters at a time. The page shows the first 500 rows; the CSV file has every row.
- Spaces and double quotes around each line are removed unless you untick that option under More options.