What is the Smallest Possible .EXE? @InkboxSoftware
What is the Smallest Possible .EXE?  @InkboxSoftware
Uploaded June 2024 | Updated December 2026, 3 hours ago
What is the smallest possible EXE that can be run on the Windows Operating System? What about the largest possible EXE? What even is an EXE file? On Windows, EXE files use the Portable Executable file format, which contains the program's code, data, and references to other libraries that can be loaded and run by the OS. It is often referred to as an "Image", the captured state of the program in a form ready to be run by the system.

After testing it was found that the smallest EXE on 64-bit Windows is 268 bytes. This is a system limitation and not a limit with the Portable Executable file format itself. The smallest EXE runnable by other versions of Windows are as follows:
Windows XP: 97 bytes
Windows 2000: 133 bytes
Windows Vista/7 (32-bit): 252 bytes
Windows 7/10/11 (64-bit): 268 bytes

The largest EXE possible is 1,996,488,704 bytes. Again, this size is a limitation with Windows.

GitHub project containing 268 byte EXE, world's smallest game, and world's smallest piano:
github.com/InkboxSoftware/smallEXE

About the PE file format:
PE file format: learn.microsoft.com/en-us/windows/win32/debug/pe-format
PE file diagram: github.com/corkami/pics/blob/master/binary/pe101/README.md

Making Small EXE:
Original research into smallest possible EXE: https://archive.is/w01DO
World's Smallest Windows App (Dave's Garage): youtube.com/watch?v=-Vw-ONPfaFk
Tiny PE on Windows 10 (x64): github.com/ayaka14732/TinyPE-on-Win10
More on the 268 byte limit: gist.github.com/kajott/063dfce6a94da03a379553b3db6be334
Refined MattKC snake: github.com/EimaMei/snake-qr

Low Level Programming:
Kernel32 functions: geoffchappell.com/studies/windows/win32/kernel32/api/index.htm
Windows Virtual Terminal Sequences: learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
MSVC Linker options: learn.microsoft.com/en-us/cpp/build/reference/linker-options?view=msvc-170&viewFallbackFrom=vs-2019

What is the largest EXE: superuser.com/questions/667593/is-it-possible-to-run-a-larger-than-4gb-exe

This video is sponsored by Brilliant
What is the Smallest Possible .EXE?I built my own 16-Bit CPU in ExcelThe 8-Bit Machine that Out-Engineered NintendoProgramming the Commander X16 to type 10,000 Chinese CharactersAttack of the Space CrabsIt Took Me 3 Years To Make This45 Year Old DOS on a New Intel CPU Without Emulation卍 The Ancient Origin of the Swastika 卐Is 8-Bit Minecraft Possible?Building an Entire MMO From Scratch in 48 Hours - ¡Fruit!Programming a 40KB NES Game (in Assembly)Programming the Apple II - Everything you need to know
Inkbox |

What is the Smallest Possible .EXE?

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER