Neatbo.

Compare text

Compare two texts line by line, with a side-by-side view of changes.

Browser-local processingInputText × 2OutputLine-by-line difference reportUp to 10 MiB per file · File limit: 1
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

or drag and drop it here

Files stay on this device. Your originals stay unchanged.

Up to 10 MiB per file · File limit: 1

    0 characters · 0 bytes
    Options

    Complete the required options first. You can keep the defaults for the rest.

    For matching only, collapse runs of whitespace and trim each line. The texts in the result files stay unchanged.

    Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.⌘ / Ctrl + Enter to run

    Preparing the tool…

    Before you start

    Compare an original and a revised text line by line. Review aligned changes, then download the complete texts as before.txt and after.txt. These UTF-8 files contain the texts used in that comparison; ignoring whitespace changes how lines are matched, not the saved text.

    How to use this tool

    1. Paste the original into “Original text” or select a local UTF-8 text file, then paste the changed version into “Revised text”. Clear Original text if you want to compare the selected file instead.
    2. Choose whether to ignore whitespace differences in Options, then select “Compare texts”.
    3. Review the aligned line numbers and changes. Use “Download” beside before.txt or after.txt to keep the complete text from that run, without diff markers or line numbers.

    Supported inputs and limits

    Each pasted text can contain up to 1 MiB of UTF-8 text. You may select one file up to 10 MiB for the original; filenames are limited to 512 UTF-16 code units. Some characters, including emoji, use two code units.

    Each side can contain at most 4,000 lines, counting a final empty line after a line ending. The comparison also requires (original lines + 1) × (revised lines + 1) to be no greater than 4,000,000. Reduce the number of lines if this limit is reached.

    Worked example

    Example input

    a
    b
    
    a
    c
    Example options
    {}

    Example output

    {
      "diff": [
        {
          "type": "same",
          "left": "a",
          "right": "a",
          "leftLine": 1,
          "rightLine": 1
        },
        {
          "type": "delete",
          "left": "b",
          "right": "",
          "leftLine": 2,
          "rightLine": null
        },
        {
          "type": "insert",
          "left": "",
          "right": "c",
          "leftLine": null,
          "rightLine": 2
        }
      ]
    }

    When something does not work

    Check the reported input limit or file problem. Reduce the text size or line counts, shorten a long filename, or remove a file you are not using. For a decoding error, save an external UTF-8 copy and select it again. Compare again after changing the input; cancelling a run lets you start another comparison.

    Frequently asked questions

    Are my files uploaded?

    No. The comparison runs in your browser. The same tab may temporarily retain a recent workspace while you switch tools, subject to memory limits; it is not a backup. Refreshing or closing the tab clears it. Download any result you want to keep.

    Does ignoring whitespace change the saved text?

    No. For matching only, the option collapses each run of whitespace to one space and trims the start and end of each line. The result files keep both input texts unchanged, including lines considered equal under that rule. This is a line comparison, not a word-level comparison or a merge tool.

    Which input becomes the original text?

    Nonempty Original text takes priority over a selected file. Clear that field to use the file, which must decode as UTF-8. A selected file is still checked and read even when pasted text takes priority, so remove an inaccessible or oversized file before trying again. Both texts may be empty. The result files contain the texts used in that run; after editing an input, compare again to update them.

    Documentation & further reading

    Related tools