Open source · MIT · v0.9.1 preview

TgWitness

Messages change.
The record holds.

Telegram's own export hands you a file anyone can edit. TgWitness keeps every message, every edit and the text of every deleted post in a signed journal, can prove when and where it was captured, and hands it over with a verifier anyone can run.

The demo runs in your browser with fictional records. No Telegram sign-in.

  • Windows · macOS · Linux · Docker
  • 25 interface languages
  • Runs on your machine
  • Attested capture: GitHub · Intel TDX
A message, through time#0042
Payout · AnnouncementsFictional channel · message 42
  1. Message observed

    Send USDT (TRC-20) to TQ7x…9fA2

  2. Edit preserved

    Send USDT (TRC-20) to TR3m…k81D

    Previous version retained · journal record 13
  3. Deletion notice

    Gone from Telegram. The captured text stays in your journal.

h₁3f9a…h₂81c4…h₃e07d… Ed25519

The post disappears. The captured history remains.

Fictional example

01The problem

A Telegram export proves nothing. Not even to you.

Open an export in a text editor, change a 1 to a 2 and save. Nothing complains, and there is nothing to compare it against. Telegram does not sign messages, not in an export and not anywhere else. Screenshots and deletion logs share the same weakness: whoever holds the file holds the story.

TgWitness signs what your account saw, links every record to the one before it and ships the verifier inside the archive. The person who receives it checks the record instead of trusting whoever collected it.

  • Linked. Each record carries the SHA-256 of the one before it.
  • Signed. Every record has its own Ed25519 signature.
  • Checkable. Verify against a key fingerprint you trust, without the author's server.
Local SHA-256 experimentChecking…

Try it: change record 2

  1. Record 1message.new

    Send USDT (TRC-20) to TQ7x…9fA2

    previous
    0000…0000
    hash
    …
  2. Record 2message.edited
    previous
    …
    saved hash
    …
    recalculated
    …
  3. Record 3message.deleted

    Deletion notice for message 42

    previous
    …
    link
    …

The recalculated hash matches the saved one. All three links agree.

Hashes are calculated in your browser. This sample checks hashes only; the real verifier also checks the Ed25519 signature on every record against a trusted key.

Export Clinic · controlled experiment · 3 November 2026

We tried it with the official app.

Download Telegram Desktop, sign in and export seven test chats. Then a small local helper changes selected files. The official client is untouched, and the altered export reads like any other.

  • 7test chats, from a personal chat to a public channel
  • 17/45message records altered
  • 32files differ between before and after
  • 0changes to the official client

Before the local change

RESULT: FAIL

Hidden text remains selectable beneath the black rectangle.

JSON SHA-256d58d19814e1e07d5…

After the local change Altered

RESULT: PASS

All sensitive text has been permanently removed.

JSON SHA-25683a0a37eb7110d51…

result.json, message 1216 · test chat from the experiment

TgWitness signs at the moment of capture. For the strongest cases it captures where nobody can reach the data: in GitHub Actions or inside an Intel TDX machine. See the trust levels

02Compare

Telegram gives you a file. TgWitness gives you proof.

Telegram's own export is a convenience copy: the last version of whatever is still there, in files anyone can edit. TgWitness is built for evidence, from the first observation to the hand-over.

What you needTelegram Desktop exportTgWitness
Edited messageOnly the final textEvery version, in order
Deleted postGone from the exportText and files kept, deletion logged
Someone edits the fileNothing noticesOne changed byte breaks the chain
SignatureNoneEd25519 on every record
Who can verify itNobodyAnyone, offline, with the verifier in the archive
When it was capturedYour wordRFC 3161 and Bitcoin timestamps
Where it was capturedYour wordAttested by GitHub or Intel TDX
Messages cut or rolled backInvisibleCaught by an independent witness
Bot buttons you pressedNot recordedA signed receipt for each press

Tested on the official client: the Export Clinic altered 17 of 45 records, and the export still read like any other. See the experiment

