> For AI agents: the complete Sanity documentation index is available at [https://www.sanity.io/docs/llms.txt](https://www.sanity.io/docs/llms.txt).

# Compare document versions

The document comparison view in Sanity Studio provides a side-by-side view of different document versions.

## Prerequisites

- [Sanity Studio](https://www.sanity.io/docs/studio/installation) v3.78.0 or later, which added the document comparison view.
- A document with at least two versions to compare, such as a draft and a published document.
- To compare a version that belongs to a release, [Content Releases](https://www.sanity.io/docs/user-guides/content-releases) must be enabled in your studio.

## Side-by-side comparison

Use the document comparison view to compare document versions. This includes drafts, published, and release versions. To get started, open a document in Sanity Studio that contains multiple document versions.

1. In the top right corner of the document view, click the **...** icon.
2. Select **Compare versions**.

![The document actions menu in Sanity Studio, opened from the top right of the document pane, with the Compare versions option in the list.](https://cdn.sanity.io/images/3do82whm/next/cdb7012fcd612207338ade2426a87d897c623d57-1474x896.jpg)
*Select Compare versions from the More options menu.*

The document comparison view opens over your studio window. It contains a version selector and two panels, one for each version you compare.

> [!WARNING]
> Gotcha
> This view only works when multiple document versions exist. If **Compare versions** is disabled, its tooltip reads "There are no other versions of this document to compare." — make a change to a draft or release version in addition to the published version.

![The document comparison view in Sanity Studio, with the Published version in the left panel and the Draft version in the right panel, and the Overview field differing between them.](https://cdn.sanity.io/images/3do82whm/next/4f834f0e91d3b28a0861c0fad7303e5d3808e982-2962x1710.png)
*The document comparison panel.*

Differences between the fields in the right version are highlighted in yellow. You may recognize this from other history or diff tools. In the screenshot, the **Overview** field has a yellow highlight along its edge to indicate changes.

You can adjust the compared versions with the version selector at the top of the window.

![The version selector at the top of the document comparison view, open and listing the Published and Draft options.](https://cdn.sanity.io/images/3do82whm/next/5c140b6852622c79f2e4a310db0f211b7729d910-1706x872.png)
*The version selector in the document comparison view.*

> [!TIP]
> Protip
> You cannot leave comments or tasks from within the comparison view. It's best to save major changes and workflows for the document view.

## Advanced Version Control

> [!WARNING]
> Experimental feature
> This functionality is likely to change as we improve and expand it. Let us know if you have any feedback.

Advanced Version Control adds inline diff annotations to fields, letting editors see how content has changed between versions while they work on it. This functionality is available for `string` fields and Portable Text fields.

![Screenshot of string field in Sanity Studio show diff annotation from "Fall Collection 2025" to "Autumn Collection 2025"](https://cdn.sanity.io/images/3do82whm/next/103c95376415df0aab808acad6a5847a803baa10-1320x240.png)

### Switching on Advanced Version Control

To switch on Advanced Version Control, set the `advancedVersionControl.enabled` configuration option to `true`. This feature can be switched on or off for different workspaces.

**sanity.config.ts**

```typescript
import {defineConfig} from 'sanity'

export default defineConfig({
  advancedVersionControl: {
    enabled: true,
  },
  // …
})
```

Editors must also switch on inline annotations per document. In the document's **Show more** menu (the **...** button in the top right of the document pane), select **Inline changes**. The setting persists as you navigate.



## Related changelog entries

Entries are listed newest first; each link points to the full entry as markdown. Follow one when you need to know what changed, when, or why — for example, to summarize recent updates, explain behavior that differs from older documentation, or check whether a fix has shipped.

- [Sanity Studio v4.11.0: Toggle inline changes in Studio UI and new function examples](https://www.sanity.io/docs/changelog/b12d7a20-3867-48b0-8f18-7edf3a2c6367.md) — October 21, 2025
- [Sanity Studio v4.10.0: Interface improvements and bug fixes](https://www.sanity.io/docs/changelog/9da46546-395c-47e1-8734-b6df2dcf5cea.md) — September 23, 2025
- [Sanity Studio v4.7.0: Custom actions for Content Releases, our first iteration of inline field diffs, bug fixes, and refinements](https://www.sanity.io/docs/changelog/5b62ace6-d0bf-44da-b862-fb17e04dfd2e.md) — September 9, 2025