文件类型识别
UpBox优盒工具箱,免费在线文件类型识别:读文件头前 32 字节判断真实格式,与扩展名对照,能看出被人为改过后缀的文件,全程在本机浏览器完成。
无需注册 · 数据不上传No sign-up · nothing uploaded
选文件Pick a file
等待选择文件
扩展名只是文件名的一部分,随便改几个字母就能骗过人眼;这里比对的是文件头,也就是程序真正认的那几个字节,改扩展名骗不过系统也骗不过本页
识别结果Result
示例Sample文件名后缀—
真实类型—
MIME—
文件头—
ZIP 这一族只能看出容器,docx、xlsx、apk、jar 都是它的外壳,要区分得再往里读两个字节
本工具所有运算在本地浏览器完成,你的文件、文本不会上传到服务器
工具介绍
有人发来一个 .jpg 打开却是 exe,或者下载的 .zip 实际是别的容器;扩展名改一改就能骗过人眼,骗不过文件头。 A file named .jpg that turns out to be an exe, or a .zip that is some other container: renaming fools people but not the header.
这里只读前 32 个字节做比对,二十多种常见格式都有签名,认不出来时会明确说没认出来,而不是瞎猜。 It compares only the first 32 bytes against signatures for twenty-odd formats, and says plainly when nothing matched instead of guessing.
- 二十余种签名20+ signatures
- 后缀对照Extension check
- 只读 32 字节32-byte read
- 本地完成Stays local
使用说明
- 点选文件。Choose a file.
- 读文件头。Read the header.
- 看真实类型。See the real type.
- 对照后缀判断。Compare with the extension.
常见问题
会把文件上传吗?Is the file uploaded?
不会。脚本只用 FileReader 读本地切片,文件不离开浏览器。No, the script reads a local slice with FileReader and nothing leaves the browser.
为什么 docx 显示成 zip?Why does docx show up as zip?
docx、xlsx、apk、jar 都是 ZIP 容器,只看文件头只能到这一层,进一步区分要看容器内部结构。docx, xlsx, apk and jar are all ZIP containers, so the header stops at that level and deeper checks need the internal structure.
后缀不一致就一定有问题吗?Is a mismatch always a problem?
不一定,服务器导出、系统改名都可能造成不一致;但它确实值得多看一眼再打开。Not necessarily: server exports and renaming tools can cause it, but it is worth a second look before opening.
为什么有的文件认不出?Why do some files show nothing?
签名表只覆盖常见格式,少见的私有格式、加密容器、被截断的文件都会认不出,这时按未知处理。The table covers common formats only, so rare private formats, encrypted containers and truncated files come back unknown.