Text Token Difference (JSON)
Splits two text fields while retaining whitespace tokens and returns JSON lists of tokens absent from the other side. It is membership filtering, not a character, aligned, Myers, or visual diff.
About this text token difference (json)
Splits two text fields while retaining whitespace tokens and returns JSON lists of tokens absent from the other side. It is membership filtering, not a character, aligned, Myers, or visual diff Applies Unicode-compliant text transformations and parsing directly in the browser tab without data leakage.
Text processing & transformation mechanics
Splits the main and second text fields while retaining whitespace tokens and returns a JSON object of tokens absent from the other side; it does not highlight characters or align edits.
Worked text manipulation example
Scenario: Compare tokens that occur on only one side of two pasted texts.
Sample input:
Second field:
Processing: Split both values while retaining whitespace tokens and filter each list by membership in the other.
Illustrative output:
Character encoding & string length boundaries
This is membership filtering, not a Myers, character, aligned, or visual diff. It does not compare occurrence counts or pair replacements, moved tokens, or order.
Text formatting and transformations in Text Token Difference (JSON) preserve character integrity. Check edge cases such as multi-line inputs and special characters before downstream use.
In-memory text processing boundary
String operations and Unicode manipulations in Text Token Difference (JSON) execute entirely in local browser memory without transmitting input text.
Unicode Consortium & text formatting standards
Unicode Consortium standard annexes (UAX) and character encoding specifications:
- Implementation-specific whitespace-token membership comparison; no character, aligned, Myers, or visual diff
Text Token Difference (JSON) verification · Audit standards
How to use it
- Paste the first text in Input and the comparison text in Second input / expression.
- Choose Run locally to split both values and filter tokens by membership in the other value.
- Read the `removed`, `added`, `left`, and `right` JSON fields.
Frequently asked questions
How does Text Diff Highlighter compare text?+
Enter text in the main input and a second text in the Second input / expression area, then choose Run locally. It splits both values while retaining whitespace tokens and lists tokens missing from the other value.
What does a concrete comparison return?+
With main input `alpha beta` and second input `beta gamma`, the JSON has `removed: ["alpha"]`, `added: ["gamma"]`, plus the original `left` and `right` strings.
Is this a Myers, character-aligned, or visual diff?+
No. It returns JSON fields `removed`, `added`, `left`, and `right`; it does not create colored highlighting, aligned edits, a patch, or replacement pairs.
How are repeated or moved words handled?+
Each whitespace-preserving token is tested only for whether it occurs anywhere in the other token array. It does not compare occurrence counts: if a token occurs anywhere on the other side, its occurrences are omitted from that difference list. Order is not aligned, and moved tokens or replacement pairs are not represented.
