Text comparison tool

Original text
Modified text
Comparison results
Enter two pieces of text and click the "Compare Differences" button

Frequently asked questions

Is text diff comparison tool safe? Will the pasted code or text be uploaded to the server?

Totally safe. All comparison operations are performed locally in the browser, and pasted code or text is not uploaded to any server or logged.

How does the comparison result distinguish between new, deleted and unchanged rows?

New lines have a green background and are marked with line numbers, deleted lines have a red background and are marked with line numbers, and unchanged lines are displayed in normal style. The top statistics area also summarizes the number of new rows and the number of deleted rows.

How to load the sample data experience tool function?

Click the "Load Example" button, and the tool will automatically fill in a pair of example function codes (the original version and the modified version), and perform comparison immediately to quickly understand the tool's highlighting and line number annotation effects.

Can it be used to compare JSON, XML or configuration files?

Yes. As long as it is in plain text format (JSON, XML, YAML, INI, log, etc.), you can paste it directly for comparison. The comparison results display line numbers in a fixed-width font, suitable for reading differences in structured text.

What is the swap text button for?

Clicking "Swap Text" will swap the original text on the left and the modified text on the right, allowing you to view the differences in reverse (original deletion becomes new, new addition becomes deletion) without re-pasting the content.