Feature guide macOSWindows

Compare SQLite schemas and rows without changing either database

Compare two SQLite databases by their schema and their rows: tables, columns, indexes, views, triggers, and the database's encoding, user_version, and application_id, each difference named. Rows are matched by primary key, or by rowid with a note, and listed as added, removed, or changed with each changed column's value on both sides. Both databases are opened read-only, so nothing is written beside them, and a table selector and an aligned row grid show the chosen table.

Capability overview

How can I use sqlite database comparison in Diff Anything?

Compare two SQLite databases by their schema and their rows: tables, columns, indexes, views, triggers, and the database's encoding, user_version, and application_id, each difference named. Rows are matched by primary key, or by rowid with a note, and listed as added, removed, or changed with each changed column's value on both sides. Both databases are opened read-only, so nothing is written beside them, and a table selector and an aligned row grid show the chosen table.

The free plan compares databases up to 5 MiB per side in the app. Pro removes that limit and adds SQLite comparison on the command line on Windows.

Diff Anything CSV comparison with row and cell changes highlighted
Review CSV rows and cell values in a purpose-built table with keyed-row options. View full size

Schema

Every schema change, named in words

Two SQLite databases, such as an app's database before and after a migration, are compared by their schema first: tables added or removed, columns added, removed, or changed in type, NOT NULL, or default, primary keys, WITHOUT ROWID, column order, indexes, views, triggers, and the database's encoding, user_version, and application_id. Each difference reads plainly, such as Table orders: column total changed type REAL → NUMERIC.

Files are recognised by the SQLite header, whatever their name, so a .db, .sqlite, .sqlite3, or .db3 file opens in SQLite mode.

Rows

Rows matched by primary key

The rows of each table both databases have are matched by primary key, or by rowid with a note, and listed as added, removed, or changed. A changed row names each changed column with both values, such as Table orders: row id = 5 changed: total 1.5 → 2.0. Values are compared as stored, so the integer 1 and the real 1.0 differ, and a BLOB is shown by its size and SHA-256.

A table selector lists the settings, tables, and views with their number of differences, and the chosen table shows its schema differences and then its rows in a grid lined up by column, with the key columns marked.

Read-only

Nothing is written beside the database

Each database is opened strictly read-only and immutable, so SQLite takes no locks and creates no journal or write-ahead log file beside it. An encrypted or damaged file is refused with a message naming the side. Changes that are still only in a write-ahead log beside the database are not seen, and a warning says so when there are any.

The first 1,000,000 rows of each table are compared, and the first 20,000 differences are listed with their values.

Free and Pro

What the free plan includes

The free plan compares databases up to 5 MB per side in the app, within 10 new comparison sessions a day. Pro removes the size limit and adds SQLite comparison on the command line, on Windows, where a database compared with an empty file, as Git passes for a new one, is compared byte by byte.

In the workflow

How to use it

  1. Open both databases

    Choose the two files; Auto recognises them by their SQLite header.

  2. Read the schema changes

    Start with tables, columns, and indexes that changed.

  3. Pick a table

    Use the table selector to see its changed rows with both values of each changed column.

  4. Record the outcome

    Mark differences Reviewed or add notes, and export a report with Pro.

Useful in practice

When to use it

Related manual

Choose the right comparison mode

Choose sources, understand automatic detection, and select the engine that answers the question you are actually asking.

Read the guide

Direct answers

Questions about sqlite database comparison.

Does comparing change my database?

No. Both databases are opened read-only and immutable, and nothing is written beside them.

How are rows matched?

By the primary key both tables declare, or by rowid with a note when there is none.

Can I compare an encrypted database?

No. An encrypted database does not have the SQLite header, so it is refused with a message that names the side.

Free & Pro: what’s included

Available on the Mac App Store and Microsoft Store. Free desktop use lets you try every comparison engine for files up to 5 MiB per side and 10 new comparison sessions per local day; collection previews show the first 100 items, binary comparisons the first 100 byte differences, and PDF previews the first 3 pages. Plain text, JSON, and Jupyter notebook comparison are complete, and opening files from Finder or File Explorer, diffanything:// links, and AppleScript are free. The free CLI supports text, JSON, and notebooks. A one-time Pro purchase removes the preview and session limits and unlocks larger sources within technical limits, saved profiles and history, saving folder snapshots, report export and printing, JSON Patch export, applying patches, three-way merge and conflict resolution, the Git merge driver and merge tool, folder synchronization, batch manifests, trusted preprocessors, and every CLI mode.

Next

See all Diff Anything capabilities.

Back to capabilities