What is a .bat file?
A .bat file is a windows or DOS program. Its registered MIME type is application/x-msdownload, which places it in the application or document family of formats.
DOS stands for Disk Operating System.
Technically it is a specialised form of application/x-executable, so tools that understand that format can often read at least part of it.
BAT is a binary format: the contents are not readable text, so opening it in a text editor shows scrambled characters.
Files of this type usually begin with the bytes 4D 5A. That signature is how programs recognise the format even when the extension is wrong or missing.
The same format is also saved with the extensions .com, .cpl, .dll, .drv, .exe, .msi.
BAT file format details
| Extension | .bat |
|---|---|
| Format | Windows or DOS program |
| MIME type | application/x-msdownload, application/x-bat, application/bat |
| Category | Application or document |
| Text or binary | Binary |
| Based on | application/x-executable |
| File signature | 4D 5A |
| Registered with IANA | No |
| Other extensions | .com, .cpl, .dll, .drv, .exe, .msi |
How to open BAT files
| Windows | BAT files (Windows or DOS program) are made by specific software. The reliable way to open one is with the program that created it; a generic viewer will only show raw data. |
|---|---|
| Mac | The same applies on a Mac: look for a Mac version of the program that makes BAT files. |
| iPhone and iPad | Phones rarely open this type of file directly. The viewer above can show what is inside it without installing anything. |
| Android | The same applies on Android. The viewer above shows the first bytes of the file so you can confirm what it is. |
Can you convert a .bat file?
TapToConvert does not convert BAT files. The usual route is to open the file in the program that made it and use its Export or Save as option.
BAT file FAQ
What is a .bat file?
A .bat file is a windows or DOS program, with the MIME type application/x-msdownload.
How do I open a .bat file?
With the program that created it. The viewer on this page shows what is inside without installing anything.
Is a .bat file safe to open?
Treat it with care: BAT files can contain code that runs on your computer. Only open ones from sources you trust. Viewing one with the viewer on this page is safe, because it only reads the bytes and never runs them.
What is the MIME type of .bat?
application/x-msdownload, and it is also seen as application/x-bat or application/bat. Web servers send this type so browsers know how to handle the file.
Is BAT a text or binary format?
Binary. Its contents are not readable as text.
File type facts come from the IANA media type registry, the mime-db project and the freedesktop.org shared MIME database.