.DEX

DEX File

Dalvik Executable
Ask a question
QUICK ANSWER

A DEX file is compiled Android app code - the Dalvik Executable that Android's runtime (ART) runs. It normally lives inside an APK as classes.dex, not as a standalone file. To read its code, use jadx (free) to decompile it to Java. You cannot run a .dex on Windows or convert it to an EXE.

Developer: Google (Android Open Source Project) Category: Developer Files Open standard MIME: application/octet-stream
OPENS ON Windows macOS Linux Android
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Sep 9, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the DEX file format?

A .dex file is a Dalvik Executable - a compiled bytecode container designed to run in the Android system environment. It holds compiled code ready to be executed on Android, and was originally interpreted by the Dalvik virtual machine. Since Android 5.0 (Lollipop), the modern ART (Android Runtime) compiles .dex bytecode ahead-of-time rather than interpreting it, but the format remains the standard Android executable format.

DEX files in APK packages

.dex files are commonly found inside APK packages, which are used for installing new software on Android. Historically each APK contained a single classes.dex file storing all classes and methods used by the application. Larger apps now use multidex - splitting code across classes.dex, classes2.dex, classes3.dex and so on - to exceed the 65,536-method limit imposed by a single file.

Generating and inspecting DEX files

A .dex file may be generated automatically as part of the Android build process, or manually. The modern toolchain uses the d8 compiler (part of Android SDK build-tools) to translate Java or Kotlin bytecode into .dex format. Each file opens with the magic signature dex\n followed by a 3-digit format version number (such as 035, 037, 038, or 039) and a null byte. During installation, ART further compiles .dex into native code, producing .odex or .vdex files stored on-device.

Security & safety

RISK: MEDIUM

A .dex itself doesn't run on your PC, so simply having one is low-risk. The real context is Android malware analysis: malicious apps hide their logic in DEX (sometimes loaded dynamically at runtime), so a .dex you extracted from an untrusted APK may contain harmful code. Only inspect such files in a safe environment (decompiler/sandbox), never by installing the parent APK. Be wary of sketchy "dex to exe / dex opener" download sites - they don't do anything legitimate and often bundle adware.

Format details

in a nutshell
FULL NAMEDalvik Executable
DEVELOPERGoogle (Android Open Source Project)since 2008 (Android 1.0; Dalvik VM, executed by ART since Android 5.0)
MIME TYPEapplication/octet-stream
TYPECompiled Android bytecode container (binary executable for the Dalvik/ART runtime)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001020304050607
HEX
6465780A30333500
ASCII
dex·035·
Magic is 'dex\n' followed by a 3-digit DEX format version and a 0 byte; the version digits change with Android releases.

Programs that open DEX files

Windows4 apps
jadx Open-source Open the .dex (or the whole .apk) in jadx-gui to decompile it to readable Java and browse the code. The go-to free tool in 2026.
Android SDK build-tools (d8 / dexdump) Free Use 'dexdump classes.dex' to dump headers/bytecode, or d8/r8 in the build pipeline. The official Google tooling (the SDK replaces the old standalone 'Android SDK' download).
Android Studio Free Drag an APK/dex into Android Studio's APK Analyzer to inspect DEX method counts and class contents.
JEB / Ghidra (advanced RE) Open-source Ghidra (free) can load DEX for deeper reverse engineering; JEB is a commercial Android decompiler. For analysts, not casual users.
macOS2 apps
jadx Open-source Open .dex/.apk in jadx-gui to decompile to Java (runs on the JVM, cross-platform).
Android SDK build-tools (d8 / dexdump) Free Inspect DEX from the command line; same official toolchain as on Windows.
Linux3 apps
jadx Open-source jadx-gui or 'jadx classes.dex' to decompile to Java sources.
baksmali / smali Open-source baksmali disassembles a .dex into human-readable Smali; smali reassembles it - the standard for editing Android bytecode.
Android SDK build-tools (dexdump) Free dexdump for low-level inspection.
Android1 app
The Android runtime (ART) Built-in ART executes DEX bytecode on-device - but only as part of an installed APK, not a loose .dex you 'open'.

Technical details

deep spec
VM architectureRegister-based (unlike the stack-based JVM; each DEX instruction explicitly names register operands, reducing total instruction count)
Magic bytes8 bytes at file offset 0: ASCII "dex", newline (0x0A), 3-digit format version (e.g. 035, 037, 038, 039), null byte (0x00)
Format versions035 (Android 2.2), 037 (Android 7.0), 038 (Android 8.0), 039 (Android 9+); version digits are embedded in the magic header
Method index limit65,536 methods per .dex file (16-bit method reference index); apps exceeding this split code across classes2.dex, classes3.dex, etc.
Integrity fieldsHeader contains an Adler-32 checksum and a 20-byte SHA-1 signature that together cover the remainder of the file
String poolAll string literals are stored once in a shared, deduplicated string pool; bytecode references strings by integer index
Byte orderLittle-endian by default; the header embeds the endianness constant 0x12345678 to allow detection of reversed byte order
Source languagesJava and Kotlin (and any JVM-targeting language); the d8 compiler converts .class bytecode or .jar archives to DEX
Build-time compilerd8 (Android SDK build-tools 28.0.1+) replaced the legacy dx tool; takes JVM .class files or .jar archives as input
ART ahead-of-time compilationAt install time, ART's dex2oat converts .dex to native machine code, storing results as .odex / .oat files in /data/dalvik-cache
MIME typeapplication/octet-stream (no dedicated registered MIME type exists for the DEX format)
Execution historyInterpreted by Dalvik VM with JIT (Android 1.0-4.4); ahead-of-time + profile-guided JIT compiled by ART (Android 5.0+)
Disassembly and decompilationbaksmali disassembles .dex to Smali assembly; jadx and similar tools decompile .dex back to readable Java source code
Location inside APKStored uncompressed inside the APK ZIP archive; primary entry is always named classes.dex, with classes2.dex onward for multidex apps
Released2008 (Android 1.0; Dalvik VM, executed by ART since Android 5.0)
Open standardYes · royalty-free
Specificationsource.android.com

DEX conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DEX files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about DEX files.

Frequently asked questions

What is a classes.dex file inside an APK?
It's the app's compiled code (Dalvik Executable) that Android's runtime runs. Large apps split it into classes.dex, classes2.dex, etc. (multidex). It's the actual program logic of the app.
How do I open or read a .dex file?
Use jadx (free) to decompile it to readable Java, or baksmali to disassemble it to Smali. The Android SDK's dexdump dumps low-level details. You read DEX, you don't 'run' it on a PC.
Can I convert a DEX file to EXE?
No. DEX is Android/ART bytecode; EXE is Windows machine code. There's no converter. To run the code you need Android - a phone or an emulator on your PC.
How do I get Java source code from a .dex?
Decompile it with jadx, or convert it to a .jar with dex2jar and open that in a Java decompiler. The result is approximate, readable Java - not the developer's exact original source.
What's the difference between DEX and APK?
DEX is just the compiled code; an APK is the full installable package that contains the DEX (as classes.dex) plus the manifest, resources, native libs and a signature. You install the APK, not the DEX.
Can I run a .dex file directly?
Only inside Android (ART), and normally only as part of an installed APK. There's no standalone way to double-click and run a .dex on Windows, macOS or Linux.

References

1Android - Dalvik Executable format (AOSP)source.android.com
2Android - ART and Dalvik runtimesource.android.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.NOMEDIAAndroid No-Media Marker File
6.PARTPartial Download File
7.RPMSGRestricted Permission Message
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.DBSQLite Database File

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z