DM2Text adds a native-looking Copy context action to each message menu. Select an end message, choose how many messages you need, and the extension collects the preceding context into a chronological transcript on your clipboard.
- Uses the selected message as an immutable end anchor.
- Collects older messages automatically through Instagram's virtualized chat history.
- Preserves senders, visible timestamps, text, replies, media labels, shared posts, emoji, and Meta AI responses when available.
- Keeps messages ordered from oldest to newest and excludes anything after the anchor.
- Supports cancellation, partial-copy confirmation, and best-effort viewport restoration.
- Matches Instagram's light or dark appearance with a small, native-looking interface.
- Processes conversation content locally with no persistence or extension-originated network traffic.
One native-looking action opens one focused copy session.
![]() |
![]() |
| Choose Copy context on the anchor message. | Enter the number of messages and start the copy session. |
- Download
dm2text-0.1.0-chrome.zipfrom the latest release. - Extract the ZIP to a permanent folder.
- Open
chrome://extensionsin Chrome or another Chromium browser. - Enable Developer mode.
- Choose Load unpacked and select the extracted folder.
Important
Keep the extracted folder after installation. The browser loads the extension from that location.
- Open a conversation in Instagram Direct.
- Hover the final message you want in the transcript and open its three-dot menu.
- Choose Copy context.
- Enter the number of messages to collect.
- Paste the resulting transcript wherever you need it.
If Instagram cannot expose the full requested range, DM2Text asks before copying the available portion.
[10:41 AM, Tuesday] Person A: Did you see the draft?
You (replying to Person A: Did you see the draft?): Yes, sending notes now.
Person B: [shared post by example.account]
Caption: A visible post caption
Person A: [image]
Conversation data exists only in page memory while a copy session is active. DM2Text does not persist message content and initiates no fetch, XHR, WebSocket, beacon, or other extension-originated network request.
The only intentional output is the transcript you request on the operating-system clipboard. Clipboard contents remain available to the operating system and other applications until replaced.
Install Node.js and pnpm, then run:
pnpm install
pnpm devWhile WXT is running, open the browser's extension manager, enable Developer mode, choose Load unpacked, and select .output/chrome-mv3-dev.
Useful commands:
pnpm test # Run the test suite once
pnpm typecheck # Check strict TypeScript types
pnpm build # Create a production build
pnpm zip # Package the production extensionThe implementation is split by responsibility:
src/instagram/isolates Instagram DOM discovery, parsing, and scrolling.src/collection/owns the transient copy session.src/transcript/selects and formats normalized messages.src/ui/creates the session dialog and toasts only when needed.
Contributions are welcome. Read the contribution guide, code of conduct, and security policy before opening an issue or pull request.
DM2Text is an independent project and is not affiliated with, endorsed by, or sponsored by Instagram or Meta.
Copyright © 2026 Piero A. Postigo Rocchetti. DM2Text is licensed under GPL-3.0-only.
Instagram virtualizes conversations and can change its private DOM without notice. DOM changes may require updates to DM2Text's centralized selectors and anonymized fixtures. Data that Instagram does not expose in the mounted page cannot be included, and restoring the selected message to the viewport is best-effort and bounded to three seconds.
The project budgets are less than 60 KB of total minified JavaScript and less than 200 KB for the packaged extension.

