Open the file with a text editor such as notepad++, the occurrence of “PE L” in the first several lines indicates it is 32 bit, while “PE d†” indicates 64 bit.(reference).
This is the simplest method to know if a binary is 32 bit or 64 bit. Other ways include running the program to see if there is “32 bit” alongside the program name in task manager. If so, it is a 32 bit application, otherwise, it is a 64 bit app. But this way to identify if an .exe is 32 bit or 64 bit needs you to run the program. Sometimes, you may not be ready to run the program e.g., the running environment has not been set up. And this method is not proper to test if a dll is 64 bit or 32 bit because a dll cannot run by itself. So, it is just a way to determine whether an executable is 32 bit or 64 bit.
There are some tools to detect if a program is 32 bit or 64 bit but that would be too complex. So, just follow the first method to find out if your program is 32 bit or 64 bit on Windows.