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

Get started in three simple steps. For the full walkthrough with keyboard shortcuts and format tips, read the complete guide.

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. See the full examples page with live diffs for each scenario.

🔄 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.

Quick Answers

Got questions? See the full FAQ page for detailed answers.

How does ArrayDiff handle whitespace and formatting differences?

ArrayDiff compares the parsed data structure, not raw text. This means insignificant whitespace, trailing commas, and formatting differences are ignored. Only actual value changes are shown. For raw text comparison, use the Text Diff tool.

Can I compare data from different programming languages?

Yes. Since ArrayDiff works with JSON, you can compare a Python list against a JavaScript array or any other language's output. Just serialize both to JSON and paste them in.

Does ArrayDiff work without an internet connection?

Once the page loads, all comparison logic runs locally in your browser with zero server calls. You can disconnect and continue comparing. This also means your data stays entirely on your device — see our privacy policy.

What do the colors in the diff output mean?

Green = added (in Array 2 only), Red = removed (in Array 1 only), Yellow = modified (same position, different value), Gray = unchanged. The summary bar at the top shows counts for each type.