Troubleshooting

Fix “openssl is not recognized” on Windows

The error “openssl is not recognized as an internal or external command” means Windows cannot find openssl.exe. The fix is almost always a PATH issue — either the bin folder is not on PATH, or you have not opened a new terminal after adding it.

This error always means openssl.exe is not on your Windows PATH. Even if OpenSSL is installed, Windows cannot run it unless the bin folder is in PATH.

Diagnose the problem first

cmd.exe — new window
# Step 1: check if openssl.exe exists on disk:
C:\> dir "C:\Program Files\OpenSSL-Win64\bin\openssl.exe"
# Step 2: check if PATH includes the bin folder:
C:\> echo %PATH%
# Look for "OpenSSL-Win64\bin" in the output
# Step 3: try to locate openssl in PATH:
C:\> where openssl
INFO: Could not find files for the given pattern(s).

If Step 1 fails — OpenSSL is not installed. If Step 1 passes but Step 3 fails — PATH is not set correctly.

OpenSSL is installed but bin not on PATH

Add C:\Program Files\OpenSSL-Win64in to your PATH. Three methods:

GUI method (permanent, no admin needed)

  • Press Win+S → search Environment VariablesEdit environment variables for your account.
  • Select PathEditNew → type C:\Program Files\OpenSSL-Win64in.
  • Click OK. Open a new terminal window and run openssl version.

Command line (permanent)

cmd.exe
C:\> setx PATH "%PATH%;C:\Program Files\OpenSSL-Win64\bin"
SUCCESS: Specified value was saved.
# Open a NEW terminal and test:
C:\> openssl version
OpenSSL 4.0.0 ...

Current session only (temporary)

cmd.exe
C:\> set PATH=%PATH%;C:\Program Files\OpenSSL-Win64\bin
C:\> openssl version
OpenSSL 4.0.0 ...

This works only in the current terminal window. Use setx or the GUI for a permanent fix.

Full step-by-step guide: Add OpenSSL to PATH.

PATH was added but terminal was not restarted

PATH changes only apply to new terminal windows. The terminal you added PATH in will not pick up the change.

Always close the current terminal and open a fresh Command Prompt or PowerShell after changing PATH.
cmd.exe — NEW window
C:\> openssl version
OpenSSL 4.0.0 6 Jun 2025

OpenSSL is not installed

If dir "C:\Program Files\OpenSSL-Win64in\openssl.exe" returns File Not Found, OpenSSL is not installed. Download and install the Win64 prebuilt:

Download Win64 installer →

After installing, follow the Add to PATH guide and then open a new terminal.

Multiple OpenSSL versions — wrong one in PATH

If where openssl returns a path but it is the wrong version (e.g. Git for Windows bundles an older OpenSSL):

cmd.exe
C:\> where openssl
C:\Program Files\Git\usr\bin\openssl.exe
C:\Program Files\OpenSSL-Win64\bin\openssl.exe

The first result wins. Move C:\Program Files\OpenSSL-Win64in before the Git bin in your PATH using the Environment Variables GUI. Drag it to the top of the list.

Common questions

I added PATH but still get "not recognized"
You are running the command in the same terminal window that was open before you added PATH. Close it and open a new one. PATH changes are only picked up by new process instances.
Works in cmd.exe but not PowerShell (or vice versa)
Both shells read from the same User PATH. If it works in one but not the other, the terminal that fails was opened before the PATH change. Open a new window for the failing shell.
openssl command exists but shows old version
Run where openssl to see which binary Windows is resolving. If it points to Git, Cygwin or another bundled copy, reorder PATH so the OpenSSL-Win64 bin folder comes first.

Full PATH setup guide

Step-by-step instructions for all three methods of adding OpenSSL to PATH.

Add to PATH →

Related guides