Standard version control tools typically treat changes at the line level; if one character in a 100-character line changes, the entire line is marked as replaced. OmniDiff aims to solve this by providing "content-aware" diffing. Developed in Rust, it uses specialized algorithms based on the type of file being compared to identify exactly what shifted. For example, when comparing source code, it can distinguish between a simple variable rename and a complex logic change, highlighting only the relevant fragments rather than redrawing whole blocks of text.

A side-by-side comparison animation showing GNU diff marking whole lines as changed versus OmniDiff highlighting only specific code fragments.
An animation comparing standard line-based diffing with OmniDiff's content-aware approach on a Python refactoring.github.com

The animation demonstrates how OmniDiff identifies specific logic changes and moved variables rather than redrawing entire blocks of text.

The tool achieves its accuracy by integrating with Tree-sitter grammars for structural analysis of many programming languages, including C++, Go, Java, Python, and Rust. Beyond source code, OmniDiff handles binary formats by analyzing their internal structures. It can provide pixel-by-pixel comparisons for pictures (PNG, JPEG), glyph-by-glyph comparisons for web fonts (WOFF2, TrueType), and page-by-page breakdowns for PDF documents. According to the developer's benchmarks conducted on a laptop with an Intel Core i7 processor, the tool maintains high performance, achieving median diff times under 100ms across over 2,300 test fixtures.

An animation showing OmniDiff identifying 21 changed glyphs in a Font Awesome web font file.
OmniDiff provides glyph-by-glyph comparisons for web fonts, identifying specific changes that standard tools miss.github.com

This visual illustrates the tool's ability to handle binary formats like WOFF2 by analyzing internal structures.

An animation showing OmniDiff identifying metadata and page-level changes in a PDF document.
OmniDiff provides page-by-page breakdowns for PDF documents, highlighting specific modified elements.github.com

This demonstrates the tool's capability to provide structural analysis for PDF documents beyond simple binary flags.

OmniDiff integrates directly into common version control workflows like Git and Jujutsu (jj) as both a `difftool` backend and a formatter. While it offers a terminal user interface (TUI) that supports 24-bit color and graphics protocols like Kitty or Sixel, it also provides headless modes for CI/CD pipelines and JSON output for programmatic use. A notable trade-off exists in its licensing: while released under the GNU Affero General Public License (AGPL) to encourage open collaboration, this may present hurdles for some enterprise users who prefer more permissive licenses like BSD or MIT. Consequently, the project offers a commercial license tier for organizations seeking to avoid AGPL’s source-disclosure requirements.

A screenshot of the OmniDiff terminal user interface showing a two-panel view of a Python refactoring.
The OmniDiff terminal user interface (TUI) highlights specific code changes in a light theme.github.com

The screenshot showcases the terminal user interface which supports 24-bit color and graphics protocols.