An Excalidraw share link does not contain your drawing. It contains a scene ID and a decryption key. Your drawing is encrypted on your device, uploaded as a blob nobody can read, and only someone holding the link can decrypt it. I rebuilt the entire pipeline in a Python script and uploaded a diagram without ever pressing the app's Share button.
A post was going around showing AI drawing live inside Excalidraw, sketching out explanations stroke by stroke. I asked my assistant if it could do the same. Honest answer: it can't draw inside the app. But a .excalidraw file is just JSON, a list of boxes, arrows, and text. So it wrote one by hand: a full reference diagram for Euclidean distance, 61 real editable elements, recreated from a diagram in the thread. Then it wanted a share link for it, the way you'd get from pressing Share.
Share links look like excalidraw.com/#json=<stuff>. I assumed <stuff> was the drawing itself, so I compressed my scene and pasted it into the fragment. The app opened a blank canvas and stared back at me. Nothing.
#json=. Blank canvas.
The fragment is two things separated by a comma: a scene ID and a decryption key. The app fetches an encrypted blob from Excalidraw's servers and decrypts it in your browser. The server never sees your drawing. It never even sees the key, because URL fragments are never sent to servers. This is end-to-end encryption done right, and it's the default for every share link.
Here is what Excalidraw's server actually stores for my diagram. All 61 elements, the text, the arrows, the colors, reduced to this:
The exact recipe, pulled from a published open-source uploader instead of guessed: take the scene JSON, compress it with zlib, encrypt it with AES-128-GCM using a random 16-byte key and a random 12-byte IV, wrap it in Excalidraw's chunk format, and POST the raw bytes to json.excalidraw.com/api/v2/post/. The server hands back an ID. The link is excalidraw.com/#json=<id>,<key>, with the key in base64.
Type anything. Your browser encrypts it with AES-128-GCM, the same algorithm guarding the diagram. Nothing leaves your device.
The Python version is about 30 lines. One request, 0.6 seconds, scene ID received.
key = os.urandom(16); iv = os.urandom(12)
inner = concat(b"{}", scene_bytes)
ct = AESGCM(key).encrypt(iv, zlib.compress(inner), None)
payload = concat(b'{"version":2,"compression":"pako@1",'
b'"encryption":"AES-GCM"}', iv, ct)
r = requests.post("https://json.excalidraw.com/api/v2/post/",
data=payload)
scene_id = r.json()["id"]
url = f"https://excalidraw.com/#json=scene_id,b64(key)"
Trust, but verify. I downloaded the blob back from their server, decrypted it, decompressed it: all 61 elements, byte for byte identical to the original. Then I opened the link in the real app. The full diagram rendered, editable, every arrow and label in place.
Euclidean (L2) distance: the straight-line gap. Opens editable in excalidraw.com. The .excalidraw source files are linked below.
Any diagram my assistant generates is now one script run away from a real editable Excalidraw link. No export, no import, no dragging files into a browser tab. It writes the JSON, runs the uploader, sends the link.
A share link is a treasure map where X marks a locked box and the key is taped to the back of the map.