# 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 when: Choose 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](https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md)). On a 13 GB single file the README measured ripgrep at 1.042 s and GNU grep with Unicode at 6.577 s ([README](https://github.com/BurntSushi/ripgrep/blob/master/README.md)).

- Licence: GPL-3.0-or-later
- Official site: https://www.gnu.org/software/grep/
- Source: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md
- Checked: 25 November 2026

## git grep

Choose it over ripgrep when: Choose 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](https://git-scm.com/docs/git-grep)).

- Licence: GPL-2.0-only
- Official site: https://git-scm.com/docs/git-grep
- Source: https://git-scm.com/docs/git-grep
- Checked: 25 November 2026

## ugrep

Choose it over ripgrep when: Choose 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](https://github.com/Genivia/ugrep)). 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.

- Licence: BSD-3-Clause
- Official site: https://ugrep.com/
- Source: https://github.com/Genivia/ugrep
- Checked: 25 November 2026

## ast-grep

Choose it over ripgrep when: Use 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](https://ast-grep.github.io/guide/introduction.html)). Use it for refactors that a regex cannot express.

- Licence: MIT
- Official site: https://ast-grep.github.io/
- Source: https://ast-grep.github.io/guide/introduction.html
- Checked: 25 November 2026

- [ripgrep](https://www.devcurator.com/tools/ripgrep.md)
