.COM file extension

To open .COM files on Windows, if you trust the source and need to run it, use a DOS environment/emulator (commonly DOSBox is used) and run the .COM from within that environment.

To open a .COM file, you usually run it as a DOS-era executable (often inside DOSBox or a similar DOS environment), not “open” it like a document. If you only need to inspect it, use a hex/binary viewer instead of executing it.

Last updated: April 29, 2026 · Reviewed by Julian Stricker

Open on your device

Choose your operating system for a dedicated step-by-step opening guide.

How to open .COM files

Use these platform-specific instructions to open .COM files safely.

Windows

  1. If you trust the source and need to run it, use a DOS environment/emulator (commonly DOSBox is used) and run the .COM from within that environment.
  2. If you only need to view what it contains, open it in a hex/binary viewer or text editor (it will usually look like random characters because it is binary).
  3. If Windows tries to execute it directly, cancel and verify what it is before running.
Full Windows guide

Mac

  1. macOS does not run DOS .COM programs natively; use a DOS emulator (commonly DOSBox is used) if you must run it.
  2. For inspection only, open the file with a hex/binary viewer or a text editor to confirm it is not a document.
Full Mac guide

Linux

  1. Linux does not run DOS .COM programs directly; use a DOS emulator (commonly DOSBox is used) to run it when needed.
  2. To inspect the file without executing it, open it with a hex viewer or use command-line tools to identify it as a binary.
Full Linux guide

iOS

  1. iOS does not realistically run DOS .COM executables; transfer the file to a desktop (Windows/macOS/Linux) and use a DOS emulator there, or inspect it as a binary only.
Full iOS guide

Android

  1. Android does not typically support running DOS .COM executables as normal apps; transfer the file to a desktop and use a DOS emulator, or inspect it as a binary only.
Full Android guide

Security notes

  • .COM files are executable programs; treat unknown .COM files as potentially malicious and avoid running them directly on your main system.
  • If you must run a legacy .COM program, prefer a DOS emulator/sandboxed environment to reduce risk to the host OS.
  • Be wary of unexpected .COM attachments or downloads: the extension is historically associated with small, easily distributed executables.

Recommended antivirus software

Scan files before opening them. These antivirus tools help protect against malware and viruses.

We may earn a commission when you use affiliate links. This supports our free file extension guides.

Can't open this file?

These are the most common causes and fixes when .COM files fail to open.

Common reasons

  • The .COM file launches (or tries to) instead of opening in an app
  • It will not run on modern Windows/macOS/Linux
  • The file opens as gibberish in a text editor
  • Security warnings or blocked execution

Fix steps

  1. If you intended to inspect it, open it with a hex/binary viewer or a text editor via “Open with…” rather than double-clicking.
  2. If you intended to run a DOS program, run it inside a DOS emulator instead of directly from the desktop.

What is a .COM file?

.COM is a simple, flat binary executable format historically used by CP/M and MS-DOS. Unlike .EXE, it has minimal header structure and is essentially a memory image loaded at a fixed offset, with classic DOS-era constraints (notably small size and limited addressing). On modern Windows, .COM is still recognized as an executable extension, but it is primarily relevant for legacy software and malware analysis today.

Background

The .COM file extension is best known as a legacy executable format from CP/M and MS-DOS. In DOS, a .COM program is loaded into memory with a very simple layout, which made it easy to create and fast to load compared to more complex executable formats.

Because it is executable code, .COM files are typically “run” rather than edited. Historically they were used for small utilities and programs in DOS environments. Today, most legitimate uses involve running old software in an emulator (for example, for retro computing or accessing legacy tools).

Modern operating systems may still recognize .COM as an executable extension, which also makes it a common vehicle for malicious programs. Treat unknown .COM files as potentially unsafe and prefer analysis/inspection tools over execution.

Common MIME types: application/x-msdos-program

Further reading

Authoritative resources for more details on the .COM format.

Common .COM issues

The .COM file launches (or tries to) instead of opening in an app

On some systems, .COM is treated as an executable extension, so double-clicking may run it (or attempt to), not display it like a document.

  1. If you intended to inspect it, open it with a hex/binary viewer or a text editor via “Open with…” rather than double-clicking.
  2. If you intended to run a DOS program, run it inside a DOS emulator instead of directly from the desktop.

It will not run on modern Windows/macOS/Linux

.COM programs are designed for DOS/CP/M environments and may not execute correctly (or at all) on modern operating systems without a compatible runtime/emulator.

  1. Use a DOS emulator (commonly DOSBox is used) and run the program from inside the emulated DOS prompt.
  2. If the program depends on DOS hardware behavior, try different emulator settings or an older/compatible DOS environment.

The file opens as gibberish in a text editor

.COM files are binary executables, not text documents, so a text editor will show unreadable characters.

  1. Use a hex/binary viewer for inspection instead of a plain text editor.
  2. If you expected a document, confirm the file was named correctly and wasn’t mislabeled or incorrectly downloaded.

Security warnings or blocked execution

Because .COM is executable code, security tools or OS policies may warn, quarantine, or block it—especially if it came from the internet or email.

  1. Do not bypass warnings unless you trust the source and understand what the program does.
  2. Prefer running it inside an isolated DOS emulator environment rather than executing directly on the host OS.

FAQ

Is a .COM file a “data file”?

Most commonly, no. The .COM extension most often indicates a legacy executable program format used by CP/M and MS-DOS.

How do I run a .COM file today?

Typically by using a DOS environment/emulator (commonly DOSBox) and running it inside that environment, since modern operating systems do not natively support DOS .COM programs.

Can I convert a .COM file to .EXE or another format by renaming it?

No. Renaming only changes the filename extension; it does not change the executable format or make it compatible with modern systems.

Why does my system warn me about a .COM file?

Because it is executable code. Many security systems treat executable downloads as higher risk, especially when they come from untrusted sources.

Similar file extensions

Compare related formats in the same category to find the right tool faster.