# Discord Message Preview > Browser tool at https://discord.cp20.dev that renders a Discord message payload (content, embeds, components, Components V2) the way the Discord client draws it, validates it against Discord's rules, and shares it as a link. The payload travels in the URL fragment, so it never reaches a server. No account or API key. Use it to: - make a link that opens a payload in the editor: `https://discord.cp20.dev/#p3=` (algorithm below, no UI needed) - look up the shape of content, embeds and components (sections below) - show a person what a bot or webhook message will look like before sending it Pages: `/` editor with live preview, `/gallery` examples, `/docs` human-readable docs, `/llms.txt` this file, `/p3-dictionary.txt` the compression dictionary as raw bytes. ## Making a link (#p3=) This is the only link format the site reads. Older links (`#p=`, `#p2=`) are not decoded any more; the editor shows a notice instead. 1. Serialize the payload as JSON. Minified is shortest: `JSON.stringify(payload)` or Python `json.dumps(payload, ensure_ascii=False, separators=(",", ":"))`. Any valid JSON is accepted; the editor pretty-prints it on open. 2. Encode the JSON text as UTF-8. 3. Compress with raw DEFLATE (RFC 1951: no zlib or gzip header and no checksum, 32 KiB window) using the DICTIONARY below as the preset dictionary. Any compression level works; 9 gives the shortest links. 4. Encode the bytes as base64url (RFC 4648 §5, `-` and `_`) and remove `=` padding. 5. The link is `https://discord.cp20.dev/#p3=`. Decoding is the reverse: base64url-decode, raw-inflate with the same dictionary, UTF-8 decode. A stream made without the dictionary still decodes, it is just longer. A dictionary-compressed stream can't be inflated without it. Python: ```python import base64, json, zlib, urllib.request DICT = urllib.request.urlopen("https://discord.cp20.dev/p3-dictionary.txt").read() # or paste the JSON string below, .encode("utf-8") def p3_link(payload): c = zlib.compressobj(9, zlib.DEFLATED, -15, zdict=DICT) # -15 = raw deflate raw = c.compress(json.dumps(payload, ensure_ascii=False, separators=(",", ":")).encode()) + c.flush() return "https://discord.cp20.dev/#p3=" + base64.urlsafe_b64encode(raw).decode().rstrip("=") def p3_decode(value): d = zlib.decompressobj(-15, zdict=DICT) return json.loads(d.decompress(base64.urlsafe_b64decode(value + "=" * (-len(value) % 4))) + d.flush()) ``` Node.js (built-in zlib): ```js import zlib from "node:zlib"; const DICT = Buffer.from(DICTIONARY_JSON_STRING, "utf8"); // the JSON string literal below const link = (payload) => "https://discord.cp20.dev/#p3=" + zlib.deflateRawSync(Buffer.from(JSON.stringify(payload)), { level: 9, dictionary: DICT }).toString("base64url"); ``` Browser (fflate, what the site itself uses): `toBase64Url(deflateSync(strToU8(json), { level: 9, dictionary: strToU8(DICTIONARY) }))`. ### Dictionary (version 2) The dictionary is the UTF-8 encoding of the string below (a JSON string literal; parse it to get the exact text, there is no trailing newline). 6554 bytes, SHA-256 `2404535b63d39b720d52a82a3d6183ff41ba3e710a70a7e882e36465a73ebe7e`. The same bytes are served at https://discord.cp20.dev/p3-dictionary.txt. It holds common Japanese words, then common English words, then minified JSON phrases frequent in Discord payloads, rarest first (DEFLATE copies from near the end cost fewer bits). It is frozen: a new dictionary would get a new prefix (#p4=). ```json "日曜土曜金曜木曜水曜火曜月曜みなさん皆さん全員少しぜひまたまだもうにもとはではにはのはのででしょうでしたますですお待ちくださいくださいませんましたしますしましたしていますありますありませんできませんできます申し訳ありませんすみません失礼しますお疲れさまですこんにちはおはようございますおめでとうありがとうありがとうございますお願いしますよろしくお願いしますご不便ご協力ご参加ご確認ご利用使用利用可能必要方法場合ときものことなどためによるについてよりからまで以下以上期限期間無料料金予約ページサイト公式リンクファイル画像動画配信イベント運営管理者担当者お問い合わせ問い合わせ連絡返信回答質問ルール注意内容説明一覧詳細結果投票リアクション通知設定ボタンメッセージコマンドボットユーザーロールメンバーチャンネルサーバーメンテナンス再開延期中止終了開始完了対応修正削除追加更新変更確認登録申込申し込み受付締切締め切り募集参加者参加場所日時時間予定開催午後午前毎週来月今月来週今週昨日明日今日本日告知お知らせPoint House Animal Away Air Spell Play Off Change Again Picture Hand Kind Try Move Us Home Different Land Need Read Men Went AskWhy Here Too Same Tell Great Help Say Think Over Give Good Year Take Know Only Most Where Just Through Very Well Work AnyBack Also After New Part May Made Come Get Did Day Down Long Find Now Its Oil Who Call Been Water First Than MyPeople Could Way No Number See Go Write More Two Look Has Time Into Him Like Make Would Her Some So These Them ThenMany Out About Other Up Will If Their How Do She Which Each An Use There Said Can Your When We Were All WhatNot But Word By Had One Or From Have This Be At They His With As Are On For Was He It That YouIs In To And Of The December November October September August July June May April March February January Sunday Saturday Friday Thursday Wednesday Tuesday Monday listen played playing music video live stream score players player match games game team answer question results poll vote enter entries winner leaderboard rank points level account profile links link guide rules read none all less more back previous next queue waiting pending completed complete successful success failed warning errors error status offline online left leave joined join reminders reminder scheduled schedule events event notifications notification disabled disable enabled enable setting settings options option pick choose select buttons button click reactions reaction react reply commands command messages message bots bot users user roles role members member channels channel servers server support issues issue bugs bug fix fixed features feature released release version new now available updates updated update hours minutes tonight evening afternoon morning month weekend week yesterday tomorrow today welcome thank thanks please family leave being song list soon talk young cut mountain sometimes girl above let almost really far watch face eat enough idea miss later second without stop hear book once state carry four river took grow began sea white walk night mile car feet side children until important run often group got together paper both those always life begin example open hard next seem something close might along while few left saw story under head thought light eye earth city start never tree keep father school last plant country below own between food add near every high world should learn still study found answer mother letter page point house animal away air spell play off change again picture hand kind try move us home different land need read men went ask why here too same tell great help say think over give good year take know only most where just through very well work any back also after new part may made come get did day down long find now its oil who call been water first than my people could way no number see go write more two look has time into him like make would her some so these them then many out about other up will if their how do she which each an use there said can your when we were all what not but word by had one or from have this be at they his with as are on for was he it that you is in to and of the「」()・〜、。年月日時分曜日\"allowed_mentions\":{\"parse\":[]}\"attachments\":[]\"thread_name\":\"\"username\":\"\"avatar_url\":\"https://\"sku_id\":\"\"min_values\":1,\"max_values\":\"default_values\":[{\"id\":\"\"channel_types\":[0]{\"type\":8,\"custom_id\":\"{\"type\":7,\"custom_id\":\"{\"type\":6,\"custom_id\":\"{\"type\":5,\"custom_id\":\"{\"type\":4,\"custom_id\":\"\"proxy_url\":\"\"width\":\"height\":\"provider\":{\"name\":\"\"video\":{\"url\":\"https://\"type\":\"rich\"{\"type\":1,\"components\":[{\"type\":3,\"custom_id\":\"\"placeholder\":\"\"options\":[{\"label\":\"\"},{\"label\":\"\",\"value\":\"\"default\":true{\"type\":13,\"file\":{\"url\":\"attachment://\"spoiler\":true{\"type\":12,\"items\":[{\"media\":{\"url\":\"https://\"}},{\"media\":{\"url\":\"https://\"accessory\":{\"type\":11,\"media\":{\"url\":\"https://\"},\"description\":\"https://cdn.discordapp.com/attachments/https://media.discordapp.net/https://discord.cp20.dev/samples/https://github.com/https://example.com/.webp.jpg\"}.png\"}\"timestamp\":\"2026-T00:00:00.000Z\"\"footer\":{\"text\":\"\",\"icon_url\":\"https://\"image\":{\"url\":\"https://\"thumbnail\":{\"url\":\"https://\"author\":{\"name\":\"\",\"inline\":true},{\"name\":\"\",\"inline\":false}\"fields\":[{\"name\":\"\",\"value\":\"\"color\":{\"content\":\"\",\"embeds\":[{\"title\":\"\"embeds\":[{\"title\":\"\"description\":\"\"emoji\":{\"id\":\"\",\"animated\":true}\"emoji\":{\"name\":\"\"disabled\":true{\"type\":2,\"style\":4,\"label\":\"{\"type\":2,\"style\":3,\"label\":\"{\"type\":2,\"style\":2,\"label\":\"{\"type\":1,\"components\":[{\"type\":2,\"style\":1,\"label\":\"\",\"custom_id\":\"\"accessory\":{\"type\":2,\"style\":5,\"label\":\"\",\"url\":\"https://<@&<#