10KB. Zero dependencies.
Fully open source.
Every line of our chat widget is public. Verify our privacy claims yourself, audit the code, or just see how we fit so much into so little.
Size Comparison
Most chat widgets ship 100-200KB+ of JavaScript. Here's how GhostChat compares (gzipped size).
What's Packed Inside
All of this in a single file, with zero external dependencies.
WebSocket Messaging
Real-time two-way communication. Messages appear instantly for both visitor and agent — no polling, no delays.
File & Image Uploads
Visitors can share screenshots and files up to 5MB. Inline image preview, drag-and-drop support.
Typing Indicators
Both directions — visitors see when you're typing, you see when they're typing. Feels like iMessage.
Page Journey
SPA-aware page tracking shows agents which pages the visitor browsed. No cookies or external tracking needed.
Email Capture
When no agent responds within a configurable window, the widget prompts the visitor for their email. Converts abandoned chats into leads.
Presence Detection
Online/away status via visibilitychange and beforeunload. Agents see who's actively on the site right now.
How 10KB breaks down
1,293 lines. Every section accounted for. No framework, no dependencies, no tracking.
Don't Take Our Word for It
Read the code. Run these commands yourself on the open source repo.
Source Code Audit
$ grep "document.cookie" widget.ts$ grep "analytics\|tracking\|pixel" widget.ts$ grep "fingerprint" widget.tslocalStorage Usage
Only 4 keys — all prefixed, all functional, none for tracking.
ghostchat_session_idAnonymous session identifierghostchat_session_secretSession authenticationghostchat_emailVisitor-provided email (optional)ghostchat_tooltip_shownWhether welcome tooltip was displayedNetwork Requests
All API calls go to your GhostChat API domain only. No third-party requests, no CDN dependencies, no external fonts, no iframes from other domains. The widget auto-detects the API URL from its own script src attribute.
Architecture
One file. One script tag. No build pipeline required on your end.
Single IIFE
Immediately Invoked Function Expression — runs on load, no global namespace pollution.
Auto-Detects API URL
Reads the src attribute of its own script tag. No config files needed.
Zero Dependencies
Pure TypeScript compiled to vanilla JS. No React, no jQuery, no frameworks — just the DOM API.
WebSocket-First
Opens a persistent connection for instant messaging. Reconnects automatically if the connection drops.
Double-Init Guard
If the script is accidentally included twice, it detects the existing instance and skips re-initialization.
Transparency builds trust
Star the repo, read every line, or just install the widget. It's all open.
Related: Lightweight Widget · Features · GDPR Chat Widget · Lighthouse Benchmark · Get Started