Universal Code Search

Move fast, even in big codebases.

Find and fix things across all of your code faster with Sourcegraph. Onboard to a new codebase, make large-scale refactors, increase efficiency, address security risks, root-cause incidents, and more.

Searching for code in the Sourcegraph search barCode results from a code search, including code coverage states

Our customers use Sourcegraph every day to build software you rely on.


Search your code. All of it.

Point Sourcegraph at the repositories you work with, stored in any code host — then start searching. Stay in flow and find your answer quickly with smart filters such as Non-test files, lang:java, repo:frontend, and more. Stop grep'ing your stale local clones and fighting with your code host's search to match “special” characters like .:=().

Code search across multiple code hosts, including GitHub, GitLab, BitBucket, and Azure

Works with your code, infrastructure, and tools

All your repositories

  • GitHub
  • GitHub Enterprise
  • GitLab
  • Bitbucket Server
  • Bitbucket Cloud
  • Phabricator
  • AWS CodeCommit
  • Azure DevOps
  • Perforce
  • Mercurial
  • Subversion
  • CVS
  • TFS
  • Gitea
  • Gerrit
  • cgit
  • Ridiculously big monorepos
  • 500,000+ repositories
  • Any combo of these
  • Have a repository not covered here?

All your languages

  • Java
  • Python
  • Go
  • JavaScript
  • TypeScript
  • C#
  • C
  • C++
  • Swift
  • Objective-C
  • Kotlin
  • Ruby
  • Scala
  • Rust
  • Perl
  • Dart
  • Erlang
  • COBOL
  • Clojure
  • Lisp
  • Shell
  • Terraform
  • Lua
  • GraphQL
  • Thrift
  • Protobuf
  • YAML
  • JSON
  • Jsonnet
  • R
  • PHP
  • Elixir
  • Haskell
  • PowerShell
  • OCaml
  • CUDA
  • Pascal
  • Verilog
  • VHDL
  • Groovy
  • Tcl
  • Need a different language?

All your tools

Deployment options

  • Who? Self-hosted (you) Managed by us
  • Where? AWS Google Cloud Azure
  • Other infra
  • What? Docker container Kubernetes cluster
  • Custom cluster
  • Learn about deploying Sourcegraph

How developers use Sourcegraph

Sourcegraph is built by developers for developers, to help them solve the big code problems they face, all day every day. Here's how they're doing it.

Want to use Sourcegraph at work?

Use it free for up to 10 developers. To get your company to upgrade to a paid plan, see the customers page (to make the case). Or schedule time with us for help.

Find anything in code, fast

Sourcegraph returns results in milliseconds, even across thousands of repositories, like:

Write queries with regex, punctuation, symbols, and advanced syntax-aware pattern matching. Sourcegraph’s visual and interactive query builder constructs complex queries to find and filter code in ways IDEs and code hosts can’t.

Navigate code, with definitions and references

Find definitions, references, usage examples, and anything else in code, across package, dependency, and repository boundaries. You can navigate code in your web browser in any repository on any branch, instantly and without losing your local context.

Make large-scale code changes

Remove legacy code, fix critical security issues, and pay down tech debt. Run campaigns to compute diffs and create branches and pull requests across multiple repositories. With Sourcegraph, teams move fast and fix things, safely.

Generate code insights [preview]

Aggregate data from connected external services, and enhance it with code intelligence to give you the information you care about. Take direct actions on these insights with campaigns, like proposing an automated refactor to fix a problem detected through static analysis.

Get started with Sourcegraph for free

Search your own code

Quickstart: Run this to launch Sourcegraph locally:

docker run
--publish 7080:7080 --publish 127.0.0.1:3370:3370 --rm
--volume ~/.sourcegraph/config:/etc/sourcegraph
--volume ~/.sourcegraph/data:/var/opt/sourcegraph
sourcegraph/server:3.21.2

Deploy to a server or cluster

See deployment documentation for information about Docker deployments, Kubernetes clusters, and other clusters.

Want help?