Select a class file
jsdv1.3.0
From bytecode to readable Java
Open a class or archive, then explore its source. No installation or upload required.
.class / .jar / .war / .zip
jsd.min.js
ESM · MIT
Minified JS
~289 KB
0.289 MB
With gzip
~88 KB
0.088 MB
Runtime dependencies
0
No WebAssembly
One JS file is all you need to decompile .class files in Node.js or your browser.
Source on GitHub github.com/jar-analyzer/jsdStart building with jsd
npm v1.3.0Add the same lightweight library to your browser or Node.js project.
Save as index.html and serve over HTTP. Select a .class file to see its source.
<input type="file" accept=".class" />
<pre id="source"></pre>
<script type="module">
import { decompileClassFile } from
'https://cdn.jsdelivr.net/npm/@jar-analyzer/jsd@1.3.0/dist/jsd.min.js';
document.querySelector('input').onchange = async (event) => {
const file = event.target.files[0];
if (!file) return;
const bytes = new Uint8Array(await file.arrayBuffer());
document.getElementById('source').textContent =
decompileClassFile(bytes).source;
};
</script>
Requires Node.js 20 or later. Install the package, then save the example alongside Example.class.
npm install @jar-analyzer/jsd
import { readFileSync } from 'node:fs';
import { decompileClassFile } from '@jar-analyzer/jsd';
const bytes = readFileSync('Example.class');
const result = decompileClassFile(bytes);
console.log(result.source);
node example.mjs
No Java source was produced. Review the diagnostics above.