Diff Tool — Text & Code Compare

Paste or drop two versions and see added and removed lines, plus the exact words that changed inside each line. Copy or save the result as a unified patch. Nothing leaves your browser.

On-device・No uploadMobile friendlyWorks offline

Your files and input are processed only inside your browser on this device and are never uploaded to our servers.

Original text
0 Line
Changed text
0 Line
Added
+0
Removed
−0
Unchanged
0
Diff

Enter text on both sides and the differences appear here.

How to use

  1. old.txt
    new.txt

    Add two texts

  2. Side-by-side and unifiedAdded / removed colored

    Compare line by line

  3. changes.diffunified diff format

    Save or copy the diff

Compare two texts line by line and see only what changed
  1. Paste the original text or code on the left and the changed version on the right. You can also choose a file or drop one onto a pane.

  2. The diff updates as you type. Use “Try a sample” to see how it looks.

  3. Turn on “Ignore whitespace”, “Ignore case” or “Ignore blank lines” to hide noise.

  4. Switch between “Side by side” and “Unified”. Words that changed inside a line get a stronger highlight.

  5. Use “Copy patch” or “Save .diff” to export a unified patch with 3 lines of context.

What it does

Word-level highlights inside changed lines

Paired changed lines are compared again by word, symbol and Japanese script run, so only the part that changed is emphasized. If two lines share very little, the whole line is marked to stay readable.

Minimal diffs with Myers’ algorithm

Lines are compared with the Myers O(ND) algorithm, which finds the script with the fewest additions and removals. Common head and tail lines are stripped first, so small edits in big files stay fast.

Side by side or unified

Switch between a numbered two-column view and a git-style unified view. In side-by-side mode a removed line and its replacement sit on the same row.

Ignore options

Ignore all whitespace within lines, letter case, or blank lines, independently. Ignored differences are not counted in the totals.

Unified patch export

Outputs ---/+++ headers and @@ hunks with 3 lines of context, in the format used by patch and git apply. File names you load are used in the headers.

Fully local

Comparison runs in JavaScript in your browser. Neither the text nor the file names are uploaded, so it is safe for confidential code and documents.

Use cases

  • Check a config file, SQL script or source file before and after an edit for unintended changes
  • Find what changed between two drafts of a contract, article or meeting notes
  • Share changes as a .diff file where Git is not available
  • Look past line-ending or indentation differences to the real change
  • Compare expected and actual output from logs or tests

Supported formats

Open

Text and source files (.txt .md .json .xml .html .css .js .ts .py .sql .yml .csv .log and more)UTF-8 / UTF-16 BOM / Shift_JIS (auto-detected)

Export

Unified diff (.diff)Copy to clipboard

Capability matrix

FeatureSupportNotes
Line diff (added / removed / unchanged)Supported—
Word-level highlights inside linesSupportedBy word, symbol or script run — not by single character
Side-by-side and unified viewsSupported—
Ignore whitespace, case, blank linesSupported—
Unified patch exportSupportedFixed 3 lines of context
Three-way merge / conflict resolutionNot supported—
Applying a patch (patch / git apply)Not supported—
Folder or binary comparisonNot supported—
Detecting moved linesNot supportedA moved line shows as a removal plus an addition
Offline useSupportedWorks without a connection once loaded

Limits & notes

  • Up to 20,000 lines and 2 million characters per side are compared. Anything beyond that is left out of the diff and the patch, and a notice is shown.
  • Files up to 10 MB each can be opened.
  • When the edit distance exceeds 4,000, the remainder is treated as “all removed, all added” and a notice is shown.
  • Only the first 3,000 diff rows are drawn on screen; the exported patch contains everything.
  • Line endings (CRLF / LF) are ignored when comparing lines. Patches use LF and a missing newline at end of file is not detected.
  • Works on smartphones, but side-by-side view scrolls sideways inside its table; for detailed review, use a PC or the “Unified” view.

Privacy & safety

Your text and files are compared only inside your browser. Nothing is uploaded or stored, and file names and contents are never put in analytics logs. Closing the page discards everything.

FAQ

How do I compare two texts?
Paste the original on the left and the changed version on the right. Added lines are green, removed lines red, and the words that changed inside a line are highlighted more strongly.
Can I ignore whitespace or case differences?
Yes. The compare options let you ignore whitespace, letter case and blank lines separately — handy for checking a commit that only reindented code.
Can it produce a git-style patch?
“Save .diff” and “Copy patch” output the unified format with ---/+++ headers and @@ hunks plus 3 lines of context, readable by the patch command.
Does it work with large files?
Up to 20,000 lines and 2 million characters per side are compared; beyond that only the beginning is used and you are told. Small edits in large files are processed quickly.
Is my text uploaded anywhere?
No. The comparison runs entirely in your browser and your text is never sent to LIBRA Works or any third party.
Does it highlight single characters or moved lines?
Highlights inside a line work by word or symbol, not single characters. Moved lines are not detected; they appear as a removal and an addition.

Lockfile Diff & Dependency Tree

Compare two lockfiles to see which packages were added, removed or upgraded. You can also see why a package is installed and where several versions of one package come from. Nothing leaves your browser.

No upload

OpenAPI Diff (Breaking Change Checker)

Paste the old and new OpenAPI (or Swagger 2.0) definitions to list the changes that break clients: removed paths, newly required fields, type changes and more. Each change is sorted into breaking, caution or non-breaking, with the reason on its row. Nothing leaves your browser.

No upload

UUID / ULID / NanoID / Token Generator

A UUID is ready the moment the page opens. Switch to UUID v7, ULID, NanoID or a random token, generate up to 10,000 at once and save them as .txt, .csv or .json. Paste an existing UUID or ULID to read its embedded time and version.

No upload

Regex Tester

Type a pattern and matches light up in the test string instantly. Capture groups, replacement output and what each part of the pattern means are all on one screen — and patterns that would freeze your browser are stopped after one second.

No upload

Code Formatter — Format & Minify

Paste code to format it with the language auto-detected. Choose indent, line width, semicolons, quotes and trailing commas; JavaScript, CSS and HTML can also be minified with before/after size and reduction. Your code never leaves the browser.

No upload

i18n Translation Missing Key Checker

Add your base-language file and the other language files, and see missing keys and {name} or %s placeholders that do not match, per language. Export a CSV for translators and rebuild the files from the CSV they return.

No upload

Last updated: