File Name Shortener
Truncate long file names to fit a max length, preserving the file extension intact, with an ellipsis inserted into the shortened base name.
Shortened File Name(s)
very-long-descriptive-f....pdf
30 chars (was 72)How to Use the File Name Shortener
Paste a file name (or a list, one per line) and set a max total length. Any name longer than that limit has its BASE portion truncated and an ellipsis inserted, while the file extension is always preserved intact at the end — so you never lose the information needed to know what type of file it is.
Example
very-long-descriptive-filename-that-is-way-too-long-for-most-systems.pdf at a max length of 30 becomes very-long-descriptive-fi....pdf — the base name is cut short and an ellipsis is inserted, but .pdf is kept fully intact at the end.
Common Use Cases
- Fitting file names within a length limit imposed by an older operating system or file system.
- Shortening long auto-generated file names before displaying them in a UI list.
- Preparing file names for upload to a system with a strict character limit.
FAQs
- How is this different from the File Name Cleaner? File Name Cleaner sanitizes invalid characters and normalizes casing — a concern about which CHARACTERS are valid. This File Name Shortener addresses a completely different concern: file name LENGTH, truncating names that are simply too long regardless of whether their characters are valid.
- Is the file extension ever cut off? No — the extension is always preserved in full; only the base name (everything before the last dot) is shortened to make room within the max length.
- What happens if the extension itself is longer than the max length? In that rare edge case, there isn't enough room to keep the extension intact and add an ellipsis meaningfully, so the tool falls back to a simple hard truncation of the whole name to the max length.
