String Compare
Paste two strings to see exactly which characters differ. It's made for short text such as API keys, hashes, IDs and sentences.
- Runs on your device
- No sign-up
- Free, no watermark
How to use the String Compare
- 01Paste the first string into String A and the second into String B.
- 02Turn on Ignore case or Ignore whitespace if those differences don't matter.
- 03Read the result: red, struck-through text is only in A, and green text is only in B. Invisible characters such as no-break spaces are shown as markers.
- 04Check the match percentage and the number of differences in the bar at the bottom.
Good to know
Runs on your device
Both strings are compared in your browser, so keys and tokens stay private.
Compares as you type
The highlighted result updates while you edit either string.
Ignore case or whitespace
Skip differences in capital letters, or treat runs of spaces and line breaks as one space.
Match score
See a similarity percentage and how many places differ.
Frequently asked questions
How is the match percentage worked out?
It's the number of characters the two strings share, in order, divided by the length of the longer string. Any ignore options are applied first.
What does Ignore whitespace do?
It turns every run of spaces, tabs and line breaks into a single space and trims both ends before comparing.
Is the comparison case-sensitive?
Yes, by default. Turn on Ignore case to treat capital and small letters as the same. The result is then shown in lower case.
Can it show invisible differences?
Yes. Inside a difference, a space is shown as ·, a line break as ↵, and tabs, carriage returns, no-break spaces and zero-width characters as markers such as ⟨TAB⟩, ⟨CR⟩, ⟨NBSP⟩ and ⟨ZWSP⟩. No-break and zero-width spaces are marked in unchanged text too. Hover a marker to see its Unicode code point.
Is my text uploaded?
No. The comparison runs in your browser, and nothing you paste leaves your device.
Can I compare long documents?
Longer text works, but if two long inputs are very different the comparison stops after 2 seconds. For files and code, the Code Diff Checker compares line by line and is better suited.