See how a link looks when shared on social and chat apps, before you ship it. Works with localhost.
Official debuggers such as the Facebook Sharing Debugger or LinkedIn Post Inspector cannot reach your local dev server. OG Tester runs on your machine, fetches the page like a social crawler, and renders a close replica of the post on 14 services, in light and dark mode.
Two ways to use it:
- Hosted: check live, public sites at og.kandera.cz. Nothing to install.
- Local: clone and run it (see Quick start) to check
localhostand private networks.
- 14 previews: Facebook, Messenger, X, Threads, LinkedIn, Pinterest, Bluesky, Mastodon, Slack, Discord, WhatsApp, iMessage, Telegram, and Google search.
- Real crawler behavior: no JavaScript runs, so tags added on the client are missing here too, just like on the real platforms.
- Per-platform rules: each card uses that platform's tag fallbacks and picks a large, small, or text-only layout from the real image size.
- Warnings: missing tags, relative or
httpimage URLs, small or heavy images, crop ratio, long titles,og:urlmismatch, and more. Each warning names the platforms it affects. - Image checks: real dimensions, type, and file size of every
og:imageandtwitter:image. - Tag table: all tags grouped by type. Click a value to copy it.
- Light, dark, and system theme for the app and every card.
Requirements: Bun 1.4 or newer.
git clone https://github.com/xergic/og-tester.git
cd og-tester
bun install
bun run devOpen http://127.0.0.1:4321 and paste a URL, for example http://localhost:3000/.
The server listens on 127.0.0.1 only. Set PORT<
7C41
/code> to change the port.
| Parameter | Effect |
|---|---|
?url=<page> |
Fetch this page on load |
?theme=light|dark |
Override the theme without saving it |
?platforms=x,facebook |
Show only these cards |
Close, not perfect. The platforms change their UI often and most are closed source.
- Bluesky and Mastodon values come from their open-source code.
- The other platforms use values from official docs, public write-ups, and inspection. Each value is marked
verifiedorestimatedindocs/platform-specs.md. - Some behavior is surprising but real: X large cards show only the image with a domain label, and LinkedIn shows a compact card for normal (not promoted) posts.
Spotted a difference? Open an issue with a screenshot of the real post.
bun test # unit and integration tests
bun run typecheck # TypeScript
bun run lint # Biome (bun run format to fix)scripts/screenshot.sh renders cards in headless Chrome for visual checks. Test pages live in tests/fixtures/ and are served at /fixtures/*.
Tech: Bun server with HTML imports, vanilla TypeScript client, no framework. Runtime dependencies: image-size and entities.
The hosted version previews public URLs only. A Worker cannot reach localhost or private networks, so it rejects them with a message that points to the local setup.
bun run preview # build and run the Worker locally with wrangler dev
bun run deploy # build and deploy (runs wrangler login on first use)worker.tsserves/api/previewand the built client fromdist/as static assets./api/previewis rate limited to 30 requests per minute per IP. Change it inwrangler.jsonc.- The Worker rewrites
og:imageandog:urlto absolute URLs on the current domain, so no domain config is needed.
Contributions are welcome. Read CONTRIBUTING.md for setup, project layout, and how to add or fix a platform.
MIT © Ondra Kandera
Brand icons come from Simple Icons (CC0). All product names, logos, and brands belong to their owners. OG Tester is not affiliated with or endorsed by any of them.