How to decompile asar files?

How to decompile asar files?

By M.Muzammil | March 01, 2023

Decompile asar files

An ASAR (Atom Shell Archive) file is a simple tar-like archive format that is used to package and distribute Electron-based applications.

Electron is a popular framework for building desktop applications using web technologies such as HTML, CSS, and JavaScript.

ASAR files contain all of the application's source code, as well as any necessary assets such as images, fonts, and other resources. The purpose of using ASAR files is to protect the source code from tampering or unauthorized access by end users.

ASAR files are created using the asar utility, which is included with Electron. This utility can also be used to extract the contents of an ASAR file back into a regular file system.

ASAR files are typically used by developers to package and distribute their Electron-based applications for easy installation and use on multiple platforms.

How to decompile Asar Files?

Decompiling an ASAR file involves extracting the contents of the archive to a directory structure that can be edited or modified. Here are the steps to decompile an ASAR file:

  1. Install Node.js and npm (Node Package Manager) on your computer if you haven't already done so.

  2. Install the asar package globally using the following command in your terminal or command prompt:

    npm install -g asar
  3. Navigate to the directory containing the ASAR file you want to decompile using the cd command.

  4. Run the following command to extract the contents of the ASAR file to a directory:

    asar extract filename.asar output_dir

    Replace filename.asar with the name of your ASAR file and output_dir with the name of the directory you want to extract the files to. This will create a new directory with the contents of the ASAR file.

  5. You can also extract particular file from asar file if you know the name of file you want to extract. To do so use fthe following command:

    asar extract-file filename.asar main.js

    Here filename.asar is the asar file name and main.js is the file that you want to extract.

  6. You can now edit or modify the extracted files as needed.

Note that decompiling an ASAR file may violate the terms of use or licensing agreements for the application, and should only be done for legitimate purposes such as troubleshooting or customization.

Related Posts


I am Muzammil, a Self-taught Web Designer & Developer. I haven't yet completed my college degree. Started learning programming at the age of 12 and still learning. I love to work in Javascript and make eye-catchy designs. Free for your calls :)

Be The First To Comment