jehna/humanify
Deobfuscate Javascript code using ChatGPT
What it solves
Minified JavaScript is compact but nearly impossible for humans to read. This tool turns minified code back into something understandable by replacing cryptic short identifiers (like a, e, t) with meaningful names (like inputString, chunkSize). It makes reverse-engineering, debugging, or auditing minified code much easier.
How it works
You give it a JavaScript file (or pipe it in via stdin). The tool asks a large language model (OpenAI, Gemini, Anthropic, Ollama, OpenRouter, or Requesty) to suggest better names for each identifier. It makes one LLM call per identifier, passing a small amount of surrounding code as context (default 500 characters). The LLM's suggestion is then validated and normalized into a safe JavaScript identifier, and the actual rename is performed at the AST (abstract syntax tree) level using the oxc parser. This means all references are updated correctly, lexical scoping is respected, and the code's structure and behavior stay identical to the original. The result is printed to stdout or written to a file.
Who it's for
Developers who need to read, debug, or understand minified JavaScript — for example, when analyzing a bundled web application or recovering readable source from an obfuscated script. It's especially useful when combined with a deobfuscator like webcrack: you can first unpack a webpack bundle and then pipe the result into humanify to rename identifiers.
Highlights
- Single static binary (Rust) — no Node, npm, or Python required; download from the releases page.
- Supports multiple LLM providers: OpenAI, Gemini, Anthropic, OpenRouter, and local Ollama models.
- Free and private options available: local Ollama runs entirely on your machine, and Gemini's free tier or free OpenRouter models can be used at no cost.
- Renames are AST-level, so they preserve all references, respect scoping, and avoid collisions (with
_prefixing if needed). - Unix-style I/O (stdin/stdout,
-oflag) makes it easy to chain with other command-line tools. - v3 introduces a static binary, new providers, and flexible JSON-mode strategies for reliable LLM output.
Related
- Project
- Project
- Project
- Project
- Project