Developer

Java Decompiler

Open a .class file or a .jar, .war or .aar, browse its packages and read the Java source back. Vineflower by default, CFR as a second opinion. Download one class or the whole jar as a source zip.

  • The file is decompiled in your browser. Nothing is uploaded.
Try:

How it works

1

Drop a .jar, .war or .aar (or a single .class file) on the box above. Try the sample if you just want to see it work.

2

Pick a class in the tree. The first class loads the decompiler, which takes a second or two. After that each class takes a fraction of a second.

3

Read the highlighted source, copy it or download the .java file. Use Download all as source zip to get every class as a ready-to-open source tree.

What it shows

The file header lists the number of classes, the Java version the code was compiled for, and the Main-Class from the manifest when there is one. Classes are grouped by package, and nested classes are listed under the class that contains them. Other classes in the same jar are used to resolve types, which gives better output than decompiling a class alone.

Limits

Decompiled code is a reconstruction, not the original source. Comments and formatting are gone, and obfuscated code stays hard to read. Android APKs hold DEX code and are not supported here. Nested .jar files inside a fat jar are not opened, so drop the inner jar separately.

Frequently asked questions

Which decompiler does it use?

Vineflower 1.12 by default, a modern fork of Fernflower that handles records, enums, lambdas, switch expressions and newer Java versions well. You can switch to CFR for a second opinion. Both are the real Java decompilers compiled to JavaScript, so they run inside your browser tab.

Is my jar uploaded?

No. The file is read and decompiled in your browser. Nothing is sent anywhere. The decompiler itself (about 4 MB per engine) is downloaded from this site the first time you open a class, then cached by your browser.

Can it decompile an Android APK?

No. An APK contains DEX code, not Java .class files, so it needs a different tool. Use the APK analyzer to inspect an app, or convert the DEX to a jar with a tool such as dex2jar and drop the result here.

Why do nested and anonymous classes appear inside the outer class?

That is how Java source is written: a nested class, a lambda or an anonymous class lives inside its outer class. The decompiler rebuilds them there, so clicking Cart$Receipt opens Cart and scrolls to the Receipt declaration. Decompiling a nested class on its own gives a worse result.

Why is the output not identical to the original source?

Compilation throws away comments, formatting, local names without debug info, and some structure. A decompiler infers loops, generics and lambdas from bytecode, so the result usually compiles and reads well, but variable names may be generic and rare constructs can come out as odd code. If one engine struggles with a method, try the other.

What size of jar can it handle?

Everything stays in memory in your browser, so a jar of a few hundred MB can be listed and browsed, and classes are decompiled one at a time on demand. The source zip is capped at 2000 top-level classes; for bigger archives decompile the packages you need, one class at a time.

What does the Main-Class line mean?

It comes from META-INF/MANIFEST.MF. It names the class with the main method that runs when you start the jar with java -jar. The viewer opens that class first.

What about Android apps and other binaries?

Use the APK analyzer for Android apps, the EXE and DLL viewer for Windows programs and the ELF viewer for Linux binaries.

Related tools