PrettifyPrettify
DocsHome
Getting started
  • Getting started
Formats
  • JSON
  • JSONL and NDJSON
  • YAML
  • CSV and TSV
  • XML
  • RSS and Atom feeds
  • Mermaid
  • Markdown
  • MDX
  • HTML
  • SVG
Views
  • Views overview
  • Diagram view
  • Chart view
Queries
  • jq queries
  • SQL queries
  • XPath queries
Editing tools
  • Search and replace
  • Format conversion
  • Transforms
  • Type generation
  • JSON Schema validation
  • Diff and compare
  • Split view
Your documents
  • Tabs
  • History and versions
  • Sharing
  • Privacy and your data
Desktop app
  • Desktop app
  • Keyboard shortcuts
Pro
  • Prettify Pro
Help
  • Troubleshooting

Docs / Editing tools

Diff and compare

Last updated: October 29, 2026

Diff and Compare shows the differences between the open document and another document you paste. It highlights changes down to the word. Diff and Compare is a Pro feature in Prettify. Free users get one try per day.

Compare two documents

The open document is the first side. You supply the second side by pasting it.

  1. Load a document in the editor.
  2. Click Diff / Compare in the toolbar, under the Transform group.
  3. Paste the data to compare against the current document.
  4. Press Cmd+Enter (Mac) / Ctrl+Enter (Windows, Linux), or click Compare.

Prettify parses the pasted text with the current format. If the text does not parse, Prettify shows the error and does not compare. The result labels the two sides Current and Pasted.

Text diff and semantic diff

Prettify offers two diff modes.

  • Text: compares the two documents line by line. It is available for every format.
  • Semantic: compares the parsed data by structure. It is available for JSON and YAML.

Switch modes with the Text and Semantic buttons at the top of the diff.

Text diff

Text diff has two layouts.

  • Split shows the two documents side by side.
  • Unified shows one combined column.

Split is the default on wide screens; Unified is the default on a phone. Added and removed lines are colored, and changed words inside a line are highlighted. The header shows counts of added and removed lines.

Semantic diff

Semantic diff lists each change by its path, such as users[0].email. Object keys join with a dot and array positions are in brackets. It marks each entry as added, removed, or changed, and shows the old value next to the new value. Objects are compared without regard to key order, so a reordered object shows no change.

You can export a semantic diff as a JSON Patch (RFC 6902). Use the copy button, or download it as diff.patch.json. The patch writes each path as a JSON Pointer, such as /users/0/email.

Move between changes

Step through the changes with the navigation controls, or the keyboard.

  • Press Alt+Down, or n, for the next change.
  • Press Alt+Up, or p, for the previous change.

The header shows the active change, for example 2 of 7. Prettify shows No differences found when the two sides match.

Related

  • Split view to keep two documents open at once
  • History and versions
  • Prettify Pro

Try it online

Tool pages for this topic. Each one runs in your browser.

  • JSON Diff
PreviousJSON Schema validationNext Split view
On this page
  • Compare two documents
  • Text diff and semantic diff
  • Move between changes
  • Related
Prettify·Home·All docs·Contact·Changelog·Open app·llms.txtPermalink