---
description: >-
  The Gradient Diff Viewer is a visual diff tool targeted at developers to
  better visualize code changes within experiments.
---

# Diff Viewer

{% hint style="info" %}
**Note:** The diff viewer is currently only accessible in Experiments launched from [GradientCI](../../projects/gradientci-v2).  We are investigating how to incorporate the this feature into Experments launched from local and remote code repositories using the web UI, CLI, or SDK.&#x20;
{% endhint %}

### How it works

The diff view helps you compare files, directories, and version controlled projects within Gradient. It provides two-way comparison of both files to make understanding code changes easier.

![](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-M6W-P_ttBOL8en-eg2Z%2F-M6W-fekQBkBxDHHw7Ju%2FScreen%20Shot%202020-05-04%20at%202.40.34%20PM.png?alt=media\&token=d9af4d79-16bf-45ce-a702-486818917504)

### Toggle side-by-side view

The Gradient Diff Viewer supports both "**side-by-side**" and "**line-by-line**" visual representations. Toggle between the two with the toggle button as seen in the animation below:

![](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-M6W-P_ttBOL8en-eg2Z%2F-M6W-wEMfKvEnpP_zWcH%2F2020-05-04%2014.47.08.gif?alt=media\&token=cc46b5e4-2291-4f86-ad16-95b5b4a21c9b)
