Compare Arrays Online

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

Your data stays in your browser — nothing is uploaded to any server.

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

Frequently Asked Questions

What types of data can I compare?

Any JSON-formatted data: arrays of strings, numbers, booleans, objects, nested arrays, and null values. If your language can output JSON, ArrayDiff can compare it.

Is my data safe and private?

Yes. All processing happens in your browser — no data is sent to any server. The tool even works offline once loaded.

What's the maximum array size?

Arrays with thousands of elements work smoothly. Performance depends on your device, but the tool is optimized for large datasets.

Can I compare nested arrays and objects?

Yes — ArrayDiff performs deep comparison at any nesting level, including objects within arrays, arrays within arrays, and mixed structures.

What languages are supported?

Any language that outputs JSON-compatible data: Python lists, JavaScript arrays, PHP arrays, Ruby arrays, Go slices, Java, C#, and more.