SHARE DIFF

Compare text, JSON, YAML, and code online

See line, word, character, and structure changes as you type, then create a shareable diff link.

Both sides use
Left content Original
Right content Changed
0.00 MB / 1 MB Upgrade limit
LIVE RESULT

Differences

No differences
Expiration
Visibility
TEXT AND CODE DIFF TOOL

An online diff checker for text, data, and source code

Compare two versions without switching between files or manually hunting for changes. Pastes.io keeps the original and changed content side by side, updates the diff as you type, and lets you inspect changes by line, word, character, or parsed structure.

Use it for prose, application code, API responses, configuration files, deployment manifests, logs, and other text-based formats. When the review is complete, both sides can be saved together and shared at one URL.

JSON DIFF

Compare JSON and share a JSON diff

Select JSON to compare API responses, request bodies, exported data, package files, or application settings. Structure mode parses both documents and recursively normalizes object keys, so whitespace and property order do not appear as changes when the underlying JSON content is the same.

JSON arrays remain ordered because moving an item can change its meaning. If a value, field, nested object, or array item changes, the normalized diff makes that difference easier to isolate. You can then create and share a JSON diff with the two original documents preserved.

Need to share one document? Share JSON online.
YAML DIFF

Compare YAML files by structure

Use the YAML diff checker for Kubernetes manifests, Docker Compose files, CI workflows, infrastructure configuration, and application settings. Structure mode ignores the order of keys in YAML mappings and ignores formatting-only changes.

Sequence order is still significant, so reordered deployment steps, containers, rules, or other list items remain visible. If either document is temporarily invalid while you edit, the tool continues with a line comparison until both YAML files parse correctly.

Need to share one document? Share YAML online.
CODE DIFF

Compare code online and share a code diff

Compare source code, scripts, SQL, markup, and configuration files in the same two-pane editor. Choose a language for readable editing, then use line mode for commits and file revisions, word mode for compact changes, or character mode for exact edits inside a line.

A shareable code diff is useful for code review outside a repository, debugging with a teammate, documenting a proposed fix, or showing the difference between generated files. The recipient gets both source versions and the rendered diff from one link.

Need to share one snippet? Share code online.
SHAREABLE DIFF

Save and share text, code, JSON, or YAML differences

Instead of sending two attachments and asking someone else to run a comparison, save the result as one shareable diff. The link keeps the left version, right version, selected syntax, and comparison controls together.

Before creating the link, choose its visibility, expiration, and optional password. Pastes.io can also detect likely credentials, tokens, email addresses, and IP addresses in either side and remove them before the comparison is saved.

Return to the comparison tool.
HOW IT WORKS

How to compare and share two files

  1. Add both versions. Paste text into the left and right editors or load a local file into either side.
  2. Select the syntax. Choose JSON, YAML, a programming language, or plain text so the editor and comparison options match the content.
  3. Review the differences. Switch between structure, line, word, and character modes, then use Next difference to move through each change.
  4. Create the shareable diff. Configure access and expiration, remove sensitive data if detected, and create one link for the complete comparison.
FREQUENTLY ASKED QUESTIONS

Comparing and sharing code or data

Can I compare JSON when the keys are in a different order?

Yes. Select JSON and use Structure mode. Object key order and formatting are ignored, while array order is preserved because changing array order can change the meaning of the data.

Can I compare YAML files online?

Yes. Load or paste two YAML documents and select YAML. Structure mode compares parsed mappings without treating key order or formatting as a change. YAML sequence order is still compared.

Can I compare source code?

Yes. Select the programming language, paste or load the original and changed code, and review the diff by line, word, or character. The language selector supports many common code and configuration formats.

Can I share a code diff or JSON diff?

Yes. Create the comparison after reviewing it to place both versions and the diff at one shareable URL. You can also configure visibility, expiration, and password protection before saving.

What happens when JSON or YAML is invalid?

The editor keeps showing line differences and identifies that valid structured data is required. Structure comparison resumes automatically after both sides can be parsed.