Compare Arrays Online

Paste two arrays. See what changed. Works with JSON, Python lists, JavaScript arrays, and any structured data.

🔒 100% private — runs entirely in your browser

or try some sample data

What is ArrayDiff?

ArrayDiff is a free developer tool for comparing arrays and JSON data side by side. It highlights what was added, removed, or changed — with color-coded visual diffs. It works with data from any language (Python, JavaScript, PHP, Ruby, Go, Java) and runs entirely in your browser for complete privacy.

  • Private by default — all processing happens in your browser. Nothing is uploaded.
  • Instant visual diffs — color-coded results appear as soon as you click Compare.
  • Deep comparison — handles nested objects, arrays within arrays, and complex JSON.
  • Works with any language — Python lists, JS arrays, PHP, Ruby, Go, Java, or anything JSON-serializable.
  • Built for real workflows — API response testing, config validation, database migration checks.

Common Use Cases:

API TestingConfig ValidationData MigrationTest AssertionsCode Review

How to Use ArrayDiff

1. Paste Your Arrays

Copy and paste your arrays (from any programming language) into the two input panels. Supports arrays with strings, numbers, objects, and nested arrays from Python, JavaScript, PHP, Ruby, Go, and more.

2. Compare Instantly

Click "Compare Arrays" to see the differences highlighted in real-time. Added elements are green, removed are red, and modified are yellow.

3. Analyze Results

Review the detailed comparison results with element counts and visual indicators for each type of change.

Common Use Cases

Practical examples where array comparison saves developers time and prevents bugs across all programming languages.

🔄 API Response Comparison

Compare REST API responses before and after version updates to ensure backward compatibility.

Before: [{"id": 1, "name": "John"}] → After: [{"id": 1, "name": "John", "email": "john@example.com"}]

⚙️ Configuration Validation

Validate configuration arrays across different environments to prevent deployment issues.

Staging: [{"feature": "auth", "enabled": true}] vs Prod: [{"feature": "auth", "enabled": false}]

�� Test Data Comparison

Compare expected vs actual test results to identify failures and data inconsistencies.

Expected: [{"status": "success", "count": 5}] vs Actual: [{"status": "success", "count": 3}]

📊 Database Migration Testing

Compare database query results before and after migration to ensure data integrity.

Old: [{"user_id": 1, "role": "admin"}] → New: [{"userId": 1, "permissions": ["read", "write"]}]

Features

Privacy-First

Everything runs in your browser. Your data never leaves your device — no server uploads, no tracking of input content.

Visual Diffs

Color-coded results: green for added, red for removed, yellow for modified. Spot changes at a glance.

Deep Comparison

Recursively compares nested objects, arrays within arrays, and complex JSON structures at any depth.

Developer-Friendly

Keyboard shortcuts (Ctrl+Enter to compare, Ctrl+L for sample data), syntax highlighting, and mobile support.

Zero Dependencies

Pure JavaScript with no external libraries. Loads instantly, works offline once loaded, and handles large datasets efficiently.

Any Format

Accepts JSON arrays, Python lists, JavaScript arrays, and any structured data that can be represented as JSON.

More Developer Tools

Free browser-based tools for everyday dev tasks. All private, all instant.

Diff & Compare

Encode / Decode / Format

Generate & Convert

Array Diff for Every Programming Language

ArrayDiff works with data from any programming language. Paste your arrays in JSON format and compare them instantly — no plugins, no installs, no server-side processing.

Python List Diff

Compare Python lists and dictionaries. Convert your Python data to JSON format (json.dumps()) and paste it directly. Perfect for debugging data pipelines, comparing pandas DataFrames exported as JSON, and validating ETL outputs.

JavaScript Array Compare

Diff JavaScript arrays and objects side by side. Works with JSON.stringify() output from React state, Redux stores, API responses, and Node.js data structures. Debug state changes visually.

JSON Object Diff

Deep compare JSON objects at any nesting level. See exactly which keys were added, removed, or modified. Ideal for API response testing, configuration file comparison, and schema migration validation.

PHP Array Comparison

Compare PHP arrays by converting them with json_encode(). Debug associative arrays, validate Laravel/Symfony config differences, and compare database query results across environments.

Go Slice Diff

Compare Go slices and maps by marshaling to JSON with json.Marshal(). Useful for comparing API responses, testing data transformations, and validating microservice outputs.

Ruby & Java Arrays

Works with Ruby arrays (.to_json), Java collections (via Jackson/Gson), C# lists, and any language that can serialize to JSON. One tool for all your array comparison needs.

Frequently Asked Questions

What types of data can I compare with this array diff tool?

Any JSON-formatted data: arrays of strings, numbers, booleans, objects, nested arrays, and null values. This includes REST API responses, database query results, configuration files, and test fixtures. If your language can output JSON, ArrayDiff can compare it.

Is my data safe and private?

Yes. All comparison processing happens entirely in your browser using client-side JavaScript. No data is sent to any server — your arrays never leave your device. The tool even works offline once loaded.

What's the maximum array size I can compare?

Arrays with thousands of elements work smoothly. The tool supports inputs up to 5MB with up to 50,000 elements and 10 levels of nesting depth. Performance depends on your device, but the diffing algorithms are optimized for large datasets.

Can I compare nested JSON arrays and objects?

Yes — ArrayDiff performs deep comparison at any nesting level, including objects within arrays, arrays within arrays, and mixed structures. It uses recursive comparison with string similarity matching to provide detailed, accurate diffs.

What programming languages does this diff tool support?

Any language that outputs JSON-compatible data: Python lists, JavaScript arrays, PHP arrays, Ruby arrays, Go slices, Java collections, C# lists, TypeScript, Kotlin, Swift, and more. Just serialize your data to JSON and paste it in.

How is this different from a text diff tool?

Unlike plain text diff tools, ArrayDiff understands the structure of your data. It compares arrays element by element and objects key by key, providing semantic diffs rather than line-by-line text comparisons. This means reordering whitespace or formatting won't create false positives.

Can I use ArrayDiff for API response testing?

Absolutely. Paste your expected and actual API responses to instantly spot differences. This is perfect for regression testing, validating API version upgrades, comparing staging vs. production responses, and debugging webhook payloads.

Is ArrayDiff free to use?

Yes — ArrayDiff is completely free with no registration, no usage limits, and no feature gates. All tools on ArrayDiff.com are free for developers.