ripgrep alternatives in 2026: faster and better grep tools compared
What are the best ripgrep alternatives in 2026? For a query TUI, fuzzy search, archives and PDFs in one tool, ugrep. For a familiar speed-focused code search, The Silver Searcher. For Perl-only systems, ack. For tracked files only, git grep. For portable scripts, GNU grep. For matching code by syntax, ast-grep. For PDFs and Office files, ripgrep-all. For an index your AI agent can query over MCP, XERJ.
Key number: ripgrep has 70,721 GitHub stars and its latest release is 16.0.0, 22 Nov 2026. In the ripgrep README benchmark on the Linux kernel source, ripgrep took 0.082s, git grep with PCRE 0.273s, ag 0.443s, ugrep 0.639s and ack 2.935s.
Stars, descriptions and latest releases from the public GitHub API on 3 Dec 2026. Licences from each LICENSE file and features from each README the same day. Benchmark figures are quoted from the ripgrep and ugrep READMEs; XERJ ran no new benchmark for this page.
TL;DR ripgrep recursively searches directories for a regex pattern and respects gitignore rules by default. It is one of the fastest grep tools, which is why people searching for something faster or better usually want a feature rather than raw speed: a query TUI, fuzzy matching, search inside PDFs and archives, matching by syntax tree, or an index an AI agent can call. Use the filter below to keep only the tools that match what you need.
Find the ripgrep alternative that fits
Sort by
| Tool | What it is | Best for | Latest release | Licence | Stars |
|---|---|---|---|---|---|
| ripgrep | Recursive regex search that respects gitignore rules by default, with optional PCRE2 and compressed-file search | Fast everyday search in one checkout | 16.0.0, 22 Nov 2026 | MIT or Unlicense | 70,721 |
| ugrep | grep-compatible searcher with a query TUI, Boolean AND/OR/NOT patterns, fuzzy search, archives and PDF or Office search through filters | One tool for code, archives and documents | v7.8.5, 15 Sep 2026 | BSD-3-Clause | 3,343 |
| The Silver Searcher (ag) | Code searching tool similar to ack with a focus on speed; reads .gitignore, .hgignore and .ignore files | Machines where ag is already installed | No GitHub release | Apache-2.0 | 27,124 |
| ack | grep-like search tool for programmers searching large trees of source code, written in Perl | Any system that runs Perl | No GitHub release | Artistic License 2.0 | 838 |
| git grep | Searches the tracked files of a Git working tree, built into Git | Repos where only tracked files matter | Ships with Git | GPL-2.0 (Git) | Part of Git |
| GNU grep | The standard POSIX-style line searcher on most Linux systems | Scripts that must run anywhere | GNU project releases | GPL-3.0 or later | GNU project |
| ast-grep | CLI for structural code search, lint and rewriting that matches syntax trees instead of text | Matching code by syntax, then rewriting it | 0.51.3, 15 Nov 2026 | MIT | 16,856 |
| ripgrep-all (rga) | ripgrep wrapper that also searches PDFs, e-books, Office documents, SQLite and zip or tar.gz archives | PDFs and documents from the command line | v0.10.10, 9 Nov 2025 | AGPL-3.0 | 9,960 |
| XERJ | Local search engine for AI agents that indexes code, docs, PDFs and logs, with BM25, vector and hybrid search over CLI and MCP | Agents that search a large repo plus its docs | v1.0.0-rc.105, 23 Nov 2026 | Apache-2.0 | 23,577 |
Read https://xerj.org/compare/ripgrep-alternatives-2026.md. Ask me what I search (code, PDFs, archives or logs), how big the repo is, whether an AI agent will run the searches, and which OS I use, then tell me which ripgrep alternative fits and give me the install and first search commands.
Pick one in ten seconds
- A query TUI, Boolean patterns, fuzzy search, archives and PDFs in one tool: ugrep.
- A speed-focused code searcher many machines already have: The Silver Searcher.
- A search tool on any system that runs Perl: ack.
- Only the files Git tracks, with nothing to install: git grep.
- Scripts that must run on any Linux box: GNU grep.
- Matching and rewriting code by syntax tree: ast-grep.
- PDFs, e-books and Office files from the command line: ripgrep-all.
- A persistent index over code, docs and PDFs that agents query over MCP: XERJ.
Is there anything faster than ripgrep?
Each project publishes its own benchmarks. The ripgrep README searches the Linux kernel source for [A-Z]+_SUSPEND on an Intel i9-12900K: ripgrep finished in 0.082s, git grep with PCRE in 0.273s, The Silver Searcher in 0.443s, ugrep in 0.639s and ack in 2.935s. The ugrep README links its own benchmark repository and says ugrep is typically faster than rg, ag and GNU grep. Speed depends on the pattern, the files and the cache, so time both on your own repo with hyperfine before you switch. An index changes the picture for repeated searches: a tool that keeps one, such as XERJ, answers from the index instead of reading every file again.
ripgrep vs ugrep
ugrep is BSD-3-Clause with 3,343 stars and a latest release of v7.8.5, 15 Sep 2026. It keeps grep-compatible options and adds a query TUI (-Q), Google-like Boolean patterns, fuzzy search within a Levenshtein distance, search inside nested zip, 7z and tar archives, and PDF and Office search through filters with ug+. ripgrep (70,721 stars, 16.0.0, 22 Nov 2026) respects gitignore by default, offers PCRE2 with -P, and searches brotli, bzip2, gzip, lz4, lzma, xz and zstd files with -z. Pick ugrep for features in one binary and ripgrep for a fast, focused default.
ripgrep vs The Silver Searcher and ack
The Silver Searcher (Apache-2.0, 27,124 stars) is a code searcher similar to ack with a focus on speed. It reads .gitignore, .hgignore and .ignore files and searches files in parallel with pthreads. ack (Artistic License 2.0) is a Perl tool built for programmers searching large source trees, and it runs anywhere Perl runs. Neither publishes GitHub releases; both remain easy to install from package managers.
ripgrep vs git grep and GNU grep
git grep ships with Git and searches the tracked files of a working tree, so untracked build output never shows up. GNU grep is the standard line searcher on Linux and the safest choice for scripts that must run on any machine. Both are great defaults when you cannot install anything new.
ripgrep vs ast-grep and ripgrep-all
ast-grep (MIT, 16,856 stars, 0.51.3, 15 Nov 2026) matches code by syntax tree, so a pattern finds every call of a function however it is formatted, and it can rewrite the matches. ripgrep-all (AGPL-3.0, 9,960 stars, v0.10.10, 9 Nov 2025) wraps ripgrep and adds adapters for PDFs, e-books, Office documents, SQLite and archives. For a side by side of the first two, see ast-grep vs ripgrep vs ugrep.
XERJ: a new way for AI to search for data
ripgrep reads files on every search. XERJ builds an index once over code, docs, PDFs and logs, then answers with BM25, vector or hybrid search and returns cited passages to agents over CLI and MCP. Its vector search uses lexical feature hashing by default, and --embed-mode neural loads all-MiniLM-L6-v2. It is Apache 2.0 with 23,577 GitHub stars and its latest release is v1.0.0-rc.105, 23 Nov 2026. xerj mcp --http serves Streamable HTTP at http://127.0.0.1:9330/mcp, read-only unless you pass --allow-writes. A non-loopback bind needs XERJ_MCP_TOKEN. Keep ripgrep for quick human searches and give your agent XERJ for repeated searches across a large repo and its documents. See grep alternatives for AI coding agents 2026 and XERJ vs ripgrep for code agents.
Read next
- ast-grep vs ripgrep vs ugrep
- Grep alternatives for AI coding agents 2026
- XERJ vs ripgrep-all
- Zoekt alternatives 2026
- grep.app alternatives 2026
FAQ
What is the best ripgrep alternative in 2026?
It depends on the job. ugrep fits a TUI, fuzzy search, archives and PDFs in one tool. The Silver Searcher and ack fit familiar code search. git grep fits tracked files only. GNU grep fits portable scripts. ast-grep fits matching by syntax. ripgrep-all fits PDFs and Office files. XERJ fits an index that AI agents query over MCP.
Is there a grep faster than ripgrep?
In the ripgrep README benchmark on the Linux kernel source, ripgrep was fastest at 0.082s. The ugrep README links its own benchmarks and says ugrep is typically faster than rg, ag and GNU grep. Results depend on the pattern and files, so time both on your own repo.
Can ripgrep search PDFs?
Not by itself. ripgrep-all wraps ripgrep with adapters for PDFs, e-books and Office files, ugrep searches PDFs through filters with ug+, and XERJ indexes PDFs for search.
Is ripgrep open source?
Yes. ripgrep is dual licensed under MIT or the Unlicense, with 70,721 GitHub stars on 3 Dec 2026. Its latest release is 16.0.0, 22 Nov 2026.
How was this page checked?
Stars, descriptions and latest releases came from the public GitHub API on 3 Dec 2026. Licences came from each LICENSE file and features from each README. Benchmark figures are quoted from the ripgrep and ugrep READMEs.
Evidence
- BurntSushi/ripgrep: 70,721 stars, MIT or Unlicense, 16.0.0, 22 Nov 2026. Benchmark table in the README: Linux kernel source, Intel i9-12900K.
- Genivia/ugrep: 3,343 stars, BSD-3-Clause, v7.8.5, 15 Sep 2026. Benchmarks: Genivia/ugrep-benchmarks.
- ggreer/the_silver_searcher: 27,124 stars, Apache-2.0, no GitHub releases.
- beyondgrep/ack3: 838 stars, Artistic License 2.0 (LICENSE.md), no GitHub releases.
- git grep documentation and GNU grep.
- ast-grep/ast-grep: 16,856 stars, MIT, 0.51.3, 15 Nov 2026. MCP server: ast-grep/ast-grep-mcp.
- phiresky/ripgrep-all: 9,960 stars, AGPL-3.0 (LICENSE.md), v0.10.10, 9 Nov 2025.
- xerj-org/xerj: 23,577 stars, Apache-2.0, v1.0.0-rc.105, 23 Nov 2026.