What is the IML file format?
An .iml file is an XML configuration file that describes a single module within an IntelliJ IDEA project. Each module definition records the module type (such as JAVA_MODULE, WEB_MODULE, or PYTHON_MODULE), the source and test roots within the module's content directory, excluded folders, and the full dependency chain - including JDK, other modules, and library references. IntelliJ IDEA, Android Studio, and other JetBrains IDEs read .iml files to determine project structure without re-scanning the filesystem.
The file is plain UTF-8 XML. The root element is <module type="..." version="4">, and its primary child is the NewModuleRootManager component, which holds <content>, <sourceFolder>, <excludeFolder>, and <orderEntry> elements. No binary data, compression, or encryption is involved.
.iml files are created and maintained automatically by the IDE. They are stored either in the module's own root directory or inside the .idea/ project folder depending on IDE version and project layout. JetBrains recommends adding .iml files to .gitignore in multi-developer projects that use Gradle or Maven, because the IDE regenerates them automatically from the build script on import. In projects without a build tool, .iml files are typically version-controlled.
Hand-editing is rarely needed; the IDE manages module settings through the Project Structure dialog.
Security & safety
RISK: LOWIML files are plain XML configuration files - not executable. They can reference external JARs or libraries that could theoretically point to malicious paths, but the file itself cannot execute code. Safe to open in a text editor. In a malicious repository, a tampered .iml could point dependency paths to unexpected locations - inspect before syncing in an unfamiliar project.
Format details
in a nutshell- ACT! Internet Mail Message - Legacy email message file from ACT! contact management software (Sage); obscure and effectively obsolete.
Programs that open IML files
Technical details
deep spec| XML root element | `<module type="..." version="4">` - `version="4"` is the current format revision |
| Module types | `JAVA_MODULE`, `WEB_MODULE`, `PYTHON_MODULE`, `ANDROID_MODULE`, and other IDE-specific types |
| Key component | `NewModuleRootManager` holds source roots, excluded folders, and dependency order entries |
| Source root declaration | `<sourceFolder url="..." isTestSource="false"/>` distinguishes production from test source sets |
| Dependency entries | `<orderEntry>` elements reference JDK, module-to-module dependencies, and library jars |
| Encoding | Plain UTF-8 text; no compression, encryption, or binary sections |
| Storage location | Module root directory or `.idea/` project folder, depending on IDE version and project setup |
| Auto-generation | Gradle and Maven imports regenerate `.iml` files; hand-edited entries may be overwritten on re-import |
| Version control guidance | Exclude from VCS when Gradle/Maven is used; include when no build tool is present |
| Format version history | Root element `version` attribute has progressed from `2` → `3` → `4` across IDEA releases |
| Compatible IDEs | IntelliJ IDEA, Android Studio, PyCharm, WebStorm, and all other JetBrains platform IDEs |
| Typical size | 1 KB - 50 KB, larger for modules with many dependencies or source roots |
| Released | IntelliJ IDEA 1.0, January 2001 |
| Latest version | No formal versioning; format evolved continuously with IDEA releases; current format used in IDEA 2024+ |
| Specification | www.jetbrains.com |
IML conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about IML files.