What is the maximum file name length (in characters) for the APFS file system?

The story behind the answer

The maximum APFS file name length is 255 characters. This limit applies to an individual name component—the name of a file or folder—not to the complete path made up of many nested folders.

APFS stores file names using UTF-8 and supports Unicode characters. That makes the practical experience more complicated than simply counting visible symbols: some characters can require multiple UTF-8 bytes, and applications may impose additional restrictions or display names differently. The slash character is reserved because it separates directories in Unix-style paths.

The 255-character limit is not unique to APFS. HFS+ also supported file names up to 255 Unicode characters, and many Unix file systems use a similar per-component limit. A related misconception is confusing file-name length with path length. A deeply nested APFS path can contain multiple components, each subject to its own limit, while the overall path has separate operating-system and API constraints.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: