COMPARISONS · CODE SEARCH

ripgrep alternatives in 2026: faster and better grep tools compared

AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-12-03 · UPDATED · 2026-12-03
SHORT ANSWER · UPDATED 2026-12-03

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.

TOOL · FILTER

Find the ripgrep alternative that fits

I need

Sort by

ToolWhat it isBest forLatest releaseLicenceStars
ripgrepRecursive regex search that respects gitignore rules by default, with optional PCRE2 and compressed-file searchFast everyday search in one checkout16.0.0, 22 Nov 2026MIT or Unlicense70,721
ugrepgrep-compatible searcher with a query TUI, Boolean AND/OR/NOT patterns, fuzzy search, archives and PDF or Office search through filtersOne tool for code, archives and documentsv7.8.5, 15 Sep 2026BSD-3-Clause3,343
The Silver Searcher (ag)Code searching tool similar to ack with a focus on speed; reads .gitignore, .hgignore and .ignore filesMachines where ag is already installedNo GitHub releaseApache-2.027,124
ackgrep-like search tool for programmers searching large trees of source code, written in PerlAny system that runs PerlNo GitHub releaseArtistic License 2.0838
git grepSearches the tracked files of a Git working tree, built into GitRepos where only tracked files matterShips with GitGPL-2.0 (Git)Part of Git
GNU grepThe standard POSIX-style line searcher on most Linux systemsScripts that must run anywhereGNU project releasesGPL-3.0 or laterGNU project
ast-grepCLI for structural code search, lint and rewriting that matches syntax trees instead of textMatching code by syntax, then rewriting it0.51.3, 15 Nov 2026MIT16,856
ripgrep-all (rga)ripgrep wrapper that also searches PDFs, e-books, Office documents, SQLite and zip or tar.gz archivesPDFs and documents from the command linev0.10.10, 9 Nov 2025AGPL-3.09,960
XERJLocal search engine for AI agents that indexes code, docs, PDFs and logs, with BM25, vector and hybrid search over CLI and MCPAgents that search a large repo plus its docsv1.0.0-rc.105, 23 Nov 2026Apache-2.023,577

Stars, descriptions and latest releases from the public GitHub API on 3 Dec 2026. ag and ack publish no GitHub releases, so they sort by last push. git grep and GNU grep are not GitHub projects, so their stars cells say where they come from. ast-grep's MCP server is the separate ast-grep/ast-grep-mcp repository. Tick boxes to keep only the tools that do all of them; sort by stars, newest release or name.
PASTE THIS TO YOUR AI AGENT. IT DOES THE REST 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

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

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