Compare text (diff)
Compare two texts or files side by side or inline, by line, word or character, with changes highlighted and a downloadable patch.
Runs in your browserNothing uploadedWorks offline
Loading Compare text (diff)Runs on this device. Nothing is uploaded.
Questions
Should I compare by line, word or character?
Line works best for code, lists and long documents. Word is best for prose, where one edited word should not mark a whole paragraph. Character shows the tiniest edits, such as a changed digit or a missing comma.
What is in the downloaded patch?
A unified diff of the two texts by line, the format git and patch use, with three lines of context around each change.
Are my files uploaded to compare them?
No. Both texts are compared by a script running in your browser, using the open source jsdiff library.
Related tools
All text and documents toolsPDFpdfCompare PDFsSee what changed between two versions of a PDF, page by page, with added and removed words highlighted.Text and documentstxt md plaincamelCase converterTurn phrases, column names or snake_case into camelCase identifiers, one per line, as you type.Text and documentstxt md plainCase converterChange text to UPPER, lower, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE as you type.Text and documentstxt md markdownCharacter counterCount characters as you type, spaces included, with the count without spaces, words and sentences next to it.Text and documentstxt md plainClean AI textFix text pasted from ChatGPT, Claude and terminals: show and remove hidden characters, rejoin broken lines, fix quotes, spaces and Markdown.Text and documentstxt md plainCONSTANT_CASE converterTurn phrases or camelCase names into CONSTANT_CASE, also called SCREAMING_SNAKE_CASE, for constants and environment variables.