Compare code by language

Diffspot detects the language of what you paste and highlights it. Each page below opens the diff checker preset for one language, with a real example.

Programming and markup languages

Data and configuration formats

Data formats get a structural comparison: formatting and key order are normalized first, and every change is listed by path.

How language detection works

When you open a file, Diffspot looks at its name and extension first (Dockerfile, .tsx, Cargo.lock). For pasted text it scores characteristic patterns, such as def and indentation for Python, <?php for PHP or SELECT … FROM for SQL, and picks the best match from both sides together. Detection and highlighting run in a Rust engine compiled to WebAssembly, so they take a few milliseconds even for large files, and nothing is uploaded.

If the guess is wrong, choose the language from the Syntax menu in the toolbar.