If you don't want to move files or change directories, explicitly tell hactool where the keys are.
Command syntax:
hactool --keyset=Z:\path\to\prod.keys [other options]
Real-world example:
hactool --keyset=D:\switch\prod.keys game.nca
This overrides all other search locations and is the most reliable method.
If you are in a hurry and just want to test one file, use: hactool prodkeys does not exist fixed
hactool --keyset=./prod.keys yourfile.nca
If you do not want to type the path every time, you can place the prod.keys file in the default directory where hactool looks.
Windows:
Place the file in:
C:\Users\[YourUsername]\.switch\prod.keys
(Note: You may need to create the .switch folder manually if it does not exist. Ensure the folder name starts with a dot).
Linux / macOS:
Place the file in:
~/.switch/prod.keys If you don't want to move files or
Even if you have a prod.keys file, hactool may not be able to find it. By default, hactool looks in:
If your keys file is on your desktop but you are running hactool from your downloads folder, the error will appear.
Error Message:
hactool: prod.keys: does not exist (or similar variants like Failed to locate prod.keys)
Affected Tool:
hactool – a command-line tool for inspecting Nintendo Switch file formats (XCI, NCA, NRO, etc.) Real-world example:
hactool --keyset=D:\switch\prod
Root Cause:
hactool requires a valid prod.keys file containing cryptographic keys extracted from a Nintendo Switch console. Without this file, it cannot decrypt or parse encrypted Switch content.
Instead of relying on auto-detection, explicitly specify the keys file:
hactool --keyset=/path/to/prod.keys <file_to_analyze>
hactool looks for prod.keys in one of these locations (priority order):
| Platform | Path |
|----------|------|
| Windows (current dir) | .\prod.keys |
| Linux/macOS (current dir) | ./prod.keys |
| Linux/macOS (user config) | ~/.switch/prod.keys |
| Windows (user config) | %USERPROFILE%\.switch\prod.keys |
Fix: Copy the file to your current working directory or to the .switch folder.