.war

What is a .war file?

A WAR file packages a Java web application for deployment to a servlet container like Tomcat or JBoss.

Use caution
Type Archive
By Sun Microsystems (Java Servlet Specification)
MIME application/java-archive

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

A WAR file is a JAR file with a specific directory structure for web applications. It bundles servlets, JSP pages, static resources (HTML, CSS, JS), libraries, and a deployment descriptor (web.xml) into a single archive that Java application servers know how to deploy. Drop a .war into Tomcat's webapps directory, and the server extracts, configures, and serves the application automatically.

The format follows the Java Servlet specification: `WEB-INF/classes/` for compiled Java code, `WEB-INF/lib/` for library JARs, `WEB-INF/web.xml` for configuration, and everything else at the root for static web content. This standardised structure means the same WAR deploys identically on Tomcat, Jetty, JBoss/WildFly, WebSphere, and WebLogic.

Modern Java deployment has moved toward executable JARs (Spring Boot) and containers (Docker), but WAR deployment remains common in enterprise environments. Build tools (Maven, Gradle) create WAR files with a single command (`mvn package` with war packaging).

Technical details
Full Name
Web Application Archive
MIME Type
application/java-archive
Developer
Sun Microsystems (Java Servlet Specification)
Magic Bytes
50 4B 03 04
Safety
.war requires caution. Contains executable Java web application code. Only deploy WARs from trusted sources.
What opens it
Apache Tomcat (to deploy)
FREE Windows / Mac / Linux
7-Zip (to inspect)
FREE Windows
IntelliJ IDEA
FREE Windows / Mac / Linux
FAQ
How do I deploy a WAR file?
Copy the .war to your application server's deployment directory (e.g., Tomcat's webapps/). The server extracts and deploys it automatically. Access the application at http://server:port/warname/.
What's the difference between JAR and WAR?
Both are ZIP archives with Java code. JAR is for general Java applications and libraries. WAR adds a web-specific directory structure (WEB-INF, web.xml) for deployment to servlet containers like Tomcat.
Related formats