Java Bytecode Viewer
Upload a .class file or paste hex bytecode to view Java bytecode instructions, constant pool entries, stack frames, and line number tables. Parse JVM class files and inspect method bytecode mnemonics — all in your browser with no server uploads.
Upload a .class file or paste hex bytecode to view Java bytecode instructions, constant pool entries, stack frames, and line number tables. Parse JVM class files and inspect method bytecode mnemonics, field descriptors, and class metadata — all in your browser with no server uploads.
Upload a .class file or paste hex bytecode to view the class structure, constant pool, and method bytecode instructions. The parser supports the full JVM class file format including constant pool, access flags, fields, methods, bytecode mnemonics, exception tables, line number tables, and stack map frames. Click Load example hex to try it with sample data.
Why Use Our Java Bytecode Viewer?
Instant Java Bytecode Disassembly
Upload a .class file or paste hex bytecode to instantly parse and disassemble JVM class files. The viewer shows the full class structure including magic number, version info, constant pool entries, access flags, field descriptors, and method bytecode instructions with mnemonics for every JVM opcode. All processing is local and instantaneous.
Complete Class File Inspection
Inspect every aspect of a Java class file: the constant pool with all entry types (Utf8, Class, Methodref, Fieldref, NameAndType, etc.), method bytecode instructions with operands, exception handler tables, line number tables for source mapping, stack map frames, and the full access flags breakdown. The tool provides a comprehensive view into the class file structure.
Comprehensive Bytecode Viewer Features
Navigate between overview, constant pool, fields, and methods tabs. Each method shows its bytecode instruction sequence with offset, opcode, mnemonic, operands, and comments. View max stack/locals, exception tables, line number tables, and stack map frames. The constant pool tab lists every entry with its tag type and resolved values.
Java Bytecode Viewer Online - No Installation
Use the Java bytecode viewer directly in any modern browser with no downloads, apps, or plugins required. Upload .class files, paste hex bytecode, or load example data. All class file parsing happens locally using JavaScript — no server uploads, no data leaks, completely private.
Common Use Cases for Java Bytecode Viewer
Java Malware & Payload Analysis
Security analysts use the bytecode viewer to inspect Java malware, droppers, and backdoors without running them. By viewing the constant pool and method bytecode directly, analysts can extract C2 URLs, encryption keys, and configuration strings that might be obfuscated in decompiled Java source code but are visible as constants in the class file.
Understanding Obfuscated Java Code
When decompiled output from tools like CFR, Procyon, or Fernflower produces confusing code, viewing the raw bytecode reveals the actual instructions the JVM executes. This helps reverse engineers understand what obfuscated methods actually do, especially with control flow flattening, opaque predicates, and string encryption.
License & DRM Validation Bypass Analysis
Researchers analyzing Java application licensing and DRM implementations use the bytecode viewer to inspect license validation methods. The constant pool reveals hardcoded license key formats, validation algorithm constants, and digital certificate fingerprints that are used in the licensing logic.
Minecraft Mod & Plugin Forensic Analysis
Minecraft mod analysts use the bytecode viewer to inspect obfuscated Forge, Fabric, and Bukkit/Spigot plugins. The tool helps identify hidden API calls, premium feature gates, telemetry endpoints, and hardcoded credentials that may be invisible in decompiled source but clearly visible in the bytecode constant pool.
Enterprise Java Code Audit & Compliance
Security auditors inspecting compiled Java enterprise applications use the bytecode viewer to verify that sensitive operations use the correct permissions, that cryptographic operations use expected algorithms, and that no unauthorized API calls are made. The raw bytecode view provides incontrovertible evidence of the actual executed code.
JVM Bytecode Education & Learning
Computer science students and Java developers learning the JVM instruction set use the bytecode viewer as an educational tool. By compiling simple Java code and viewing the resulting bytecode, they can understand how high-level Java constructs translate to JVM instructions, stack operations, and method dispatch.
Understanding Java Bytecode & Class Files
What is Java Bytecode?
Java bytecode is the intermediate representation of Java source code that runs on the Java Virtual Machine (JVM). When you compile a .java file with javac, the compiler produces a .class file containing platform-independent bytecode instructions. Unlike source code which is designed for human readability, bytecode is designed for efficient execution by the JVM while still retaining enough structure for runtime features like reflection, dynamic class loading, and garbage collection.
A Java class file has a strict binary format defined by the JVM Specification. It starts with the magic number 0xCAFEBABE, followed by version information, the constant pool (a table of all constants used in the class), access flags, class hierarchy information, field definitions, method definitions with bytecode, and class attributes.
How Our Java Bytecode Viewer Works
- 1. Upload or Paste Bytecode: Either upload a compiled .class file by clicking the Upload button, or paste the hex representation of a class file into the text area. The tool accepts raw hex bytes starting with the
CAFEBABEmagic number. You can also click "Load example hex" to parse a pre-built sample class file and explore its structure. - 2. Class File Parsing: The JavaScript-based parser reads the binary class file format step by step: it validates the magic number and version, decodes the constant pool (up to 65535 entries), parses access flags (ACC_PUBLIC, ACC_STATIC, ACC_FINAL, etc.), resolves the class hierarchy, enumerates fields with their descriptors, and processes each method including its Code attribute with bytecode instruction sequences, exception handler tables, line number tables, and stack map frames. The parser handles all 17+ constant pool entry types.
- 3. Explore the Structure: Use the tabbed navigation to switch between Overview, Constant Pool, Fields, and Methods views. Click any method to expand and see its full bytecode instruction listing, max stack/ locals, exception handlers, line number mappings, and stack map frames. Each bytecode instruction shows its offset, opcode value, mnemonic name, operands, and resolved constant pool references.
Java Class File Structure Explained
- Magic Number & Version: Every valid class file starts with the 4-byte magic number
0xCAFEBABE. The next 4 bytes contain the minor and major version numbers, which identify the Java version that compiled this class (e.g., major 61 = Java 17, major 52 = Java 8). - Constant Pool: A variable-length table of constants used throughout the class file. Entries include UTF-8 strings, class references, method/field references, numeric constants, name-and-type descriptors, and dynamic call sites. Each entry has a 1-byte tag identifying its type, and entries are indexed starting from 1 (index 0 is reserved as null).
- Fields & Methods: Each field and method is defined with access flags (public, private, static, final, etc.), a name index into the constant pool, a descriptor string (e.g.,
(Ljava/lang/String;)Vfor a method that takes a String and returns void), and attributes. The Code attribute of each method contains the actual bytecode instructions, max stack/locals, exception handlers, and optional debugging attributes. - Bytecode Instructions: Each JVM instruction is a 1-byte opcode followed by 0 or more operand bytes. Instructions range from simple stack operations (iconst_0, dup) to complex method invocations (invokevirtual, invokespecial, invokeinterface, invokedynamic), field access (getfield, putstatic), control flow (ifeq, goto, tableswitch), and object operations (new, checkcast, instanceof).
- Stack Map Frames: A verification attribute required for Java 7+ class files. StackMapTable entries describe the type state of the operand stack and local variables at specific bytecode offsets, enabling the JVM to verify type safety without expensive dataflow analysis. Frame types include same, same_locals_1_stack_item, chop, append, and full frames.
Privacy, Security & Availability
The Java Bytecode Viewer tool is 100% free with no signup required. All class file parsing is performedlocally in your browser using JavaScript — your .class files and bytecode data never leave your device. There are no usage limits or restrictions. The tool supports upload of .class files and paste of hex-encoded bytecode, with full class file structure inspection including constant pool, fields, methods, bytecode mnemonics, exception tables, line number tables, and stack map frames.
Frequently Asked Questions About Java Bytecode Viewer
The viewer supports the full JVM class file format (versions 45.0 through 67+ / Java 1.0 through 23+). It parses the constant pool with all 17+ entry types (Utf8, Integer, Float, Long, Double, Class, String, Fieldref, Methodref, InterfaceMethodref, NameAndType, MethodHandle, MethodType, Dynamic, InvokeDynamic, Module, Package), access flags, class hierarchy, interfaces, fields with descriptors, methods with bytecode instructions, exception handler tables, line number tables, and stack map frames.
Yes. Obfuscation tools like ProGuard, DashO, and Allatori rename class/method/field names to short meaningless identifiers, but the bytecode instructions themselves cannot be obfuscated (the JVM requires valid bytecode). Our viewer shows the actual instructions executed by the JVM, revealing the logic even when names are obfuscated. String encryption in the constant pool may appear as encoded bytes.
The viewer supports all standard JVM bytecode instructions (opcodes 0x00 through 0xC9) with proper mnemonic names and operand decoding. This includes stack operations (dup, swap, pop), arithmetic (iadd, lsub, fmul), control flow (ifeq, goto, tableswitch), field access (getstatic, putfield), method invocation (invokevirtual, invokespecial, invokestatic, invokeinterface, invokedynamic), object operations (new, checkcast, instanceof), and array operations (iaload, bastore, arraylength).
Yes. The viewer properly decodes invokedynamic instructions and their associated constant pool entries (InvokeDynamic and MethodHandle entries). Lambda expressions compiled with javac use invokedynamic with bootstrap methods that are referenced in the constant pool. The viewer shows the constant pool references for invokedynamic, allowing you to understand how lambdas and dynamic method calls are implemented in bytecode.
Absolutely. The Java Bytecode Viewer runs entirely in your browser. Your .class file or pasted hex bytecode is never uploaded to any server, stored in any database, or transmitted over any network. All parsing happens locally on your device using JavaScript. There are no API calls, analytics tracking, or data collection of any kind. This makes it completely safe for analyzing proprietary code, malware samples, or confidential applications.
The constant pool contains all constant values used in the class: string literals (like "Hello World"), class names (like java/lang/String), method references (like java/io/PrintStream.println), field references, numeric constants (Integer, Float, Long, Double), type descriptors, method handles for invokedynamic, module/package info for Java 9+ modules, and name-and-type pairs that describe field names and method signatures.
Android apps use DEX (Dalvik Executable) bytecode, not standard JVM bytecode. Our viewer only parses standard Java .class files. However, if you decompile a DEX file to Java source using tools like jadx, CFR, or Procyon, and then compile that source with javac, you can view the resulting bytecode with this tool. Alternatively, use a dedicated DEX bytecode viewer for Android-specific analysis.
Line number tables are generated by javac when classes are compiled with the -g option or default debug info. They map bytecode offsets to source file line numbers, enabling debuggers to show which line is executing. Obfuscated or release builds often strip these tables (or never include them), in which case the viewer will show no line number entries for those methods.
Yes — the Java Bytecode Viewer is 100% free with no signup, no account, and no usage limits. Parse as many class files as you need, as many times as you want. There are no hidden charges, premium tiers, or usage caps of any kind. All features including class file parsing, constant pool inspection, bytecode disassembly, and stack map frame analysis are available without any restrictions.