Windows does not include a built-in unzip command like Linux or macOS, but you can extract ZIP files from the command line using PowerShell or third-party tools like 7-Zip. This guide shows how to do it reliably using only built-in Windows tools (PowerShell) and, as a fallback, a free, widely trusted open-source tool (7-Zip). No extra software is required if you use PowerShell, which is installed by default on all modern Windows 10 and 11 systems.

What You'll Need

  • A Windows 10 or Windows 11 computer (PowerShell 3.0+ is included by default)
  • The ZIP file you want to extract (e.g., archive.zip)
  • A target folder where you want the contents extracted (optional but recommended)

Step-by-Step

  1. Open PowerShell as Administrator (optional but avoids permission issues in protected folders):
    • Press Win + S, type powershell, right-click Windows PowerShell, and choose Run as administrator.
    • Click Yes on the User Account Control prompt if it appears.
  2. Navigate to the folder containing your ZIP file using cd:
    • Example: cd C:\Users\YourName\Downloads
    • Use dir to list files and confirm your ZIP file (e.g., archive.zip) is present.
  3. Run the extraction command with the built-in .NET Expand-Archive cmdlet:
    • Basic syntax: Expand-Archive -Path "archive.zip" -DestinationPath "C:\target\folder"
    • Replace archive.zip with your exact filename (include quotes if the path has spaces).
    • Replace C:\target\folder with the full path to where you want files extracted (e.g., "C:\ExtractedFiles").
    • Example: Expand-Archive -Path "C:\Users\YourName\Downloads\backup.zip" -DestinationPath "C:\Users\YourName\Desktop\backup"
  4. Press Enter to execute. No progress bar appears by default—wait for the prompt to return (usually seconds unless the ZIP is large).
  5. Verify extraction:
    • Open File Explorer to your destination folder and confirm files are present.
    • Or run dir in PowerShell in the destination folder to list contents.

Common Mistakes

  • Missing quotes around paths with spaces: C:\My Files\archive.zip fails unless quoted as "C:\My Files\archive.zip".
  • Typo in filename: PowerShell throws FileNotFound. Double-check the exact name (case-insensitive, but spelling must match).
  • Destination folder doesn’t exist: Expand-Archive will create the folder automatically *if* the parent path exists (e.g., C:\NewFolder works if C:\ exists), but avoid nested paths like C:\A\B\C unless A and B exist.
  • Running in Command Prompt (cmd.exe) instead of PowerShell: The unzip command does not exist in cmd.exe. Ensure you’re in PowerShell (look for PS C:\> at the prompt).
  • Overwriting without warning: Expand-Archive replaces existing files silently. Use the -Force parameter only if you intend to overwrite, but be aware it’s not needed for initial extraction.

Tips

  • Use -Verbose for details: Add -Verbose to see each file being extracted: Expand-Archive -Path "archive.zip" -DestinationPath "C:\out" -Verbose.
  • Create destination folder first: Run New-Item -ItemType Directory -Path "C:\Extracted" to ensure the folder exists and avoid issues.
  • Extract to current directory: Use -DestinationPath "." to extract into the current folder (e.g., cd C:\temp; Expand-Archive -Path "data.zip" -DestinationPath ".").
  • Check ZIP integrity first: Run Test-Archive "archive.zip" (PowerShell 6.0+ on newer Windows 11) or open the ZIP in File Explorer to verify it’s not corrupted before extracting.
  • Large files? Use -Update carefully: -Update only extracts newer files, but it’s slower. For full control, extract to a new folder each time.

Troubleshooting

  • Error: "The filename, directory name, or volume label syntax is incorrect"
    • Check for invisible characters (e.g., smart quotes from copied text). Type the path manually instead of pasting.
    • Ensure backslashes are \ (double backslash) or use forward slashes / (PowerShell accepts both).
  • Error: "The archive header is corrupted" or "Data is invalid"
    • The ZIP file is likely corrupted. Re-download or re-create it.
    • Try extracting with 7-Zip (free): Install 7-Zip, then run & "C:\Program Files\7-Zip\7z.exe" x "archive.zip" -o"C:\target".
  • Permission denied when extracting to system folders (e.g., C:\Program Files)
    • Run PowerShell as Administrator (Step 1 above).
    • Or extract to your user folder (e.g., \Desktop or \Documents).
  • Command runs but no files appear
    • Verify the destination path exists: Test-Path "C:\target" returns True or False.
    • Check for nested folders: Some ZIPs create a top-level folder (e.g., archive/), so look inside subfolders.
  • Still stuck? Try the GUI fallback
    • Right-click the ZIP file > Extract All... > follow prompts.
    • Or drag the ZIP into File Explorer and use Extract All from the ribbon.

Frequently Asked Questions

Does Windows have a native unzip command like Linux?

No—Windows does not include a command-line tool named unzip. However, PowerShell’s Expand-Archive cmdlet performs the same function reliably using built-in APIs.

Can I use unzip in Command Prompt (cmd.exe)?

Not natively. cmd.exe lacks built-in ZIP support. You must use PowerShell or install third-party tools like 7-Zip or WinRAR (which add 7z or unrar commands).

How do I extract a password-protected ZIP file via command line?

PowerShell’s Expand-Archive does not support passwords. Use 7-Zip: install it, then run & "C:\Program Files\7-Zip\7z.exe" x -p"yourpassword" "archive.zip" -o"C:\target". Replace yourpassword with the actual password.

What if my ZIP file is larger than 4 GB?

PowerShell handles large ZIPs (up to 4 GB per file inside) without issues. For ZIPs exceeding 4 GB total, ensure your destination drive uses NTFS (FAT32 has a 4 GB file-size limit). Expand-Archive works as long as the extracted content fits the drive’s format.

Can I extract multiple ZIP files at once?

Yes—use a loop in PowerShell: Get-ChildItem *.zip | ForEach-Object { Expand-Archive -Path $_.FullName -DestinationPath ("C:\Extracted\" + $_.BaseName) }. This extracts each ZIP into a subfolder named after the file.

Is Expand-Archive available on Windows 7?

Only if PowerShell 3.0+ is installed (Windows 7 SP1 with WMF 3.0+). Most users on Windows 7 use 7-Zip instead, as it’s more consistently available and supports older systems.