JS Diff Viewer is a library that can find and view the difference between two text strings. It takes two text strings, uses the diff algorithm to find the differences between them, and returns a list of changes to patch the original string to become the final string. The patch list shows which characters are added or removed to change one string into the other. The difference between the text strings may be computed in three modes: by character, by word or by line. The object can also format the strings to view them as HTML, showing which characters are added and removed with special insertion and deleted styles. The example page works as a tool to interactively view the changes as the user changes the texts before and after the changes are applied.