A markdown-first browser built with Electrobun. md-browse prioritizes markdown content when fetching web pages, and converts HTML to clean markdown similar to what AI tools do.
For pages that respect Accept: text/markdown headers, it directly displays that data, like the Vercel docs:
For regular HTML, it passes the page through turndown with settings that aim to match what Copilot, Claude etc. do:
-
Markdown-First: Sends
Accept: text/markdownheaders first to get native markdown when available -
HTML to Markdown: Automatically converts HTML pages to clean, readable markdown using Turndown, tuned to match what AIs see
-
Dual View Mode: Toggle between raw markdown view and rendered preview
-
Tab Support: Multiple tabs with full navigation history (back/forward)
-
Clean Design: Dark, modern UI focused on readability
- Bun runtime
- macOS (for native app development)
# Install dependencies
bun install
# Run in development mode
bun run start# Build the application (current platform)
bun run build
# Build Windows x64 artifacts
bun run build:stable:winThe app consists of:
-
Bun Process (
src/bun/index.ts): Main process that handles:- HTTP requests with markdown-priority Accept headers
- HTML to Markdown conversion using Turndown
- Tab and navigation state management
- RPC communication with the view
-
Toolbar View (
src/toolbar-svelte/→ compiled tosrc/toolbar/): Single view containing:- Tab bar for managing multiple tabs
- Navigation controls (back, forward, reload)
- URL input bar
- Markdown/Preview toggle switch
- Content display area (raw markdown or rendered preview)
- When you enter a URL, the app fetches it with
Accept: text/markdownheader first - If the server returns markdown content, it's displayed directly
- If HTML is returned, Turndown converts it to clean markdown:
- Strips scripts, styles, navigation, footers
- Extracts main content from
<main>or<article>tags - Converts headings, links, lists, code blocks, etc.
- Toggle between "Markdown" (raw) and "Preview" (rendered) views