Art of Codeartofcode
BlogToolsShopGames ArenaJobsLive Courses
  • Home
  • Blog
  • Shop
  • Jobs
  • My Zone

Tools

Diff Checker – Compare Two Texts Online

Compare two blocks of text or code side-by-side or unified, with word/char highlighting and a downloadable patch.

Compare two texts or files with live line-by-line diffing, word or character level highlighting on changed lines, a JSON mode that ignores key order, and a downloadable unified diff. Runs entirely in your browser using a hand-written Myers diff. Nothing is uploaded.

Original
Changed
Paste or upload text on both sides to see a diff.

About Diff Checker

Diff Checker shows exactly what changed between two versions of a text. Paste the original on the left and the new version on the right, and every added, removed and edited line is marked, with the changed words or characters highlighted inside each line. It works for source code, config files, JSON, logs and plain prose, and the result can be copied or downloaded as a standard unified diff.

Features

Live line-by-line diff

A hand-written Myers diff recomputes as you type, debounced so it never lags behind.

Side-by-side or unified

Compare in two aligned columns on desktop, or a single unified view with old/new gutters. Unified on mobile.

JSON mode

Pretty-prints both sides with recursively sorted keys before diffing, so key order and formatting never count as a change.

Freeze protection

Diffing runs in a background worker with a 3-second timeout, so a huge paste never locks the tab.

Folding for long files

Runs of more than 8 unchanged lines collapse to 3 lines of context, with a click to expand.

100% private

Both texts stay in your browser. Nothing is uploaded, and nothing is saved to this device either.

How to use Diff Checker

  1. 1

    Add the original text

    Paste the older version into the Original box, drop a file onto it, or use the upload button.

  2. 2

    Add the changed text

    Put the newer version in the Changed box. The comparison runs automatically as you type.

  3. 3

    Choose what counts as a change

    Tick Ignore whitespace, Ignore case, Ignore blank lines or Trim trailing whitespace, or switch on JSON mode for JSON data.

  4. 4

    Review the differences

    Switch between side-by-side and unified views, highlight by word or character, and press [ or ] to jump between changes.

  5. 5

    Export the result

    Copy the output as a unified diff or download a .diff file to apply with git apply or patch.

Use cases

  • Reviewing a code change before you commit it
  • Comparing two versions of a config file or API response
  • Checking whether two JSON payloads are really the same
  • Finding what an editor changed between two drafts of a document
  • Creating a patch for a change made outside version control

Privacy

Both texts stay in your browser. The diff is computed by a Web Worker on your own device and nothing is sent to a server. The text itself is never saved; only your view settings, such as layout and ignore options, are remembered in local storage.

Frequently asked questions

Paste the first version into the Original box and the second into the Changed box. The diff updates as you type: removed lines are red, added lines are green, and the exact words that changed are highlighted.
Yes. Paste code directly, or use the upload button or drag a file onto either box. Any text file works, including .js, .py, .json, .csv, .md and .log.
Tick Ignore whitespace to treat runs of spaces and tabs as a single space, or Trim trailing whitespace to ignore spaces at line ends. Ignore case and Ignore blank lines work the same way. Your text is never modified, only how it is compared.
Turn on JSON mode. Both sides are parsed, object keys are sorted and everything is re-indented before comparing, so key order and formatting don't show up as changes. Invalid JSON falls back to a plain text diff.
It is a standard unified diff. From the folder that holds the original file, run git apply diff-checker.diff or patch -p1 < diff-checker.diff.
No. The comparison runs in a Web Worker inside your browser tab, so your text never leaves your device and nothing is stored after you close the page.

Related tools

JSON Formatter

Free online tool to format, beautify, and validate JSON. Features include syntax highlighting, minification, error detection, and customizable indentation. No signup required, 100% private - all processing happens in your browser.

Regex Tester

Test regular expressions against your own text with live match highlighting, per-match capture groups and a token-by-token explain panel. Switch to replace mode to preview substitutions, or load a ready-made pattern from the library. Everything runs in your browser so nothing is uploaded.

Text Case Converter

Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, kebab-case and more. Perfect for developers, writers, and anyone who needs to quickly change text case.

Developed by MadMVP

Book a call to build your vision into reality
Art of Codeartofcode

The den of devs. Stories, tools, games, and gear for developers.

Platform

  • Blog
  • Tools
  • Games Arena
  • Shop
  • Learning
  • Campus

Company

  • About Us
  • Jobs & Internships
  • Contact

Legal

  • Terms of Service
  • Privacy Policy
  • Refund Policy
Copyright © 2026 artofcode.in, All Rights Reserved.