Existing tools/attempts for diffing SVG

As mentioned in the Summit Agenda outline, I somewhat cruelly proposed that we continue the eternal painful search for a way to effectively diff SVG and integrate it into our workflows. Here’s a jumble of projects and approaches, please add more (this post is a wiki, use the ‘:memo: Edit’ button at the end):

Imagemagick ‘compare’


> Use the compare program to mathematically and visually annotate the difference between an image and its reconstruction.

Works on raster images, so requires conversion of SVG before diffing

GSVG - Git-friendly SVG

github.com/noahbrenner/gsvg - last commit Feb 2017

> Reformat SVG files to reduce git diff noise

The goal of GSVG is to create a consistent, deterministic formatting for SVG files. This is valuable no matter what SVG editor you use. The formatting that GSVG creates is modeled after Inkscape’s output, it just fixes some inconsistencies.


github.com/svg/svgo - last commit Oct 2018

> SVG Optimizer is a Nodejs-based tool for optimizing SVG vector graphics files.

This is intended for filesize optimization rather than normalization of an SVG’s structure. But maybe still useful…?


github.com/jrsmith3/diffsvg - last commit Jul 2013

A basic test of whether an element’s id exists in A.svg & B.svg, with changes pretty-printed to stdout.

Kactus for Sketch


Github/GitLab image viewing & diffing




Onion Skin

Design with git (by @xuv)

github.com/xuv/design-with-git - last commit Jul 2013

In-depth write-up: w.xuv.be/projects/design_with_git

Working example with multiple view methods: xuv.github.io/design-with-git

1 Like

I’m glad you bring this up and thanks for referencing Design with Git.
It’s something I’ve been searching for a long time. And since SVG is actually XML, we could expand the search in that direction. Finding XML diff tools would help… The solution I found in Design with Git was mostly a hack.
I need to look at my notes to surface more tools. In LGM in London, there was a person that their PhD on an XML diffing tool and we briefly exchanged.

1 Like