And against every usual alternative.

ArtifactSignature on every recordExternal timeIndependent witnessAttested captureGaps reportedVerify without the authorScore
Telegram Desktop exportNoNoNoNoNoNo0/6
Telethon snapshot scriptNoNoNoNoNoNo0/6
Deletion logger (text log)NoNoNoNoNoNo0/6
Screenshots or web captureNoNoNoNoNoNo0/6
TgWitnessYesYesYesYesYesYes6/6

Compared as delivered. Scripts and loggers vary by implementation.

03How it works

From a conversation to a case file.

  1. 01

    Connect

    Sign in with a phone code or QR, or bring an existing session: Telegram Desktop TData, Telethon, Pyrogram, StringSession or an auth key. Each account gets its own workspace, vault and signing key.

  2. 02

    Choose the scope

    Selected chats, a Telegram folder or the whole account. Investigation mode adds bots, private chats, your own actions and a 200-message snapshot of every newly discovered source.

  3. 03

    Observe

    New messages, edits, deletions, reactions and membership changes enter the journal as they arrive. Attachments are saved with their SHA-256 and byte count.

  4. 04

    Investigate

    Search every source, follow a person by numeric Telegram ID, pin evidence to the Case Board and build a report in one of eight designs.

  5. 05

    Hand over

    Export a signed ZIP with the original JSONL, CSV, offline HTML, preserved files, a signed manifest and the verifier. The recipient checks it without your server.

04The workspace

Every captured change, right where you need it.

Open the interactive demo
TgWitness / ChatsFictional demo records
TgWitness chat view with a fictional message whose two saved versions are listed oldest first, each linked to its journal record
An edited message keeps every saved version, oldest first, each linked to its journal record.

05Capabilities

Built for the rest of the investigation.

Collection is where it starts. The panel also covers the work that follows: people, bots, notes, reports, teammates and the infrastructure around them.

Edits and deletions, kept

Every observed version is stored without overwriting the one before. When a message is deleted, the text you already captured stays next to the deletion notice, and starred sources are rechecked on their own schedule.

People by Telegram ID

Names and usernames over time, replies, “Also in…” other chats, and mentioned wallets, phones and links. Every fact cites its journal records.

Bot investigation

Save a link preview, start a bot with its parameter, reply or press a current button. Request and result become signed receipts; a changed keyboard is refused before the press.

Case Board

Bookmark observations, highlight an exact quote, group cards into collections and discuss them. Team notes are signed and stay separate from the evidence.

Report studio

Eight document designs with charts, transcript and findings. Edits show before and after with the changed words highlighted, and gaps in message IDs are listed. HTML, PDF and JSON each carry their own signature.

Full history, crash-safe

Load the available past of enabled chats with pause and resume. The message, its file job and the cursor commit together, so a restart repeats nothing and loses nothing.

Ask the archive

Local search first. Optional AI, off by default and local through Ollama or a provider you choose, answers with excerpts you can open in the journal.

Read-only MCP

Connect an analyst client to chosen workspaces and chats. Thirteen read-only tools with expiry and revocation, from ranked search to pinned posts and verified image previews; MCP cannot send messages or touch the journal.

Local OCR and transcription

Read images and voice messages in an isolated local worker. Originals and their hashes stay unchanged; recognized text is marked as machine output.

Many accounts, one panel

Any number of workspaces, each with its own session, journal, signing key and route. Group accounts to share settings and import session files in bulk.

Share without the keys

Give a reviewer one chat or an analyst export rights: personal tokens, ten permissions, expiry, IP limits and revocable sessions.

Routes you control

SOCKS5, HTTP CONNECT, MTProxy or portable WARP and WireGuard per workspace, with an automatic MTProxy pool from four public sources. Hide IP mode waits for a proxy instead of falling back to a direct connection.

Alerts and webhooks

Problem alerts and chat changes through Apprise, HMAC-signed webhooks with retries and an n8n example. Message excerpts are off by default.

