Primary repository: Codeberg
https://codeberg.org/prooma/google-messages-web-exportGitHub: read-only mirror (issues and pull requests disabled)
Export chat conversations from https://messages.google.com/web directly from the browser Developer Tools console.
This script allows you to extract a full conversation as plain text or structured JSON without installing browser extensions or modifying the page.
- Export conversations as readable plain text
- Export conversations as structured JSON
- No browser extensions required
- No external dependencies
- Does not modify the live DOM
- Designed for manual use in DevTools
Go to:
https://messages.google.com/web
Open the conversation you want to export.
- Chrome / Edge:
F12orCtrl+Shift+I - Firefox:
F12orCtrl+Shift+K(Console) /Ctrl+Shift+I(DevTools) - Switch to the Console tab
Copy the contents of exportConversation.js into the console and press
Enter.
exportConversation();exportConversation({ returnJson: true });Chrome DevTools provides a built-in copy() helper.
copy(exportConversation());copy(JSON.stringify(exportConversation({ returnJson: true }), null, 2));[Tuesday, 20 Jan, 12:05] Me:
Hello!
[Tuesday, 20 Jan, 12:06] John Doe:
Hi!
[
{
"date": "Tuesday, 20 Jan",
"time": "12:05",
"name": "Me",
"text": "Hello!"
},
{
"date": "Tuesday, 20 Jan",
"time": "12:06",
"name": "John Doe",
"text": "Hi!"
}
]- The script relies on the current DOM structure of Google Messages
Web
(custom elements likemws-message-wrapper,mws-tombstone-message-wrapper). - Link previews (
mws-link-preview-decorator) are automatically excluded. - Timestamps are reconstructed based on tombstones and message-level timestamps.
- If a date or time is not available, the corresponding field is left empty.
This project is not affiliated with or endorsed by Google.
Google Messages and related names are trademarks of Google LLC.
MIT License