Setup guide

Add OpenSSL to PATH on Windows

After installing OpenSSL, add its bin folder to the Windows PATH so you can run openssl from any Command Prompt or PowerShell window. Three methods — choose one.

PATH changes only apply to new terminal windows. Always open a fresh Command Prompt or PowerShell after making changes, then test with openssl version.

User PATH via GUI (no admin needed)

  • 1

    Open Environment Variables

    Press Win+S, search Environment VariablesEdit the system environment variablesEnvironment Variables…

  • 2

    Edit User → Path

    Under User variables (top section): select PathEditNew.

  • 3

    Add the OpenSSL bin path

    path to add
    C:\Program Files\OpenSSL-Win64\bin

    Adjust if you chose a custom install folder. Click OK on all dialogs.

  • 4

    Open a new terminal and verify

    cmd.exe — new window
    C:\> openssl version
    OpenSSL 4.0.0 6 Jun 2025
    C:\> where openssl
    C:\Program Files\OpenSSL-Win64\bin\openssl.exe

System PATH via GUI (all users, admin required)

  • 1

    Open Environment Variables as admin

    Right-click Edit the system environment variablesRun as administratorEnvironment Variables…

  • 2

    Edit System → Path

    Under System variables (bottom section): select PathEditNew → add C:\Program Files\OpenSSL-Win64in.

Command line one-liner

Command Prompt:

cmd.exe
C:\> setx PATH "%PATH%;C:\Program Files\OpenSSL-Win64\bin"

PowerShell:

PowerShell
PS> [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\OpenSSL-Win64\bin", "User")
setx truncates PATH values longer than 1024 characters. If your PATH is long, use the GUI method instead.

Common problems

openssl is not recognized after adding to PATH
You are running the command in an old terminal window. Close all open Command Prompt / PowerShell windows and open a fresh one. Run where openssl to confirm Windows can find it.
openssl version shows an old version
Another OpenSSL installation is earlier in PATH. Run where openssl to see all resolved paths. Move the new installation's bin folder to the top of PATH in the Environment Variables editor.
setx truncated my PATH
setx has a 1024-character limit on PATH. Use the GUI method: Settings → System → Advanced system settings → Environment Variables → edit Path manually.
Still getting libcrypto.dll error after adding PATH
PATH is correct but the DLL runtime is missing or mismatched. See Fix libcrypto.dll.

Still seeing errors?

PATH set but OpenSSL still fails? Usually the VC++ Redistributable.

Fix libcrypto.dll →

Related guides