Encrypted off-site copy

Journal, files, checkpoints and chat exports are encrypted with AES-256-GCM on your machine before upload to S3-compatible storage, with Object Lock where the bucket supports it. A restore publishes files only after they verify, and older files move off the disk only after a verified readback.

Your whole account, signed

Export every chat through Telegram Takeout, filtered by chat, sender, phrase, date and media. Each page gets a signed receipt, so a paused export resumes without losing its proof.

A sharing copy for a lawyer

Build a signed derivative of an export: pseudonymize everyone or only outsiders, and mask names, links, emails and phone numbers. The original stays private and unchanged.

Independent recorders

Add a Chromium recorder that saves PNG, MHTML and rendered text of a tab, or an AyuGram database recorder. Each runs apart, with its own key, chain and checkpoints.

Public showcase

Publish a read-only page of up to 64 public channels from 16 workspaces, with edits and deleted text. Visitors download the signed checkpoint and a consistency proof.

Eight ways to sign in

Phone, QR code or a raw Auth Key, or import a Telethon or Pyrogram session, a Telegram Desktop tdata folder, a StringSession or account JSON. Files are recognized by content.

Code check

Compare the installed program with any GitHub commit, file by file. Changed, extra and missing files are listed, and the result is saved to the journal.

06Investigation mode

Every step of the conversation, on the record.

Open a record for a chat and each step writes itself: what you sent, what came back and how long it took, edits, deletions, pages opened in the isolated browser, searches and notes. Every step cites its journal record and SHA-256, and fixing the document signs it.

Investigation mode guide

A case package for the prosecutor

One BagIt package carries the report, slides, verification page, signed original, files and indicators, plus a court folder ready for review.

  • Certification of authenticity in the shape of a Rule 902(13)/(14) certificate
  • Exhibit index: every cited file with its hash, as CSV and HTML
  • Annex for official requests: IDs, usernames over time and Telegram's labels
  • Undercover activity record: personas, authorizations and every outgoing message
  • WebVTT and SRT subtitles that line each step up with the screen recording
  • Jurisdiction guidance for 25 countries, with civil and criminal sources and next steps

Subject cards

A snapshot of the bot, person, channel or group: every @username, the numeric ID, Telegram's SCAM, FAKE and VERIFIED labels, bio, bot commands and photo. The next snapshot lists what changed, so a username swap mid-case is on the record.

Conversation plans

Set what a chat has to yield: the payment route, the infrastructure, the people behind it. Goals close with the journal records that prove them, and prepared messages are matched to what was actually sent.

Their rhythm and style

Reply delays, active hours by weekday in your time zone, the longest silences and the writing style: alphabet, message length, emoji, favorite words. All read from Telegram's own timestamps.

Drafts and translation

With an AI provider set up, draft your next message in the other side's style, or translate their messages beneath the original. You see the exact request, model and endpoint before anything leaves, and every generation is journaled.

Watchlists

Words, patterns, wallets, @usernames, IDs, domains, phone numbers and links, matched in text, edits, hidden link targets, bot buttons, image codes and recognized text. A TON address matches in any spelling, and a subdomain counts for its domain.

Online watch

Check watched accounts every one to sixty minutes in one batched request. The watch follows the numeric ID through renames and builds a picture of when each account is online.

Payment codes in images

QR codes in saved images become a wallet, an amount and a token tied to their message. EVM addresses must pass EIP-55, XRP Ledger addresses their checksum, and TON addresses collapse to one raw form.

Recording traces

Round video messages and voice messages carry the name of the software that encoded them, and Telegram records when each file was uploaded. A clip uploaded more than two minutes before the message presenting it as live is flagged to the second.

Cover and authority

Record personas and authorizations with reference number, issuing authority, validity and covered chats. The undercover activity record lists each outgoing message with its operator and flags anything outside an authorization.

Account exposure check

