Skip to content

String Diff

Compare two short strings character by character and see exactly which characters were added or removed between them.

Category: text
Use Case: Spotting a Typo Between Two Versions, Comparing Usernames or Codes, Verifying a Small Text Edit
Privacy: 100% browser-based

Recommended Settings

Pro Tips

  • Green highlighted characters were added in the 'Changed' string; red, struck-through characters were removed from the 'Original'
  • This compares individual characters, so it's best for short strings like usernames, codes, or single sentences
  • For comparing whole paragraphs or documents line by line, use the Text Diff tool instead
  • Even a single added or removed character - like a typo fix - will be clearly highlighted

Most Popular

Most users paste two short strings, like a username or product code, to spot exactly what changed

When to Use This Tool

Spotting a Typo Between Two Versions

Find the exact character that differs between two similar strings.

Comparing Usernames or Codes

Verify whether two short identifiers are truly identical or subtly different.

Verifying a Small Text Edit

Confirm exactly what was changed in a short piece of edited text.

Debugging String Comparison Issues

Visually identify why two strings that look the same aren't matching in code.

How It Works

1

Split both strings into individual characters

2

Compute the longest common subsequence of characters shared between both strings

3

Mark any characters outside that shared sequence as added or removed, and display everything in order

100% Private

Files never leave your device. All processing happens locally in your browser.

Lightning Fast

Powered by Client-side LCS-based character diff algorithm for optimal performance on modern browsers.

Open Source

Built with verified, open-source libraries. Fully transparent.

Frequently Asked Questions

Is this comparison case-sensitive?

Yes, 'A' and 'a' are treated as different characters.

Is there a length limit?

Yes, each string is limited to 3,000 characters to keep the comparison fast. For longer text, use the Text Diff tool, which compares by line instead of by character.

What do the colors mean?

Green highlights mark characters added in the 'Changed' string, while red, struck-through characters mark characters removed from the 'Original' string.

Is my data sent to a server?

No. The comparison runs entirely in your browser.

What's the difference between this and Text Diff?

This tool compares character by character, ideal for short strings. Text Diff compares line by line, better suited for documents, code, or longer content.