ripgrep alternatives

The closest alternatives to ripgrep are GNU grep, git grep and ugrep. Stay with ripgrep when: Searching code in large repositories from the terminal.

GNU grep

Choose it over ripgrep whenChoose it when you need the ubiquitous POSIX tool. Skipping ignored files takes hand-written --exclude rules, and on a 13 GB single file the ripgrep README measured GNU grep with Unicode at 6.577 s against ripgrep's 1.042 s.

GNU grep: ubiquitous and POSIX, but skipping ignored files takes hand-written --exclude rules (FAQ). On a 13 GB single file the README measured ripgrep at 1.042 s and GNU grep with Unicode at 6.577 s (README).

GPL-3.0-or-later

gnu.org ↗Source ↗Checked 25 November 2026

git grep

Choose it over ripgrep whenChoose it to search tracked files in the work tree, blobs in the index or blobs in given trees. Untracked files are missed unless you pass --untracked.

git grep: searches tracked files in the work tree, blobs in the index or blobs in given trees, so untracked files are missed unless you pass --untracked (git-grep).

GPL-2.0-only

git-scm.com ↗Source ↗Checked 25 November 2026

ugrep

Choose it over ripgrep whenChoose it for a drop-in replacement for GNU and BSD grep with an interactive query TUI (-Q), archive and PDF search and an optional indexer. The two READMEs disagree on speed, so time both on your own corpus.

ugrep: a drop-in for GNU and BSD grep with an interactive query TUI (-Q), archive and PDF search and an optional indexer (ugrep README). The two READMEs disagree on speed: ripgrep's table has ugrep slower, and ugrep's states it is typically faster than rg. Time both on your own corpus.

BSD-3-Clause

ugrep.com ↗Source ↗Checked 25 November 2026

ast-grep

Choose it over ripgrep whenUse it for refactors that a regex cannot express: it matches syntax trees instead of text, and can lint and rewrite code.

ast-grep: matches syntax trees instead of text, and can lint and rewrite code (ast-grep). Use it for refactors that a regex cannot express.

MIT

ast-grep.github.io ↗Source ↗Checked 25 November 2026