Manage the name, username, photo and thirteen privacy settings of your own account, the one you investigate with, from the panel. The exposure check flags every setting wider than recommended, down to peer-to-peer calls that can reveal an IP address.

Sensitive content, sealed

The hiding labels 18+, violence and personal data conceal content without cutting it. It is sealed with AES-256-GCM and the keys travel separately, so the court copy stays complete.

07Secret Chats

Secret Chats, on the record too.

Start a Secret Chat from TgWitness or accept one there, and the workspace becomes its endpoint. Every message, file, timer change and deletion notice goes into the same signed journal as the rest, and text saved before a deletion stays readable.

  • Files are decrypted, stored by SHA-256 with a signed receipt and travel in the evidence export.
  • The workspace sends no read, typing or screenshot notifications.
  • Keys and counters live in the workspace vault. The module is switched on per account, and requests wait for your acceptance unless auto-accept is on.
  • In ordinary chats, timed and view-once photos, videos, voice messages and files jump to their own priority queue, each with a signed saved or unavailable outcome.
Secret Chat, end to endE2E
@swap_deskFictional Secret Chat · accepted in TgWitness
  1. Request accepted

    TgWitness becomes the receiving endpoint.

  2. Message received

    Pay 500 USDT to TR3m…k81D now

  3. File received

    receipt.jpg

    Decrypted and saved by SHA-256 · signed receipt
  4. Timer set to 30 seconds

    Recorded as its own action.

  5. Deletion notice

    Gone from the chat. The message and the file stay in your journal.

secret_chat.messagesecret_chat.file Ed25519
Fictional example

09Measured

Millions of records. Every archive verified.

Measured on real Telegram sources and published with the date, revision, method and archive hashes of each run.

  • 3,598,381

    records in 48 verified archives

    50 public sources, 40 account workspaces on two servers, text and metadata.

  • 687.5

    history records per second

    Eight accounts read 768,007 records in 1,117 seconds, Telegram's waits included.

  • 160.5

    messages per second in a fresh export

    Two new exports, 56,329 messages over WARP with two accounts each; 141.8 per second including packaging.

  • 48/48

    archives verified against pinned keys

    No duplicate IDs or unfinished ranges. Ten matched independent full ID traversals.

  • 1,000,000

    test messages, searched locally

    Index built in 71 seconds; median query times of 9 to 190 ms across 200 chats.

  • 1,610,818

    journal records on one running server

    900,232 new messages, 80,683 edits and 400,536 deletion notices across ten workspaces.

Fast, with the proof intact.

Several accounts, one signed plan

A distributed export splits a history into signed ID ranges across accounts. Each account keeps one request in flight and its own wait deadlines.

Checkpoints inside every range

Messages are signed in batches of 100 as they arrive. An interrupted range resumes after its verified prefix, on the same account.

Sparse ranges, fewer requests

Thin stretches of message IDs are read in chunks of up to 100,000 IDs, while the signed scope still lists every planned ID.

Waits honored in full

When Telegram asks an account to wait, the full deadline is kept and survives a restart.

Runs from 1 to 6 November 2026 on recorded revisions; export timings exclude attachment downloads. Export performance · Public-history qualification

10Protection modes

From Easy to Mossad.

Pick what the case needs. The panel shows how many of its 18 protection layers are on, and every missing layer opens its own setup form. Recording and signing are the same in every mode.

  1. Easy

    Watching a chat and keeping a copy

    Chats, the journal and chat exports. Signing runs in the background.

  2. Signed

    Reports to a platform, a host or an abuse desk

    A signed archive, journal check, checkpoints and a handover extract.

  3. Witnessed

    Cases where someone may claim the record was changed

    An independent witness posting signed journal heads.

  4. Court-ready

    Evidence for a lawyer, the police or a court

    Timestamps, an encrypted off-site copy and case details in reports.

  5. GitHub-verified

    Records whose software anyone must be able to check

    A code check and GitHub Actions capture.

  6. Mossad

    High-stakes cases against a well-funded adversary

    A sealed 24/7 server, a hidden IP address and all 18 layers.

