How to Use Copilot to Compare Two Documents
Use Copilot to compare two documents while ignoring formatting, catch lookalike Unicode changes, and decide when a deterministic diff tool is the safer choice.
When you ask Copilot to compare two documents, an AI assistant reads both versions and writes a description of how they differ. That is useful for summaries and explanations, but it is not the same as a character-by-character comparison. This guide explains what an AI comparison does and does not detect, how to tell it which formatting differences to ignore, when a dedicated diff tool is the better choice, and how to keep the results usable. The Copilot name covers several different assistants, and no product documentation was supplied for this guide. Features such as file attachments, supported file types and size limits are not confirmed here, so check them against the version you use.
What an AI comparison actually does
An AI comparison leaves both documents unchanged. Copilot reads the two inputs and generates new text that describes the differences. Because that description is generated rather than computed, it can leave out real changes, report changes that do not exist, or quote passages inexactly. Treat the response as a draft analysis that you verify, not as an authoritative change log.
Content differences versus formatting differences
In a word processor, formatting such as bold, italics, fonts, colors and paragraph styles is stored separately from the characters themselves. When you paste a document into a chat box as plain text, that formatting usually drops away. Only the characters remain. A comparison of plain-text input therefore ignores conventional formatting automatically. Whether formatting survives when you attach a file instead of pasting text depends on the product and is not confirmed here.
Differences that look like formatting but change the stored text
Some changes look cosmetic but alter the underlying characters. These distinctions decide whether a difference should be ignored:
- Unicode character substitution: tools often labeled "font generators" replace ordinary letters and digits with separate Unicode characters, such as mathematical bold or script letters. The text looks styled, but the stored characters are different, so search, comparison and copy-paste treat them as different text.
- Character-order reversal: reversing a string rearranges the stored characters. For example, "draw" becomes "ward". This is a real content change.
- Visual mirroring: flipping text with styling, such as a CSS transform, changes only how the text is displayed. The stored characters stay the same, and the effect disappears when the text is copied as plain text.
- Invisible characters: zero-width spaces, non-breaking spaces and similar characters can make two passages look identical even though their stored text differs.
- Bidirectional control characters: these can make the display order differ from the stored order. Two passages that look the same can contain different text, and the reverse is also possible.
Before you start, decide whether each of these categories counts as a difference for your purpose, and say so explicitly in your request.
Illustrative example: which differences are formatting only?
The rows below use matched input to show the distinctions. They are illustrative only. They describe how the stored text differs and are not observed Copilot output.
| Version A | Version B | What differs in the stored text | Formatting only? |
| Payment due in 30 days | Payment due in 30 days, shown in bold | Nothing; the characters are identical | Yes |
| Payment due in 30 days | Payment due in 𝟑𝟎 days | The digits are replaced with mathematical bold digit characters | No; the characters differ even though they look like bold styling |
| Payment due in 30 days | The same text with a non-breaking space before "days" | One space character is a different code point | No, though it is usually safe to ignore |
| Approved | Approved with a zero-width space inside the word | A hidden character was added | No |
| draw | ward | The character order is reversed | No; this is a wording change |
| draw | draw, visually mirrored with CSS | Nothing; only the display changes | Yes |
How to set up the comparison
- 1. Define what counts as a difference: wording, numbers, dates, names, punctuation, whitespace, invisible characters or formatting.
- 2. Bring both documents into the conversation. Paste them as plain text, or attach them if your version supports attachments. Label them clearly as Version A and Version B so the response can refer to them unambiguously.
- 3. State what to ignore and what to report, using the categories above.
- 4. Ask for structured output that quotes the exact text from each version, so you can check every reported change.
- 5. Verify each reported difference against the source documents, and spot-check sections the response says are unchanged.
A prompt along these lines makes the instructions explicit:
Compare Version A and Version B below.
Ignore: bold, italics, fonts, colors, line breaks, and spacing differences.
Do not ignore: changes to words, numbers, dates, names, or punctuation
that could change meaning.
If you notice invisible or lookalike Unicode characters, list them separately.
For each difference, give:
- location (section or paragraph)
- exact text in Version A
- exact text in Version B
- whether it changes meaning
If a section has no differences, say so.
=== Version A ===
[paste Version A here]
=== Version B ===
[paste Version B here]
Do not rely on the assistant to catch invisible or lookalike characters. They may not show up in the chat window, and a language model does not process text one character at a time. If those characters matter, normalize the text first or use a deterministic diff, as described below.
Copilot or a dedicated diff tool?
Deterministic comparison tools match text character by character, word by word or line by line. Examples include document-comparison features in word processors, command-line diff utilities and online text comparison tools. They suit different needs than an AI assistant. The table compares the two approaches on the same criteria.
| Criterion | AI assistant such as Copilot | Deterministic diff tool |
| How differences are found | Generated by a model reading both texts | Computed by matching stored text |
| Completeness | Can miss changes or report changes that do not exist | Reports every difference within its configured scope |
| Ignoring formatting | Follows instructions, but may apply them inconsistently | Uses settings or plain-text input; exact behavior depends on the tool |
| Invisible and lookalike characters | Unreliable | Detected as character differences, though they may be hard to see in the display |
| Explaining what a change means | Strong: can summarize changes and their implications | None; lists the changes only |
| Rewritten or reordered passages | Can recognize paraphrases | Often shown as a deletion plus an insertion |
| Repeatability | Output may vary between runs | The same input produces the same result |
| Data handling | Content is sent to a service under its policies | Local tools can keep data on your device |
Choose a deterministic diff when you need an exact, complete record, for example with contracts, code, regulated documents or anything where a single changed digit matters. Choose Copilot when you need to understand the changes: a plain-language summary, the substantive edits separated from the trivial ones, or an explanation of how a revision affects meaning. For high-stakes documents, combine the two. Run a diff first, then give Copilot the diff output and ask it to explain the changes. The diff guarantees completeness, and the assistant adds interpretation.
Normalize text before comparing
The most reliable way to ignore formatting is to remove it before any comparison happens, instead of asking a tool to disregard it. Pasting as plain text removes conventional formatting. Unicode normalization goes further: the NFKC form maps many lookalike characters, including mathematical styled letters and digits and non-breaking spaces, back to their ordinary equivalents. NFKC does not remove zero-width or bidirectional control characters, so the following sketch strips those separately and then runs a line diff with Python's standard library.
import difflib
import re
import unicodedata
# Zero-width, directional mark, bidi control, and BOM characters
INVISIBLE = re.compile('[\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u2069\ufeff]')
def normalize(text):
text = unicodedata.normalize('NFKC', text)
text = INVISIBLE.sub('', text)
text = re.sub(r'[ \t]+', ' ', text)
return text.strip()
def compare(a, b):
a_lines = [normalize(line) for line in a.splitlines()]
b_lines = [normalize(line) for line in b.splitlines()]
return '\n'.join(difflib.unified_diff(a_lines, b_lines, 'Version A', 'Version B', lineterm=''))
Normalization can also remove meaning, so check that it fits your content. NFKC turns superscripts such as "²" into ordinary digits and expands ligatures and full-width forms, which matters in mathematical or technical text. The invisible-character pattern also removes the zero-width joiner and non-joiner. Those characters are part of many emoji sequences and affect correct rendering in some scripts, such as Persian and several Indic scripts. Use normalized copies only for the comparison, and keep the originals as the record.
Will the results stay readable and usable?
Copying the output elsewhere
Tables, bullet lists and highlighting in the response may not keep their structure when pasted into another application. That depends on the destination, so paste a sample and check it before you rely on the format. Text the assistant presents as a quotation may have been regenerated rather than copied, so compare quotes with the source before using them as evidence of what a document says.
Accessibility
Depending on the screen reader and its settings, styled Unicode characters may be announced as individual symbol names or skipped altogether. Reversed text is read in its reversed order. If a comparison shows that a document contains such characters, consider replacing them with ordinary text in the final version. When you ask for a change summary, request text labels such as "Added:" and "Removed:" instead of relying on color or strikethrough alone.
Sensitive documents
Pasting or attaching a document sends its contents to an external service. Before comparing contracts, personal data or confidential material, check which account type you are using and what data policy applies to it, including any rules your organization sets. If you are unsure, remove sensitive details before sharing the text or use a diff tool that runs locally.
What this guide cannot confirm
No evidence was supplied about specific Copilot editions, supported file types, size limits, attachment handling or comparison accuracy, so none of these is stated here. To check how your version performs, run a test: make a copy of a document, plant a few known differences (a changed number, a reworded sentence, a styled lookalike character and a zero-width space), and see which ones the comparison reports.