GitHub Codespaces
By GitHub
GitHub Codespaces is a cloud-hosted development environment service, built into GitHub, that provisions a full containerized machine, preconfigured for a repository, accessible through a browser-based or desktop version of Visual Studio…
Definition
GitHub Codespaces is a cloud-hosted development environment service, built into GitHub, that provisions a full containerized machine, preconfigured for a repository, accessible through a browser-based or desktop version of Visual Studio Code. It lets developers start coding on a project without installing a local toolchain, using compute and storage hosted by GitHub instead. A Codespace can also be configured with prebuilds that cache the container image ahead of time, and access is governed by the same permissions as the underlying GitHub repository.
Overview
GitHub Codespaces is a cloud-hosted development environment addressing the "works on my machine" problem and the friction of setting up a local toolchain before a contributor can start working on a repository, by provisioning a full containerized machine preconfigured for that specific project and accessible through Visual Studio Code. A Codespace is a container run on GitHub's cloud infrastructure, defined by a configuration typically stored in a `.devcontainer` folder within the repository itself, specifying the base image, installed tools, extensions, and startup commands; because that definition lives in the repository, every contributor who opens a Codespace for the project gets an identical, reproducible environment with the correct language versions and dependencies already installed, rather than following a manual setup guide that can drift out of date. Codespaces differ from StackBlitz's browser-native WebContainers in using real remote virtual machines rather than an in-browser runtime, which supports a much broader range of languages and system-level tools at the cost of needing to provision a container rather than starting instantly; compared to a purely local setup, the trade-off is billed compute time and network dependency in exchange for consistency and one-click access from any device. Teams use Codespaces to onboard new contributors with an instant, working environment, review and test pull requests without a local checkout, develop from lightweight devices such as tablets or Chromebooks that cannot run a project's full local toolchain, and keep environments consistent across a distributed team, launching a Codespace with one click directly from a repository or pull request. Billing is based on compute time while a Codespace is active plus storage for its persisted state, with configurable machine sizes and automatic idle shutdown to limit unnecessary charges, and because Codespaces is GitHub-native, it is only available for repositories hosted on GitHub itself, not on other platforms such as GitLab or Bitbucket, which is a hard constraint for teams hosted elsewhere. Prebuilds can be configured to build and cache a Codespace's container image ahead of time, reducing the wait when a contributor actually opens one for the first time. Because the underlying container is a standard Docker-based environment, the same devcontainer configuration used for Codespaces can often also drive a local VS Code Dev Container setup for developers who prefer working locally. Port forwarding automatically exposes a running application inside the Codespace to a temporary public or team-visible URL, which is useful for previewing a web application without a separate deployment. Access to a Codespace can be scoped by repository permissions, so the same access controls that govern a repository also govern who can create or connect to its Codespaces.
Key Features
- Cloud containers preconfigured via a repository's devcontainer file
- Browser and desktop Visual Studio Code interfaces to the same environment
- Reproducible, identical environments across every contributor
- One-click launch directly from a GitHub repository or pull request
- Configurable machine sizes for CPU- or memory-intensive projects
- Automatic idle shutdown to limit unnecessary compute billing
- Full compatibility with the standard VS Code extension ecosystem
Use Cases
Alternatives
Frequently Asked Questions
From the Blog
Best AI Tools for Developers in 2026
GitHub Copilot, Cursor, and more — the standout AI tools that developers are using daily in 2026.
Read More ProgrammingGit and GitHub for Beginners: A Complete Guide
Git tracks your code history; GitHub hosts it — learn the essential version control workflow every developer uses.
Read More ProgrammingGit and GitHub for Beginners: The Complete Guide
Git is the version control system used by virtually every software team on the planet. This beginner guide explains commits, branches, merges, and pull requests clearly, with the exact commands you'll use every day as a developer.
Read More Cloud & CybersecurityCI/CD Pipelines With GitHub Actions
GitHub Actions builds CI/CD pipelines with YAML workflows that automatically test, build, and deploy your code on every push — free for public repos and built into GitHub.
Read More