# Existing tools/attempts for diffing SVG

**URL:** https://discourse.opensourcedesign.net/t/existing-tools-attempts-for-diffing-svg/763
**Category:** Summit
**Created:** [November 3, 2018, 8:14am UTC](https://discourse.opensourcedesign.net/t/existing-tools-attempts-for-diffing-svg/763 "2018-11-03T08:14:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cameralibre](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.opensourcedesign.net/cameralibre/32/82_2.png) [@cameralibre](https://discourse.opensourcedesign.net/u/cameralibre)
#### Post date: [November 3, 2018, 8:14am UTC](https://discourse.opensourcedesign.net/t/existing-tools-attempts-for-diffing-svg/763/1 "2018-11-03T08:14:40Z")

</div>

As mentioned in the Summit [Agenda outline](https://discourse.opensourcedesign.net/t/agenda-for-summit/761/2), 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 ‘📝 Edit’ button at the end)**:

## Imagemagick ‘compare’

[imagemagick.org/script/compare](https://www.imagemagick.org/script/compare.php)

\> 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](https://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.

## SVGO & SVGOMG

[github.com/svg/svgo](https://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…?

- Sara Soueidan’s [overview of SVGO tools](https://www.sarasoueidan.com/blog/svgo-tools/)

- Jake Archibald’s [SVGOMG](https://jakearchibald.github.io/svgomg/) - ‘SVGO’s Missing GUI’

 ![](https://canada1.discourse-cdn.com/flex029/uploads/opensourcedesign/original/1X/1889124c6bd60abf9e4f6a3c736b386ded44c436.png)

## diffsvg

[github.com/jrsmith3/diffsvg](https://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

[kactus.io](https://kactus.io/)

 ![](https://canada1.discourse-cdn.com/flex029/uploads/opensourcedesign/original/1X/9ba3e904281c5a174b60404a413383841f3be36e.png)

## Github/GitLab image viewing & diffing

[help.github.com/articles/rendering-and-diffing-images//](https://help.github.com/articles/rendering-and-diffing-images/)

### 2-up

 ![](https://canada1.discourse-cdn.com/flex029/uploads/opensourcedesign/original/1X/eeeb86e524c8cc4b94657247dd7c248a206c5258.jpeg)

### Swipe

 ![](https://canada1.discourse-cdn.com/flex029/uploads/opensourcedesign/original/1X/8e0a4f84571b0a32a0d166706ff77bc89a34d55d.jpeg)

### Onion Skin

 ![](https://canada1.discourse-cdn.com/flex029/uploads/opensourcedesign/original/1X/b73d5900a3988d02d12fc5dea09472941a7d447b.gif)

## Design with git (by @xuv)

[github.com/xuv/design-with-git](https://github.com/xuv/design-with-git) - _last commit Jul 2013_

In-depth write-up: [w.xuv.be/projects/design\_with\_git](http://w.xuv.be/projects/design_with_git)

Working example with multiple view methods: [xuv.github.io/design-with-git](http://xuv.github.io/design-with-git/)

 ![design-with-git](https://canada1.discourse-cdn.com/flex029/uploads/opensourcedesign/original/1X/aa15ec423b1b2c84b1aecda05b699168dac74bbe.png)

---

<div class="post-metadata">

### Author: ![xuv](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.opensourcedesign.net/xuv/32/124_2.png) [@xuv](https://discourse.opensourcedesign.net/u/xuv)
#### Post date: [November 4, 2018, 1:58pm UTC](https://discourse.opensourcedesign.net/t/existing-tools-attempts-for-diffing-svg/763/2 "2018-11-04T13:58:04Z")

</div>

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.
