Tool for searching differences (diff) between two strings in order to highlight modifications made between two versions of a same text.
Differences between 2 Texts - dCode
Tag(s) : Data Processing
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Difference between 2 texts is the action of comparing two texts character by character (or word by word) and identifying all common segments in the two texts (not necessarily contiguous).
This method is useful for comparing documents, detecting plagiarism or identifying similarities between texts.
Enter both texts to compare, it is possible to make copy and paste in the fields if the text comes from a file. dCode compares commonalities (or not). The different elements (added, deleted or unchanged) are then highlighted.
Word-by-word comparison mode
Example: Example of changed modified text.
Character level comparison mode
Example: Example of changmodified text.
The algorithm does not take string semantics into account. It only compares characters or words.
This comparator program can be used for spell checking (result of a dictation, for example)
Successive versions in the software development phases need to list and understand corrections in source codes to improve it.
Collaboration in document editing also uses the difference between two texts to list the changes made by each partner.
It all depends on what needs to be compared. It is possible to select the text of the content of the site or to use its source code.
Only the textual content of the file can be compared. To compare bit by bit, use hexadecimal format.
dCode retains ownership of the "Differences between 2 Texts" source code. Any algorithm for the "Differences between 2 Texts" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Differences between 2 Texts" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Differences between 2 Texts" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Differences between 2 Texts" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Differences between 2 Texts on dCode.fr [online website], retrieved on 2025-04-15,