Java class file and JAR inspector
Drop a .class or .jar and read it like javap -v — class version, constant pool, fields, methods with full bytecode, every attribute — plus the JAR's manifest, module-info, multi-release versions, Spring Boot nested jars and duplicate classes.
Added
Works with
- Language sandbox Formatting and referenceJava's Bytecode button sends the classes javac just compiled here
How to use it
Drop a compiled class or an archive onto the page (or click it to pick one). The example that opens first is a small Spring Boot-style fat jar I built by hand for this page, so every view has something in it.
How to use it
A .class file opens in six tabs:
-
Summary — the declaration (with generics, from the
Signatureattribute), the class-file version and the Java release it needs (52 → Java 8, 61 → 17, 65 → 21, 69 → 25; minor version 65535 means compiled with--enable-preview), access flags, superclass and interfaces, source file, record components,permitslist of a sealed type, nest host and members, inner classes, and sizes. -
Methods — one row per method; open one for its bytecode: every instruction with its offset, operands and the constant it refers to (hover any
#n),tableswitchandlookupswitchwith their targets,wideforms,invokedynamicwith its bootstrap method index, the exception table, line numbers, local variables and their generic types, method parameters, annotations, and a one-line summary of theStackMapTable. -
Fields — declarations, `ConstantValue`s, signatures and annotations.
-
Constant pool — every entry, resolved, filterable by text and by type.
-
Attributes — the class-level attributes:
SourceFile,InnerClasses,BootstrapMethods(each lambda’sLambdaMetafactorycall or the recipe of a string concatenation),NestMembers,PermittedSubclasses,Record,Module, annotations, and Kotlin’s and Scala’s own metadata (shown as annotations or as hex for attributes javap doesn’t know). -
javap -v — the whole class as
javap -v -pprints it, to copy or download. It follows the layout of JDK 21’s javap line for line (without its first two lines, the file path and date).
A .jar, .war or Spring Boot jar opens with an overview and tabs:
-
Overview — layout (plain jar, WAR, Spring Boot jar or war),
Main-ClassandStart-Class, the Spring Boot version,classpath.idxandlayers.idx, whether it is a multi-release jar, its module (orAutomatic-Module-Name), and a chart of class-file versions, so you can see at a glance that one dependency needs Java 17 when the rest is Java 8. -
Classes — every class grouped by package, with its Java release; classes under
META-INF/versions/N/are marked. Click one to open it.BOOT-INF/classes/andWEB-INF/classes/are treated as class roots. -
Nested jars — the jars inside (
BOOT-INF/lib/,WEB-INF/lib/), how many classes each holds, and whether each is stored uncompressed as Spring Boot’s launcher requires. Open looks inside one the same way; the bar above the tabs takes you back. -
Duplicates — class names that appear in more than one jar: the usual source of a
NoSuchMethodErrorwhen two versions of a library end up on the classpath. -
Manifest, Module (the
module-infoas source:requires,exports … to,opens,uses,provides … with) and Entries (every file, its size, compression and date).
From the language sandbox, write some Java, run it, and press Bytecode ↗: the classes javac produced open here, nested and anonymous ones included. For comparing dependency versions, the SemVer and Maven range tool reads Maven ranges; for other binary formats see binary formats.
How I checked it
The tests compare this page’s javap text with real javap -v -p output from JDK 21 for a set of
classes compiled to cover records, sealed interfaces, pattern switches, lambdas and method
references, string concatenation, try-with-resources, wide instructions (more than 256
locals), annotations with defaults, enums, a module-info and a Java 8 class; they must match
byte for byte. While building it I ran the same comparison over 851 classes from the JDK’s
java.base and 1,838 classes from Scala, Groovy, Kotlin, Guava, Spring, Byte Buddy, Jackson,
Lombok and JUnit jars; all matched, apart from a handful where JDK 24’s javap itself reports an
error. Where JDK 21’s and 24’s javap print a detail differently (a generic method’s throws
clause, module constants), this follows JDK 21.
Things it does not do: decompile to Java source, verify bytecode, or follow Class-Path
references to jars outside the archive.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.