TEXT WORKSPACE
Code & Text Compare
Compare exact lines in inline or side-by-side views.
Input is processed on this site only when you run the tool. The application does not save inputs or results.
input.txt
changed.txt
Result result.json
A little clarity goes here.
Run the tool to see your result.
Result preview
UTF-8 text, at most 32768 bytes per input. Tab leaves the editor. Plain text disables syntax colors. Browser textareas may normalize line endings to LF.
{"compare":{"inputMode":"pair","options":{"view":{"type":"enum","values":["inline","side-by-side"],"default":"inline"}},"inputLabels":[],"inputLimits":[]}}{"compare":{"input":"const name = 'Example';\nconsole.log(name);\n","input2":"const name = 'Example';\nconsole.info(name);\n","options":{"view":"side-by-side"}}}A QUICK WALKTHROUGH
A familiar workflow,
with room to focus.
Paste original and changed text.
Choose inline or side-by-side presentation and Compare.
Read colored line changes. Copy or download the readable comparison, or switch to Source data for all records.
When to use Code & Text Compare
Compare exact revisions of a small source snippet, configuration text or note and inspect which lines were removed or added.
Read the result
Line endings and a missing final newline are meaningful. The display is a deterministic text diff, not language-aware equivalence, a character diff or a patch to apply.
SEE IT IN PRACTICE
Worked examples
Sample input. A result you can inspect.
Compare example
Original
const name = 'Example'; console.log(name);
Changed
const name = 'Example'; console.info(name);
- Comparison view
- Side by side
Expected result
{"view":"side-by-side","equal":false,"rows":[{"change":"equal","leftLine":1,"rightLine":1,"left":"const name = 'Example';\n","right":"const name = 'Example';\n"},{"change":"removed","leftLine":2,"rightLine":null,"left":"console.log(name);\n","right":null},{"change":"added","leftLine":null,"rightLine":2,"left":null,"right":"console.info(name);\n"}],"inline":" const name = 'Example'; ⟨LF⟩\n- console.log(name); ⟨LF⟩\n+ console.info(name); ⟨LF⟩\n"}{"kind":"diff","title":"Line-by-line comparison","equal":false,"view":"side-by-side","rows":[{"change":"equal","leftLine":1,"rightLine":1,"left":"const name = 'Example';\n","right":"const name = 'Example';\n"},{"change":"removed","leftLine":2,"rightLine":null,"left":"console.log(name);\n","right":null},{"change":"added","leftLine":null,"rightLine":2,"left":null,"right":"console.info(name);\n"}],"total":3,"copy":" const name = 'Example'; \u27e8LF\u27e9\n- console.log(name); \u27e8LF\u27e9\n+ console.info(name); \u27e8LF\u27e9\n","schema":1}Formats, limits and common errors
Reduce line count or input size. Inline markers explicitly label line endings.
- At most 32,768 bytes and 300 lines per side; at most 90,000 LCS cells and 600 result rows.
- Exact lines include LF/CRLF and final-newline differences. No case, whitespace, encoding or Unicode normalization; browser textareas may normalize pasted line endings.
- This is a deterministic line comparison, not syntax-aware semantic equivalence, character-level diff or an applicable patch. Tie cases prefer a removal first.
- Input: 32,768 UTF-8 bytes per text field. Output: at most 524,288 UTF-8 bytes; serialized responses have a separate 1 MiB ceiling. Size/work failures return no partial result.
Longest common subsequence definition ↗ (opens in a new tab)