File Compare
Paste or drop two files to see a side-by-side diff — or switch to Structure mode to check an XML and a JSON have the same tags and properties.
About File Compare
File Compare puts two files next to each other and highlights exactly what changed. Paste text or drop in any two files and the side-by-side view marks added, removed and modified lines, with word-level highlighting inside the lines that changed — ideal for comparing two XML files, config, code, logs or CSV. You can ignore whitespace or letter case, and pretty-print XML or JSON first so a reformatted file still lines up. Structure mode goes further: it parses each side as XML or JSON — even one of each — and compares them by tag, key and property, so you can confirm an XML and a JSON carry the same fields and required properties. Everything runs in your browser, so the files never leave your device.
How to use File Compare
- Paste text into File A and File B, or drop / browse for any two files.
- Use Side-by-side mode to see line and word differences, with options to ignore whitespace or case and to format XML/JSON first.
- Switch to Structure mode to compare an XML against a JSON (or two of either) by their tags, keys and properties.
- Read the summary of fields present in both, missing on each side and any value differences — then copy the diff or report.
Frequently asked questions
- How do I compare two files side by side?
- Paste or drop a file into each side and click Compare. The side-by-side view aligns the two files and highlights added, removed and changed lines, with word-level highlighting inside modified lines.
- Can I compare an XML file against a JSON file?
- Yes. Switch to Structure mode and it parses each side as XML or JSON — including one XML and one JSON — then compares them by tag, key and property so you can check both contain the same fields and required properties.
- Does it check that both files have the required tags and properties?
- Yes. Structure mode lists every tag, key and attribute, marks which appear in both files and which are missing on each side, and (when matching by full path) flags where the values differ. The summary explicitly names anything missing in either file.
- What file types can I compare?
- Any file can be loaded — it is read as text, so it works for XML, JSON, code, config, CSV, logs, Markdown and plain text. Binary files are flagged because a text comparison of them is not meaningful.
- Can it ignore whitespace or formatting differences?
- Yes. You can ignore whitespace and letter case, and the Format XML/JSON option pretty-prints recognised XML or JSON on both sides first, so a minified or reformatted file still lines up against a tidy one.
- Are my files uploaded to a server?
- No. All parsing and comparison run locally in your browser using JavaScript. Your files never leave your device, so they stay completely private.
- How do I compare two XML files?
- Paste or drop each XML file into a side and click Compare. Turn on Format XML/JSON so both are tidied to the same layout, then read the highlighted line and word differences — or use Structure mode to compare them by tag and attribute instead.