Mock JSON Generator
Describe a shape and get as many rows of matching JSON as you need.
Compare two files side by side and export a unified diff.
The Code Diff Viewer uses Myers’ algorithm — the one Git uses — so two nearly identical files of several thousand lines compare almost instantly, where the usual longest-common-subsequence table would need memory proportional to their product.
Paste two versions and see exactly what changed: line by line, with the changed words picked out inside a modified line, and a unified diff ready to copy or save as a patch file.
The comparison uses Myers’ algorithm — the one Git itself uses — rather than a longest-common-subsequence table. The table approach needs memory proportional to the product of the two line counts, which is fine for a snippet and hopeless for two files of a few thousand lines each, which is exactly the size people paste. Myers is proportional to the number of differences instead, so two nearly identical large files compare almost instantly. Everything runs in your browser: nothing is uploaded, which matters when the thing you are diffing is a config file with credentials in it.
Proportional to the number of differences rather than the size of the files, so pasting two large versions does not hang the tab.
A one-word edit inside a line is shown as a one-word edit, rather than as a whole line removed and another added.
Proper @@ hunk headers and context lines, so the output is a patch file rather than a picture of one.
Ignore all of it, or just trailing — the fastest way to find a real change buried under a reformat.
Which is the point when the file you are comparing holds credentials or customer data.
On the left — any code or text.
On the right.
Removed lines in red, added in green, with changed words highlighted within a line.
Switch to the unified diff and copy it, or download it as a .patch file.
No. The comparison runs entirely in your browser — nothing is sent to a server, which is the point when the file you are comparing holds credentials or customer data.
The standard patch format: a header naming the files, then hunks marked @@ giving line numbers, then the changed lines prefixed with - and +. It is what `git diff` prints and what `patch` reads.
Yes, and it is the fastest way to see a real change under a reformatting. There is a separate option for trailing whitespace alone, which catches the commonest accidental difference.
Because a diff aligns matching lines, and an insertion pushes everything after it down on one side only. The line numbers on each side are shown so the real position is never in doubt.
What people who use the Code Diff Viewer think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Code Diff Viewer. It takes half a minute and no account.
Write the first reviewDescribe a shape and get as many rows of matching JSON as you need.
See your own user agent string and what a server can tell from it.
Turn an array of JSON records into INSERT statements, with an optional CREATE TABLE.
Turn any text into a safe slug, filename, anchor or branch name.
Find what runs on a port, with a note on whether it should be exposed.
Normalise YAML indentation, quoting and key order in one pass.
Generate ULIDs — sortable by creation time and case-insensitive.
Decode a JWT and read its header, claims and expiry in plain English.