Skip to content
UniKit

File name and extension splitter

Split a list of file names into name and extension — compound extensions such as .tar.gz optionally kept whole, dot-files and trailing dots handled, with optional leading dot and name-only or suffix-only output.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

File name list

Split result

Each line is name, tab, extension by default.

Paste a file name list to split it

Files: 0 · With extension: 0 · Without: 0 · Compound: 0

What this tool does

  • Count files per extension in a directory listing for a type or storage breakdown.
  • Prepare a rename: split base name and extension so a prefix can be added or the case unified.
  • Audit upload naming, e.g. mixed .jpeg and .jpg or unexpected compound extensions.

Example

Input

report.tar.gz
.gitignore
archive.2026.zip
README
draft.

Output

report	tar.gz
.gitignore	
archive.2026	zip
README	
draft	

report.tar.gz keeps its compound extension, .gitignore counts as having none, and draft. has no extension after the trailing dot is dropped.

Frequently asked questions

What is the extension of report.tar.gz?

tar.gz by default, because compound extensions are kept whole, with report as the name. Turn “Keep compound extensions” off and you get gz plus report.tar.

What is the extension of .gitignore?

None. A dot-file is treated as a name on its own; otherwise .gitignore would split into an empty name and a gitignore extension, a classic rename-script trap.

How is a trailing dot like draft. handled?

It has no extension either. Windows silently drops a trailing dot, so it is stripped before splitting and the name becomes draft.

Does the extension include the dot?

No by default (gz, txt). Tick “Extension includes the dot” to get .gz or .txt for string concatenation and comparison.

Keywords:文件后缀拆分取后缀文件扩展名extension extractortar.gz 后缀隐藏文件后缀批量拆文件名file name split

Related tools