18/18layers on in Mossad mode

  • Every record signed and chained
  • A signed run receipt
  • Attachments saved with SHA-256
  • Signed checkpoints
  • Rechecks
  • Problem alerts
  • Read-only witness access
  • A witness checking on schedule
  • RFC 3161 timestamps
  • OpenTimestamps proofs
  • A verified latest timestamp
  • An encrypted off-site copy
  • Case details in reports
  • A matching code check
  • Telegram never sees this machine's IP
  • Outside requests through a proxy
  • Object Lock on the copy
  • A sealed server with provider records

11Verification

Seven checks. Each answers one question.

Turn on what the case needs. Every layer is checked on its own.

Record

How
An SHA-256 chain and an Ed25519 signature on every event. The first link starts from 64 zeroes.
A third party checks
Order and signatures under the pinned collector key.
python -m tgwitness.verify evidence.zip --fingerprint TRUSTED_SHA256

12Trust levels

From “trust me” to “check it yourself”.

Each level takes someone off the list of people the recipient has to trust. At the top, the capture runs where the operator cannot reach, and GitHub or the Intel processor vouches for it.

  1. Level 0 · No assurance

    Telegram export or screenshot

    You trust
    Whoever holds the file.
    The recipient checks
    Nothing. The bytes can change without a trace.
  2. Level 1 · Self-attested

    TgWitness on your own machine

    You trust
    The operator and the computer or server they control.
    The recipient checks
    That no record changed after signing, plus order, gaps and the key fingerprint.
  3. Level 2 · Provider records

    Sealed cloud server

    You trust
    The cloud provider's and Cloudflare's own logs.
    The recipient checks
    No inbound access, no console or rescue use, and the exact commit running.
  4. Level 3 · Attested capture High assurance

    GitHub Actions or Intel TDX

    You trust
    GitHub's signing or Intel's hardware, and the published code.
    The recipient checks
    A signed attestation of the code and the machine, verified against a public root. The operator cannot swap the code or work inside the machine unseen.

Attested by GitHub

GitHub Actions capture preview

Fork the repository, run one workflow, sign in with a fresh Telegram session and capture one chat. The archive comes back encrypted to your key, with a GitHub attestation anyone can verify.

  • The collector is the upstream code pinned to a full commit SHA. Your fork's files, caches and artifacts are never executed.
  • A new Telegram login only. The workflow takes no session imports, prepared files or hashes to sign, and the panel has no import route or signing endpoint.
  • GitHub signs an attestation binding the exact evidence ZIP to the approved workflow, the collector commit and a GitHub-hosted runner. A different signer is rejected.
  • Only encrypted packages leave the runner (RSA-OAEP and AES-256-GCM). Your private key stays in your browser or file.
python -m tgwitness.sealed_verify evidence.zip --bundle attestation.jsonl --repo OWNER/TgWitness

Attested by Intel hardware

Confidential VM on Phala Cloud

The collector runs around the clock inside an Intel TDX confidential virtual machine. The processor signs what the machine booted, and the verifier checks that signature itself instead of taking the provider's word.

  • The host and Phala's staff cannot read the collector's memory.
  • Every attestation is checked up to the pinned Intel root and Intel's revocation lists. Machines that can be debugged or migrated are refused.
  • The measured app-compose must equal, byte for byte, what the deployed commit builds: sources pinned by hash, images by digest, no other code.
  • Every collector start in the journal carries its own attestation. A compose changed after deployment fails the report.
python -m tgwitness.cloud verify --record deployment.json --cloud-init docker-compose.yaml --source CHECKOUT_OF_COMMIT --tdx-measurements dstack-mr.json

Sealed cloud deployment

Deploy the collector through the provider API with no inbound firewall rules and SSH masked from the first boot, reachable only through a Cloudflare tunnel. A verifier with read-only tokens checks the provider's and Cloudflare's own records instead of the operator's word.

