← Browse all tools

Go Back
Report Abuse

difftastic

Structural diff that understands syntax

Tool overview

difftastic is a command-line diff tool that compares files based on their syntax rather than line by line. It parses code with tree-sitter, so it recognises that an expression is unchanged when only its formatting or surrounding wrapper changes.

It ignores formatting changes, matches delimiters exactly and shows the real line numbers of both files instead of hunk headers. It supports many programming languages (including C++, C#, Go, Java, JavaScript, Kotlin, PHP, Python, Ruby, Rust and TypeScript) and file formats such as HTML, JSON, YAML and HCL, and can be configured as the diff tool of Git.

difftastic is written in Rust and is free and open source under the MIT licence.

Screenshots & video

Difftastic
Difftastic
Difftastic
Difftastic

Community reviews

Login to Write Your Review

There are no reviews yet.

Source & attribution

Original contributor
Jean-Baptiste CROUIGNEAU
External references
https://difftastic.wilfred.me.uk/
https://github.com/Wilfred/difftastic