Add OpenSSL to PATH on Windows
Make openssl available from any terminal. Choose per‑user (recommended) or system‑wide, then verify.
TL;DR: Add the OpenSSL
bin directory (e.g., C:\\Program Files\\OpenSSL-Win64\\bin) to your user PATH via Environment Variables, open a new terminal, and run openssl version.Option A — User PATH (recommended)
- Open Settings → System → About → Advanced system settings.
- Click Environment Variables….
- Under User variables, select Path → Edit → New.
- Add the OpenSSL
binfolder, e.g.:C:\\Program Files\\OpenSSL-Win64\\bin - Confirm all dialogs with OK, then open a new terminal (Command Prompt or PowerShell).
This affects only your user account. No admin rights needed.
Option B — System PATH (all users)
- Open Advanced system settings → Environment Variables….
- Under System variables, select Path → Edit → New.
- Add the same
binpath, e.g.:C:\\Program Files\\OpenSSL-Win64\\bin - Click OK to save. Open a new terminal.
Requires administrator rights. Be careful editing the system PATH.
Option C — Command line (User PATH)
Command Prompt:
setx PATH "%PATH%;C:\Program Files\OpenSSL-Win64\bin"
PowerShell:
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\OpenSSL-Win64\bin", "User")
Open a new terminal after running these commands. If PATH grows very long, prefer the GUI editor.
Verify it works
- Open a new Command Prompt or PowerShell window.
- Run
openssl version— it should print the version line. - Check the resolved path:
where openssl(cmd) orGet-Command openssl(PowerShell).
If you see DLL errors, go to Fix DLL Error. If the command is not found, recheck your PATH entries.
Troubleshooting tips
- New session required: Close and reopen your terminal to reload PATH.
- Path order matters: Ensure the OpenSSL
binentry appears before conflicting tools. - Architecture: Use the x64 build on x64 Windows. Mismatches may cause
libcrypto.dllerrors. - MSVC runtime: Install the Microsoft Visual C++ Redistributable if required.
- Still stuck? See Fix DLL Error for step‑by‑step fixes.