HetznerDigitalOceanLinodeVultrAWS

High-assurance guide

Independent witness

Every few minutes a separate process, ideally on a server someone else runs, fetches the collector's signed journal head, signs what it saw with its own key and posts it to a Telegram channel or Discord. One proof page can watch up to 32 workspaces. Rewriting or cutting the journal later becomes detectable.

Witness setup

13Scenarios

Made for the cases we work on.

Scam channels swap payment details, teams delete messages once attention arrives, shops run on bots. Fictional situations from the project guide; start collecting before the moment that matters.

Mode

Chosen chats with messages, edits and deletions.

You get

Every observed version of the post and its attachments by hash.

Checked with

The signed ZIP, a retained checkpoint and a verified timestamp.

14Good to know

Before you connect an account.

Every chat the account can open

Private groups and channels included, with no public username needed. TgWitness never joins chats on its own.

Start before it matters

It keeps everything from the moment collection starts, plus the history Telegram still returns. Secret Chats are kept from the moment TgWitness starts or accepts them.

Gaps are listed, not hidden

A restart asks Telegram for missed updates, and coverage.json lists any known gaps.

Use a dedicated account

Telegram can restrict any account for request volume, whatever the client. Collect with an account made for the job.

“This software is not on its operator's side. It is on the side of the record staying what it was — about everyone in it, including whoever collected it.”

From the TgWitness README

15Install

Your first workspace in a few minutes.

Python is included. Run the same command later to update. Then open 127.0.0.1:8787 and sign in with your panel token.

curl -fsSL https://get.destroy.tools/install.sh | bash

On an Ubuntu server, run it as root; on a desktop, as your normal user.

Received a handover? Check it against a key fingerprint and a checkpoint you got through a separate channel.

python -m tgwitness.verify evidence.zip --fingerprint TRUSTED_SHA256 --checkpoint checkpoint.json

No terminal at hand? Every signed export also carries VERIFY.cmd and VERIFY.sh, which explain the result in plain language in 25 languages.

16Questions

Before you start.

Is TgWitness free?

Yes. It is open source under the MIT License and runs on your own computer or server. Optional extras such as cloud servers, S3 storage or AI providers are billed by whoever provides them.

Does this page or the demo connect to Telegram?

No. This page and the online demo use fictional records. The application runs on your machine, and Telegram sign-in happens there.

Can it recover messages deleted before I started?

No. It keeps everything the account observes from the moment collection starts, plus the history Telegram still returns. Start collecting before it matters.

Does it work with private groups and channels?

Yes, if the connected account is already a member. A private source needs no public username. TgWitness does not join chats on its own or bypass join approval.

Can it record Secret Chats?

Yes, the ones TgWitness starts or accepts. Switch on the Secret Chats module for an account, and every message, file, timer change and deletion notice in those chats goes into the signed journal. Secret Chats opened on another device keep their keys on that device.

Where is my data stored?

On your machine or server. Sessions, API keys and the signing key are encrypted at rest; keep the archive on an encrypted disk. The panel loads no external fonts, analytics or CDN resources.

How fast is it?

On 6 November 2026, eight accounts read 768,007 history records in 1,117 seconds, about 687 per second with Telegram's waits included. Across 50 public sources, 48 verified archives held 3,598,381 records.

Will a court accept a verified export?

That is for the court to decide. TgWitness lets anyone, the other side included, verify the record themselves without trusting whoever collected it.

What do the GitHub Actions and Phala modes add?

They take the operator out of the capture. The code is pinned, the machine is attested by GitHub or by the Intel processor, and the recipient checks both without trusting whoever ran it.

Which languages does it support?

The panel is available in 25 languages and the guides in 26.

Explore first. Connect when ready.

Walk through the fictional case in your browser, then set up a workspace on your own machine.

Built by PhishDestroy · MIT License · v0.9.1 preview