Frequently Asked Questions

What is JSDiff?

JSDiff is a free online tool for comparing JSON and JavaScript code. It uses the Myers Difference Algorithm to highlight differences between two text segments, making it easy to see what has been added, removed, or modified.

Is JSDiff free to use?

Yes, JSDiff is completely free to use. All processing is done locally in your browser, ensuring your data remains private and secure.

What types of comparisons does JSDiff support?

JSDiff supports multiple comparison modes:

Does JSDiff work on mobile devices?

Yes, JSDiff is fully responsive and works on mobile devices, tablets, and desktops. You can compare code anytime, anywhere.

Is my data safe when using JSDiff?

Yes, all data processing happens locally in your browser. No data is sent to any server, ensuring complete privacy and security.

How do I compare two JSON files?

To compare two JSON files:

  1. Select 'JSON' mode from the options
  2. Paste your first JSON in the left textarea
  3. Paste your second JSON in the right textarea
  4. View the highlighted differences in the result panel (green for additions, red for deletions)

What is the Myers Difference Algorithm?

The Myers Difference Algorithm is an efficient O(ND) algorithm for computing the differences between two sequences. It's widely used in version control systems like Git and text editors. JSDiff uses this algorithm to provide accurate and fast comparisons. Learn more about the algorithm.

Can I use JSDiff offline?

Yes, once the page is loaded, JSDiff works entirely offline. All processing happens in your browser using JavaScript, so no internet connection is needed after the initial page load.

What's the difference between JSON mode and other modes?

JSON mode performs semantic comparison of JSON objects, ignoring property order. This means two JSON objects with the same properties in different orders will be considered identical. Other modes (Chars, Words, Lines) compare text as-is, character-by-character, word-by-word, or line-by-line respectively. JSON mode is best for comparing structured data, while other modes are better for plain text or code.

Can I export the diff results?

Currently, you can copy the results from the result panel. We're working on adding export functionality for various formats. For patch format, you can use the 'Patch' mode to generate unified diff patches that can be saved and applied later.

Have more questions? Visit our GitHub repository to ask questions or report issues.