# Diff > A diff of two files drawn in the browser, at https://diff.frameworkphp.com.ar/. > A link can carry the two files, so opening it shows the diff right away. The files go after the `#` of the link, which the browser never sends anywhere. There are two ways to write them. ## Written out For short files. Each value is percent-encoded, the way `encodeURIComponent` in JavaScript and `urllib.parse.quote(text, safe="")` in Python do it: a space is `%20`, a new line is `%0A`, and a `+` stays a plus. https://diff.frameworkphp.com.ar/#old=&new= ## Packed For anything longer. The fields go in a JSON object, which is gzipped and written in base64, in either alphabet, with or without the padding. https://diff.frameworkphp.com.ar/#z= In Python: import base64, gzip, json fields = { "old": old_text, "new": new_text, "oldName": "a.json", "newName": "b.json" } packed = base64.urlsafe_b64encode(gzip.compress(json.dumps(fields).encode())).decode() print("https://diff.frameworkphp.com.ar/#z=" + packed) In a shell, with the two files on disk: jq -n --rawfile old a.json --rawfile new b.json '{old: $old, new: $new}' \ | gzip -9 | base64 | tr -d '\n' \ | sed 's|^|https://diff.frameworkphp.com.ar/#z=|' ## Fields - `old`: the text of the old file. - `new`: the text of the new file. - `oldName`, `newName`: optional, the names of the files. The extension picks how the code is coloured. - `layout`: optional, one of `split` (side by side), `unified`, or `tree` (the structure of two JSON files, key by key). ## Showing it Give the link as a Markdown link, since the address is long. When you run on the machine of whoever is to see the diff, open it for them instead, which has no chat in the way to cut a long address short: open "" # macOS xdg-open "" # Linux