XTools Logo
XTools
Blog
/
Text ConversionText Compare (Diff)Lorem Ipsum GeneratorMorse, Braille & NATO AlphabetClassical CipherASCII Art GeneratorSort & Clean Lines

© 2026 XTools. All rights reserved.

Privacy PolicyContact Us

    Text Compare (Diff)

    Compare two texts side by side or inline, by line, word, or character, and export a patch
    • Files never leave your device
    • Runs in your browser
    • Free, no sign-up, no watermark
    1
    1

    Compare options

    Paste or drop two texts above. Differences appear here as you type.

    Related tools

    • Text Conversion
    • Lorem Ipsum Generator
    • Morse, Braille & NATO Alphabet
    • Classical Cipher
    • ASCII Art Generator
    • Sort & Clean Lines

    How to use Text Compare (Diff)

    Compare two versions of a text or file and see what was added, removed or changed, down to the word or character. Results update as you type, can be exported as a unified .diff patch, and nothing leaves your browser.

    1. 1

      Paste the old text into Original and the new text into Changed, or drop a file on each side or use Open file.

    2. 2

      Under View, choose Side by side or Inline, and set Highlight changes by to Line, Word or Character.

    3. 3

      Turn on Ignore whitespace changes, Ignore case or Ignore line endings to hide differences that don’t matter to you.

    4. 4

      Step through the changes with the arrow buttons, or click the diff and press N and P.

    5. 5

      Click Copy unified diff or Download .diff to save the result as a patch.

    Frequently asked questions

    Are my texts or files uploaded?

    No. Files are read and compared in your browser, and nothing is sent to a server. Your view and ignore settings are remembered on this device.

    Can I compare Word or PDF files?

    Only plain text can be compared. Files that look binary, which includes .docx and PDF, are rejected, so copy their text out and paste it in. Code, Markdown, CSV, JSON and other text files work directly.

    How large can the texts be?

    Each file can be up to 50 MB. Large inputs are compared in a background thread, so the page stays responsive while it shows Comparing….

    Two lines look identical but are marked as changed. Why?

    Usually it is line endings or invisible whitespace. A ␍ mark means a Windows CRLF line ending, and No newline at end of file flags a missing final newline; turn on Ignore line endings or Ignore whitespace changes.

    What is the difference between Word and Character highlighting?

    Word marks whole changed words, which reads best for prose and code; each Chinese or Japanese character counts as one word. Character pinpoints single-letter edits such as typos.

    Can I see the whole text, not just the changes?

    Turn off Hide unchanged lines, or click a Show N unchanged lines bar to expand one section. Context lines sets how many unchanged lines stay visible around each change, and it also applies to the exported patch.