Works
Viewing, inspecting and verifying. You get the source with language-aware colouring and line numbers. File details, exact byte size and the detected signature are always shown.
The short version: CLASS is a Java Bytecode Class from Sun Microsystems. The longer version — including the quirk that trips most people up — is below, along with a viewer that runs entirely on your own device.
Java Bytecode Class is a code format developed by Sun Microsystems, first appearing in 1995. It is normally produced by Java compilers.
The magic number is literally the word 'cafebabe' — chosen by James Gosling's team over lunch at a café.
| Full name | Java Bytecode Class |
|---|---|
| File category | Code |
| MIME type | application/java-vm |
| Magic bytes (file signature) | CA FE BA BE |
| Developer | Sun Microsystems |
| Introduced | 1995 |
| Usually created by | Java compilers |
| OpenAnyFile engine | syntax highlighter |
| Opens without upload | Yes — parsed locally in your browser |
OpenAnyFile routes .class to its syntax highlighter, which highlights the source with language-aware colouring and line numbers.
Viewing, inspecting and verifying. You get the source with language-aware colouring and line numbers. File details, exact byte size and the detected signature are always shown.
Editing and re-saving. OpenAnyFile is a reader, not an editor — for changes you still need special software or an equivalent.
It depends entirely on whether the website uploads it, and almost all of them do. That is a real problem when the code file in question is a contract, a client deliverable or something under NDA. OpenAnyFile removes the question: the decoding happens inside your browser tab, so there is no transfer, no queue, no temporary storage and no retention window to read about in a privacy policy.
Yes. OpenAnyFile's syntax highlighter runs in your browser, so you can read a CLASS file with nothing installed. You get the source with language-aware colouring and line numbers. For full editing you still need the original application — this is a viewer, not an editor.
Look at the first bytes rather than the extension. A genuine CLASS begins with CA FE BA BE. Opening the file in OpenAnyFile shows that signature in the file-details panel, so a file renamed to .class by mistake is easy to spot.
With OpenAnyFile, yes, because nothing is uploaded. The file is read locally through your browser's File API and never leaves your device, so there is no server copy to leak, log or retain. That matters most for the kind of file people are least willing to hand to a random converter site.
Java Bytecode Class — an application/java-vm format created by Sun Microsystems since 1995. The magic number is literally the word 'cafebabe' — chosen by James Gosling's team over lunch at a café.
Yes — the same engine also opens .html, .xml, .sql, so you can compare related files without switching tools.
These open with the same engine, so if you have one of these sitting next to your .class file, it will open too: