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 upload

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. 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.

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.

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.

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.

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.

JSON Studio — Formatter & Validator

Paste JSON to format, minify or validate it instantly. Errors are shown with the exact line, column and cause, and comments or trailing commas can be auto-repaired. Your data never leaves your device.

XML Studio — Formatter & Validator

Paste XML to format, minify or validate it. Errors show the exact line, column and cause, and whitespace that carries meaning (mixed content, xml:space) is never touched. XPath search and JSON conversion are on the same screen. Your data never leaves your device.

YAML / TOML Studio — Validate, Format & Convert

Paste YAML, TOML or JSON to validate, format or convert it. Errors show the exact line and column, and type traps such as “no becomes false” and anything lost in conversion are flagged up front. Your data never leaves your device.

Last updated: