Help:Diff

A diff shows the differences between two versions of a page. They allow readers and editors to see the changes made in an edit, or the cumulative changes of multiple edits to a page. Diffs can be accessed through the page history, user contributions, recent changes, and watchlists. You can also view a diff of the changes you've made while editing by clicking on the '' button.

Accessing diffs

 * From the page history: To view the changes made in a single edit, click on the prev button next to that edit. This will show you the changes made in that edit in comparison to the one immediately before it. To view all cumulative changes made between an older edit and the current revision of the page, click on the cur button next to the older edit. To view the cumulative changes made between any two revisions, first click on the radio button on the left column next to the older edit you want to compare, and then click on the radio button in the second column next to the newer edit. Then, click on .
 * From user contributions, watchlists and recent changes: Click on the diff button next to the edit you want to view. This will show you the changes made in that edit in comparison to the one immediately before it. The button will be greyed out if there is no previous edit to compare the edit with.

How it looks
When you view a diff, the older version is shown on the left, while the newer version is shown on the right. The time, date, and editor of each version is shown above the diff.

Explanation of colors
Paragraphs that have changed will have a colored border, with the older revision having an orange border and the newer revision having a blue border. Inserted, modified, and removed text is highlighted with the border color and bolded. If entire paragraphs were inserted or removed, no highlighting or bolding will be applied and the other side will appear blank. Unchanged text will have a grey background. To avoid redundancy, only the unchanged text before and after the changed text will be shown.

First row
By default, the most recent revision (the one on the right) is rendered and shown below the diff. To view the older revision (the one on the left), click on the "Revision as of date" link above the diff on the left. This will provide you with a permanent link to that revision of the page.

Clicking "edit" will take you to the editing window with the contents of that particular revision. You may be warned that you are editing an out-of-date revision. If you save your edits here, you will revert all the changes made since that revision (they will still appear in the page history if you do this).

Clicking "undo" will undo that specific edit. This will revert the changes made in that edit without affecting the changes done in other edits, if possible.

The "thank" button will only appear if you are logged in and the other user is a registered user. This sends them a short "Thank you" notification as an appreciation for their work.

Second row
The username or IP address of the editor will be shown, along with a "talk" and "contribs" link. If the editor is a registered user, clicking on their username will take you to their userpage, and clicking on the "talk" and "contribs" links will take you to their user talk page and user contributions, respectively. If the editor is not registered, their IP address will be displayed, and clicking on their IP address will take you to their user contributions.

Third row
If the editor left an edit summary with their edit, this will be shown here in parenthesis. If the editor marked their edit as a minor edit, a bolded m will appear here as well.

Fourth row
Clicking on the "Previous edit" link will take you to the next older diff in the page history, while clicking "Next edit" will take you to the next newer diff. If you are viewing the diff of multiple consecutive edits, a "x intermediate revisions by y users not shown" will also be shown here.

Linking to diffs
The URL of a diff contains two parameters, each formatted in the form. The URL of a diff will look something like this:

The  parameter shows the revision ID for the later revision (shown on the right). The  parameter shows the revision ID for the earlier revision (shown on the left). If  is set to , the revision specified in   will be compared to the most recent revision of the page, and if   is set to  , the revision in   will be compared to the revision preceding it. If  is set to any revision ID and   is excluded, the revision specified in   will be compared to the revision preceding it.

The easiest way to link to a diff is to copy and paste the full URL. However, this can be lengthy and doesn't work in edit summaries. A better alternative is to use regular wikilinks by linking to, replacing diff with the revision ID specified after the   URL parameter. For example, typing in  will provide a link to the diff page comparing revision 1234 with the preceding revision on the same page. You can also link to diffs that use the  parameter by linking to. Doing this, typing  will provide a link comparing revision 1234 (shown on the left) with revision 4567 (shown on the right).

Examples

 * Shows a diff comparing revision 998, shown on the left, with revision 1001, shown on the right.
 * Same as above ( is not a required parameter for links to diffs to work).
 * Same as above.
 * Shows a diff comparing revision 2315, shown on the right, with the revision preceding it, shown on the left.
 * Same as above.
 * Shows the permanent link for revision 3214.
 * Same as above.
 * Shows a diff comparing revision 2315, shown on the right, with the revision preceding it, shown on the left.
 * Same as above.
 * Shows the permanent link for revision 3214.
 * Same as above.
 * Shows the permanent link for revision 3214.
 * Same as above.
 * Same as above.

Deleted revisions
Sometimes, administrators may need to hide the contents of certain revisions from view using revision deletion. Only administrators can view a diff if it contains a revision that has been hidden from public view.

If a page gets deleted, all revisions will be removed from public view, and as such, all diffs relating to revisions in that page will no longer be publicly accessible.

Both revision deletion and page deletion can be reversed at any time.