jq Command Not Found on Windows? How to Fix It
In this article
The short answer: Windows does not ship with jq, so the shell has nothing to run. To fix "jq: command not found" (or "'jq' is not recognized as an internal or external command" in Command Prompt), download the official Windows binary from the jq project's release page, rename it to jq.exe, put it in a folder, and add that folder to your user PATH. Close and reopen your terminal, then run jq --version. The steps below cover the download, the PATH edit in the Windows Settings app, and the usual reasons it still fails afterwards.
What You'll Need
- A 64-bit or 32-bit Windows PC (check under Settings > System > About if unsure).
- Permission to change your own user environment variables (a standard account is fine; you do not need administrator rights for a per-user PATH entry).
- A terminal: PowerShell, Command Prompt, or Windows Terminal. The steps work in all three.
- About five minutes and a folder where you keep small command-line tools, for example
C:\Tools\jq.
Step-by-Step
- Confirm the error and your shell. Open PowerShell or Command Prompt and type
jq --version. If you see "not recognized" or "command not found", jq is either missing or not on your PATH. Note which terminal you are in, because the PATH refresh step differs slightly between them. - Download the official Windows build. Go to the jq project's GitHub releases page (the repository is
jqlang/jq) and find the latest release. Under its assets, download the Windows executable. The project publishes files named likejq-windows-amd64.exefor 64-bit Intel/AMD machines andjq-windows-i386.exefor 32-bit. Pick the one that matches your PC. Do not download jq from third-party "portable app" sites; use the official release assets. - Create a tools folder. In File Explorer, create a folder such as
C:\Tools\jq. Keeping command-line tools in one predictable place makes PATH maintenance easier later. - Rename the file to
jq.exe. Move the downloaded file into that folder and rename it. The name matters: Windows resolves the commandjqby looking forjq.exe, so a file still calledjq-windows-amd64.exewill not be found. If Explorer hides extensions, turn on View > File name extensions first so you do not accidentally createjq.exe.exe. - Open the environment variables editor. Press the Windows key, type environment variables, and choose "Edit the system environment variables" (or "Edit environment variables for your account"). In the dialog, click Environment Variables…. Menu labels can differ slightly by Windows version and region, so look for the entry with that wording.
- Edit your user Path. In the top half of the dialog (User variables), select Path and click Edit…. Click New and type the folder path only, for example
C:\Tools\jq. Do not include the file name. Click OK on each dialog to save. Editing the user Path avoids needing administrator rights and keeps the change scoped to your account. - Restart the terminal. Close every PowerShell, Command Prompt, and Windows Terminal window, then open a fresh one. Existing windows keep the old environment, which is the single most common reason people think the PATH edit failed.
- Verify. Run
jq --version. You should see a version string. Then test a real filter:echo {\"a\":1} | jq .ain PowerShell, orecho {\"a\":1} | jq \".a\"in Command Prompt. The output should be1. Quoting rules differ between PowerShell and Command Prompt, so if one form errors, try the other.
Common Mistakes
- Adding the file to PATH instead of the folder. PATH entries are directories. Pointing at
C:\Tools\jq\jq.exewill not work. - Forgetting to rename the download. The release asset name is not
jq.exeuntil you rename it. - Not reopening the terminal. Environment changes are read at process start; old windows never see the new Path.
- Editing the system Path by mistake. It works, but it needs administrator rights and affects every account. The user Path is simpler for a single-machine tool.
- Copying a path with quotes or a trailing backslash. Paste the plain folder path, with no quotation marks.
- Mixing shells mid-test. If you added the folder while one terminal was open, testing in that same window will still fail even though the setup is correct.
Tips
- Keep all portable CLI tools in one folder, such as
C:\Tools, and add subfolders to PATH as needed. It keeps your environment tidy and easy to audit. - Use
where.exe jqin Command Prompt orGet-Command jqin PowerShell to see exactly which file Windows resolves. This quickly reveals a stale or duplicate entry. - If you use a package manager you already trust, such as winget or Chocolatey, installing jq through it can place the binary and PATH entry for you. Confirm the package is the official jq project before installing.
- Prefer Windows Terminal for jq work. Its tabbed sessions and better Unicode handling make JSON output easier to read than the legacy console.
- When piping JSON from another command, remember PowerShell's quoting and escaping rules differ from Command Prompt and from bash examples you find online. Adjust quotes rather than assuming the example is wrong.
Troubleshooting
If jq --version still says the command is not found after reopening the terminal, work through these checks in order.
- Check the file exists and is named correctly. Open
C:\Tools\jqin Explorer with file name extensions visible. You should see exactlyjq.exe, notjq.exe.txtand not the original download name. - Check the Path entry. Reopen the Environment Variables dialog and confirm the folder appears in your user Path, spelled exactly as on disk. A typo in the folder name is silent and fatal.
- Run it by full path. In a new terminal, run
C:\Tools\jq\jq.exe --version. If that works, the binary is fine and the problem is purely the PATH entry. - Look for duplicates and shadowing. Run
where.exe jq(Command Prompt) orGet-Command jq -All(PowerShell). If an earlier entry points to a missing or broken file, remove or fix it. - Try a different terminal. If PowerShell works but Command Prompt does not, you likely have separate environments or a profile script interfering. Test in a clean shell.
- Check the download itself. If running by full path gives an error about the file being invalid or blocked, re-download from the official release page. Files downloaded from the internet can be marked as blocked; right-click the file, open Properties, and if an Unblock option is shown, use it.
- Last resort: reinstall cleanly. Delete the folder entry from PATH, remove the file, and repeat the steps from the download. This clears half-finished edits without touching anything else on your system.
Frequently Asked Questions
Why is jq not included with Windows?
jq is a separate open-source command-line tool, not a Windows component. Windows ships with PowerShell and its own JSON cmdlets, so jq has to be installed and added to PATH yourself.
Do I need administrator rights to install jq?
No, if you add the folder to your user Path. Administrator rights are only needed if you choose to edit the system-wide Path or install into a protected folder such as C:\Program Files.
Why does jq work in one terminal but not another?
Each terminal process reads environment variables when it starts. A window opened before the PATH change keeps the old value. Close it and open a new one; if the problem persists, check for shell profiles that override Path.
Can I use jq inside PowerShell scripts?
Yes. Once jq.exe is on PATH, PowerShell can call it like any other executable. Watch the quoting: PowerShell parses quotes before jq sees them, so complex filters are often easier to place in a file and pass with -f.
Does the jq version matter for my scripts?
Filters that use newer built-ins may fail on older releases. If a filter errors unexpectedly, check jq --version and compare against the jq manual for the feature you are using.
Is there a built-in Windows alternative to jq?
PowerShell includes ConvertFrom-Json and ConvertTo-Json, which handle many simple tasks. They are not drop-in replacements for jq's filter language, so scripts written for jq syntax still need jq.