TextCompareLab

Processed on your device.

JSON Formatter, Validator & Compare

Syntax check only. Everything runs in your browser.

More information

How it works

  1. Paste JSON into a box, or open a .json file.
  2. The page checks the syntax as you type and says what is wrong and where (when the browser reports a position).
  3. Select Format to pretty-print valid JSON with the indentation you choose. Invalid JSON cannot be formatted - fix it first.
  4. Add a second document and select Compare. Both sides are formatted the same way first, so only real content changes appear.

What gets checked

JSON syntax only: brackets, commas, quotes, numbers and literals. The page does not check data against a JSON Schema and does not judge whether values are correct.

Error positions

Error details come from your browser's JSON parser. Most browsers report a line and column; when they do not, the page says so instead of guessing.

Privacy

Your JSON is processed on your device. It is not sent to a server for formatting, validation or comparison.

How to format, validate and compare JSON

  1. Paste or open a JSON document in the left box. The syntax check runs as you type.
  2. If there is an error, read the line and column and the short hint, fix the text, and repeat until it is valid.
  3. Select Format for clean indentation - 2 spaces, 4 spaces or a tab.
  4. To compare two documents, paste both and select Compare. Formatting differences are removed first, so reformatting one side does not show as a change.

Guide: How to compare two JSON files or API responses

Compare text in your browser

Your pasted text and opened files are processed on your device for comparison. They are not uploaded to a server to run the comparison.

Free, with no sign-up

Paste two versions, review the differences and copy or download the result. Recent comparisons are saved in this browser's History. Clearing site data removes them.

English Español Deutsch 日本語 Français Português Русский Italiano Nederlands Polski Türkçe हिन्दी 简体中文