A fake chat screenshot generator that runs entirely in the browser — no server, no API required. 完全在浏览器中运行的假聊天截图生成工具 — 无需服务器,无需 API。
FakeChatGen lets you create realistic-looking fake chat screenshots in three popular styles: WhatsApp, Discord, and iMessage. You can set up custom characters, type any conversation, and export it as a PNG or JPEG image.
# Clone the repository
git clone <repo-url>
cd FakeChatGen
# Install dependencies
npm install
# Start the development server
npm run devThen open your browser to http://localhost:5173.
npm run build
npm run previewAt the top of the left panel, select one of three visual styles:
| Style | Description |
|---|---|
| Dark teal header, green/white bubbles, beige background | |
| Discord | Dark desktop-style layout, colored usernames |
| iMessage | Clean white layout, blue sent / gray received bubbles |
You can also set the theme (Funny / Office / Drama) to categorize the conversation.
In the Characters section:
- Type a character's name in the input field.
- Check "This is Me (right side)" if this character represents you — their messages will appear on the right side.
- Click Add. Up to 5 characters are supported.
You can delete any character by clicking the red ✕ button. Deleting a character also removes their messages.
In the Messages section:
- Select a sender from the dropdown.
- Type the message content.
- Optionally enter a time (e.g.
14:30or2:30 PM). - Click Add Message or press Ctrl + Enter.
The chat preview on the right updates automatically.
To delete a specific message, click the ✕ icon on it. To clear all messages, click Clear All.
Click one of the three template buttons in the Templates section:
- Funny — A humorous workplace conversation
- Office — A relatable office-life chat
- Drama — A dramatic soap-opera-style dialogue
The template language matches the currently selected UI language (Chinese or English). Loading a template will replace all current characters and messages.
In the Export section at the bottom:
- Click Export PNG for a lossless image (best quality).
- Click Export JPEG for a smaller file size.
The image will be downloaded automatically at 2× resolution for crisp output.
Click the globe button in the top-right corner of the header to toggle between Chinese (中文) and English.
| Shortcut | Action |
|---|---|
Ctrl + Enter |
Add the current message |
| Module | Technology |
|---|---|
| Frontend Framework | Vue 3 + TypeScript |
| Build Tool | Vite |
| State Management | Pinia |
| Internationalization | vue-i18n |
| Image Export | html2canvas |
| Styling | Scoped CSS (no external framework) |
FakeChatGen/
├── src/
│ ├── components/
│ │ ├── HeaderBar.vue # Top navigation + language toggle
│ │ ├── StyleThemeSelector.vue # Style & theme picker
│ │ ├── CharacterManager.vue # Add/remove characters
│ │ ├── MessageEditor.vue # Add/remove messages
│ │ ├── TemplatePanel.vue # Load preset templates
│ │ ├── ChatPreview.vue # Phone frame + live preview
│ │ ├── MessageBubble.vue # Individual message bubble
│ │ └── ExportPanel.vue # PNG/JPEG export
│ ├── stores/chat.ts # Pinia store (state management)
│ ├── composables/
│ │ ├── useTemplates.ts # Template data (zh + en)
│ │ └── useExport.ts # html2canvas export logic
│ ├── i18n/
│ │ ├── en.ts # English translations
│ │ └── zh.ts # Chinese translations
│ └── types/index.ts # TypeScript interfaces
├── public/
├── index.html
└── package.json
FakeChatGen 是一个在浏览器中运行的假聊天截图生成工具,无需服务器或 API。支持三种流行的聊天风格:WhatsApp、Discord 和 iMessage。你可以自定义角色,输入任意对话,并导出为 PNG 或 JPEG 图片。
# 克隆仓库
git clone <repo-url>
cd FakeChatGen
# 安装依赖
npm install
# 启动开发服务器
npm run dev然后在浏览器中打开 http://localhost:5173。
npm run build
npm run preview在左侧面板顶部选择三种视觉风格之一:
| 风格 | 描述 |
|---|---|
| 深绿色顶栏,绿色/白色气泡,米色背景 | |
| Discord | 深色桌面布局,彩色用户名 |
| iMessage | 简洁白色布局,蓝色发送/灰色接收气泡 |
也可以设置对话主题(搞笑 / 职场 / 情景剧),便于分类管理。
在角色管理区域:
- 在输入框中输入角色名字。
- 如果这个角色代表"你自己",勾选**"这是我(右侧显示)"**,该角色的消息会显示在聊天右侧。
- 点击添加。最多支持 5 个角色。
点击角色旁的红色 ✕ 按钮可删除角色,删除角色时其对应的消息也会一并删除。
在消息列表区域:
- 从下拉菜单中选择发送人。
- 输入消息内容。
- 可选填写时间(例如
14:30)。 - 点击添加消息,或按 Ctrl + Enter。
右侧聊天预览会实时更新。
点击消息上的 ✕ 图标可删除单条消息;点击清空所有可删除全部消息。
点击对话模板区域中的三个模板按钮之一:
- 搞笑 — 幽默职场对话
- 职场 — 贴近现实的上班吐槽
- 情景剧 — 戏剧化的情感对白
模板语言与当前 UI 语言一致(中文或英文)。 加载模板将替换当前所有角色和消息,会有确认提示。
在最下方的导出图片区域:
- 点击导出 PNG — 无损图片,画质最佳。
- 点击导出 JPEG — 文件较小,适合快速分享。
图片会自动以 2 倍分辨率下载,保证清晰度。
点击顶部右侧的地球图标按钮,即可在中文和 English 之间切换。模板内容也会随之切换。
| 快捷键 | 操作 |
|---|---|
Ctrl + Enter |
添加当前消息 |
| 模块 | 技术 |
|---|---|
| 前端框架 | Vue 3 + TypeScript |
| 打包工具 | Vite |
| 状态管理 | Pinia |
| 国际化 | vue-i18n |
| 图片导出 | html2canvas |
| 样式 | 组件 Scoped CSS |
FakeChatGen/
├── src/
│ ├── components/
│ │ ├── HeaderBar.vue # 顶部导航 + 语言切换
│ │ ├── StyleThemeSelector.vue # 聊天风格 & 主题选择
│ │ ├── CharacterManager.vue # 角色添加/删除
│ │ ├── MessageEditor.vue # 消息添加/删除
│ │ ├── TemplatePanel.vue # 预设模板加载
│ │ ├── ChatPreview.vue # 手机框架 + 实时预览
│ │ ├── MessageBubble.vue # 单条消息气泡
│ │ └── ExportPanel.vue # PNG/JPEG 导出
│ ├── stores/chat.ts # Pinia 状态管理
│ ├── composables/
│ │ ├── useTemplates.ts # 模板数据(中/英文)
│ │ └── useExport.ts # html2canvas 导出逻辑
│ ├── i18n/
│ │ ├── en.ts # 英文翻译
│ │ └── zh.ts # 中文翻译
│ └── types/index.ts # TypeScript 类型定义
├── public/
├── index.html
└── package.json
Made with Vue 3 + TypeScript