Documentation

Everything you need to know about using TextComparing.

rocket_launch

Getting Started

What is TextComparing?

TextComparing is a browser-based text and code comparison tool. It runs entirely in your browser — no files are ever uploaded to a server. You can compare plain text, source code, JSON, Markdown, PDFs, Word documents, and more.

Loading content

Each editor panel supports three input methods:

  • Browse — click to open a file picker. Supports .txt, .md, .json, .js, .ts, .jsx, .tsx, .css, .html, .xml, .csv, .pdf, and .docx.
  • Paste — reads from your clipboard and loads the text directly.
  • Drag & Drop — drag any supported file from your file manager onto an editor panel.

Running a comparison

After loading content in both panels, click Run Comparison. The diff results appear below the editors with added, removed, changed, and unchanged lines highlighted.

description

Supported Formats

Plain text formats

  • .txt
  • .md (Markdown)
  • .csv
  • .tsv
  • .log

Source code

  • .js / .jsx
  • .ts / .tsx
  • .json
  • .html
  • .css / .scss
  • .xml / .svg
  • .sql
  • .py
  • .go
  • .rs
  • .php
  • .sh

Binary documents

  • PDF (.pdf) — text is extracted preserving layout using coordinate-based line detection.
  • Word (.docx) — raw text is extracted via the Mammoth library. Formatting is stripped.
code

Language Detection

How it works

TextComparing automatically detects the programming language or format of the pasted or loaded content. It uses a heuristic scoring system that checks syntax patterns, keywords, and structure. The detected language appears as a badge in the top-right corner of each editor panel.

Supported languages

  • JSON — validated by attempting a parse
  • HTML, XML, SVG — detected by DOCTYPE and tag structure
  • TypeScript — interface/type annotations and generic syntax
  • JavaScript / JSX — module syntax, React patterns
  • Python, Java, C#, C/C++, Go, Rust, PHP
  • Bash/Shell scripts
  • SQL — SELECT / CREATE TABLE patterns
  • CSS, SCSS
  • YAML, TOML
  • Markdown
  • CSV, TSV — delimiter and column consistency check
  • Plain Text — fallback
settings

Comparison Settings

Case Sensitivity

When enabled (default), uppercase and lowercase letters are treated as distinct characters. Disable to perform a case-insensitive comparison — useful for comparing identifiers or prose that may differ only in capitalisation.

Ignore Whitespace

When enabled, leading/trailing spaces and indentation differences are ignored. This is useful when comparing code that was reformatted but not semantically changed.

Regex Filter

When enabled, an input field appears for a regular expression pattern. Only diff rows whose source or modified line matches the pattern are shown in the results. Use this to focus on specific lines, e.g. ^import to show only import changes.

compare_arrows

Diff Views

Split view

Displays the source text on the left and the modified text on the right, side by side. Removed lines appear only on the left (red), added lines only on the right (green), changed lines on both sides with word-level highlighting.

Unified view

Displays all lines in a single column with − prefix for removed lines and + prefix for added lines. Changed lines appear as a − followed by a + row. This view is similar to the output of git diff.

Copy diff

The Copy diff button copies the result to your clipboard in unified diff format: lines prefixed with spaces (unchanged), − (removed), or + (added).

keyboard

Tips & Shortcuts

General tips

  • Use the swap button (↔) between editors to reverse source and modified.
  • Click the × icon in the editor header to clear that panel.
  • The line/word/character counts update live as you type.
  • The Regex Filter is case-sensitive by default; toggle Case Sensitivity off to make it case-insensitive.
  • All processing is local — nothing leaves your browser.

Theme

Click the sun/moon icon in the top-right of the header to switch between light and dark mode.