The fastest way: download the whole repository as a ZIP file
If you only need one folder from a GitHub repository, the simplest approach is to download the entire repository as a ZIP file, then extract just the folder you want. Go to the repository's main page, click the green Code button near the top right, and select Download ZIP. This downloads everything in one file.
Once the ZIP file lands on your computer, open it with your system's built-in archive tool (Windows Explorer on Windows, Finder on Mac, or your file manager on Linux). Navigate to the folder you need, copy it to wherever you want to keep it, and you're done. This method works regardless of what operating system you use or whether you have Git installed.
The downside: you download files you don't need, and if the repository is large, the ZIP file can be hundreds of megabytes or more. You also get a snapshot frozen at that moment — if the repository updates later, you won't see those changes unless you download again.
Key Takeaways
- The Code button on any GitHub repository page offers a Download ZIP option that requires no software beyond what your computer already has.
- If you only want one folder, download the ZIP, extract it, and copy out just the folder you need rather than keeping the entire repository.
- Using Git with the git clone command and sparse checkout lets you download only the folder you want, but requires Git to be installed first.
- Browser extensions and third-party download tools can automate folder downloads, but add a step and require you to trust an external service.
- If you plan to track changes or contribute back to the project, cloning the full repository is the right choice even if it means downloading extra files.
Using Git to download only the folder you need
If you have Git installed on your computer, you can use sparse checkout to download only one folder instead of the entire repository. This saves bandwidth and disk space, especially with large projects. Open your terminal or command prompt and run these commands in order, replacing the repository URL and folder path with your own:
git clone --no-checkout https://github.com/username/repository.git
cd repository
git sparse-checkout init --cone
git sparse-checkout set path/to/folder
git checkout
After these commands finish, you'll have only that one folder on your computer, along with Git's internal tracking files. The folder path must match exactly how it appears in the repository — if the folder is nested inside other folders, include the full path from the repository root.
This method is faster and cleaner than downloading a ZIP if you know exactly which folder you want. It also makes it easier to pull updates later if the repository changes. The tradeoff is that you need Git installed, and the commands are less forgiving if you make a typo in the folder path.
Downloading a single folder using browser extensions
Several browser extensions can download individual folders from GitHub without using Git or extracting ZIPs. GitZip and Refined GitHub are two popular options available for Chrome and Firefox. These extensions add a download icon next to folders in the GitHub interface — click it, and the folder downloads as a ZIP file automatically.
Extensions save you the step of downloading the entire repository and hunting through the ZIP file afterward. They work in your browser without needing any command-line knowledge. However, you're trusting the extension developer with access to the repositories you browse, and extensions sometimes break when GitHub updates its interface.
If you use an extension, check its permissions before installing and read recent reviews to see whether it still works reliably. Extensions are most useful if you download folders frequently and want to skip the manual steps, but they're not necessary for occasional downloads.
Third-party download services
Websites like DownGit and GitHub1s let you paste a GitHub folder URL and download it without installing anything. Visit the service's website, paste the link to the folder you want, and click download. The service generates a ZIP file and sends it to you.
These tools are convenient for one-off downloads and work on any computer with a web browser. They're also useful if you're on a shared computer where you can't install Git or browser extensions. The limitation is that you're sending your repository URL to an external service, so consider whether you're comfortable with that if the repository contains private or sensitive information.
Most of these services are free and maintained by volunteers, so they can sometimes be slow or temporarily unavailable. If you find yourself using them regularly, installing Git on your own computer is usually faster and more reliable in the long run.
When to clone the entire repository instead
If you plan to make changes to the code, contribute back to the project, or track updates over time, download the entire repository using git clone https://github.com/username/repository.git rather than just one folder. This gives you the full project history and makes it easy to push changes back to GitHub later.
Cloning the whole repository also makes sense if the folder you want depends on files in other parts of the project. Some folders contain configuration files or dependencies stored elsewhere, and downloading just the folder in isolation can leave you with broken code or missing pieces.
The only real cost of cloning everything is disk space and download time. For most projects, even large ones, this is measured in minutes and megabytes, not hours and gigabytes. If storage is genuinely tight, sparse checkout with Git is the middle ground — you get version control without downloading the entire project.
Troubleshooting common problems
If the ZIP download fails or seems stuck, try refreshing the GitHub page and clicking the Code button again. GitHub's servers occasionally have brief hiccups, and a fresh attempt usually works. If you're downloading a very large repository, the ZIP file can take several minutes to generate — wait at least five minutes before assuming it's broken.
If you're using sparse checkout and Git returns an error about the folder path, double-check the spelling and capitalization. GitHub folder names are case-sensitive on Mac and Linux, so src/Components is different from src/components. You can verify the exact path by looking at the repository's file browser on GitHub.
If a browser extension stops working after a GitHub update, check whether the extension has been updated recently. If not, the developer may have abandoned it — try a different extension or switch to the ZIP download method instead.
Frequently Asked Questions
Can I download a folder from a private repository?
Yes, but only if you have permission to access it. GitHub will ask you to log in before showing you the download option. If you're using Git or a third-party service, you'll need to authenticate with your GitHub credentials or use a personal access token.
What's the difference between downloading a folder and cloning a repository?
Downloading a folder gives you just the files, frozen at that moment. Cloning the repository gives you the full project history and Git's tracking system, so you can see changes over time and push updates back. Cloning takes more space but is more powerful if you plan to work with the code.
Will I get updates if the repository changes after I download?
No, not automatically. A downloaded folder is a snapshot. If you cloned with Git, you can run git pull later to fetch new changes. If you downloaded a ZIP, you'd need to download it again to see updates.
Do I need to install Git to download a folder from GitHub?
No. The ZIP download method works without any software beyond what your computer already has. Git is only needed if you want to use sparse checkout or if you plan to track changes and contribute back to the project.
Is it safe to use third-party download services?
Most popular services like DownGit are safe and widely used. However, you are sending your repository URL to an external server, so avoid them if the repository contains sensitive information. For private repositories, use Git or the GitHub ZIP download instead.