117 lines
5.8 KiB
Markdown
117 lines
5.8 KiB
Markdown
# Character.AI export viewer
|
|
|
|
Open the data export Character.AI sends you, read every chat, and save them as plain `.txt` files.
|
|
Runs entirely on your machine: a single `index.html` you open in a browser, or a tiny Node CLI.
|
|
No dependencies, no account, nothing uploaded.
|
|
|
|
Hosted version, same parser, if you would rather not download anything: **https://kamiko.fun/character-ai-export-viewer/**
|
|
|
|
## What happened
|
|
|
|
Character.AI filed for Chapter 11 on 12 October 2026 and is being sold through a court process. The
|
|
company has said it expects to keep operating through the sale, and also that the platform could be
|
|
wound down if no buyer keeps it running. For the dated, sourced timeline, see
|
|
https://kamiko.fun/character-ai-shutting-down/ . This README does not repeat it; that page is kept
|
|
up to date and cites its sources.
|
|
|
|
## What you get from Character.AI
|
|
|
|
The export arrives as a **ZIP of JSON files**. Recent exports are described as holding
|
|
`user.json`, `character.json` and `message.json`, with the text of each message in a field named
|
|
`raw_content`. Older exports used other layouts. None of this is documented by Character.AI, so
|
|
most people open the ZIP, see a wall of JSON, and give up. This tool is the missing viewer.
|
|
|
|
## How to request your export
|
|
|
|
- **On the web:** Profile, then Profile Settings, then Account, then Manage Account and Data, then Export Data.
|
|
- **In the app:** Profile, then the settings icon, then Export Data under Legal and Privacy.
|
|
- **Then wait.** Exports have been reported to take three to four weeks, and the download link expires seven days after it arrives
|
|
([Notebookcheck, from the Character.AI help page](https://www.notebookcheck.net/Character-ai-bankruptcy-How-to-export-your-chats-before-the-sale.1423870.0.html)).
|
|
Request it early and download it as soon as the email comes. Export before deleting your account; deletion cannot be undone.
|
|
|
|
## Use the viewer in your browser
|
|
|
|
1. Download this repository (green "Code" button, "Download ZIP") and unzip it.
|
|
2. Double-click `index.html`. It opens in your browser as a local file.
|
|
3. Drop the export ZIP onto the page, or click "Choose file" and pick the ZIP or any of its JSON files.
|
|
4. Your characters and chats are listed. Open a chat to read it. "Download this chat as .txt" saves one chat; "Download all as .txt" saves every chat in one file.
|
|
|
|
The page makes no network requests. You can open it with Wi-Fi off and it works the same.
|
|
ZIPs are unpacked with the browser's built-in `DecompressionStream`; on a browser without it the page
|
|
tells you to unzip first and pick the JSON files instead.
|
|
|
|
## Use the CLI (Node 18+)
|
|
|
|
```sh
|
|
node cli.js export.zip # one .txt per chat into ./character-ai-chats/
|
|
node cli.js message.json character.json
|
|
node cli.js export.zip -o ./my-chats # choose the output folder
|
|
node cli.js export.zip --single # everything in one character-ai-chats.txt
|
|
```
|
|
|
|
Try it on the included synthetic sample:
|
|
|
|
```sh
|
|
node cli.js sample/synthetic-export.zip -o /tmp/sample-out
|
|
```
|
|
|
|
Output:
|
|
|
|
```
|
|
skipped, not valid JSON: not_json.json
|
|
2 characters, 3 chats, 9 messages
|
|
wrote /tmp/sample-out/character-ai-aurora-the-starkeeper-1.txt
|
|
wrote /tmp/sample-out/character-ai-koda-2.txt
|
|
wrote /tmp/sample-out/character-ai-echo-3.txt
|
|
```
|
|
|
|
## Honest note on the format
|
|
|
|
**Character.AI does not document its export format, and it has changed over time. Parsing here is
|
|
best-effort.** The parser (`parser.js`) does not trust file names or any one schema. It walks
|
|
whatever JSON it is given and recognises two things by shape:
|
|
|
|
- a **character**: an object with a name and at least one of greeting, description, definition
|
|
- a **message**: an object with text under one of a short list of known keys (`raw_content`, `text`, `content`, `message`, `body`), including the `candidates[]` + `primary_candidate_id` layout
|
|
|
|
Rules it holds to:
|
|
|
|
- It never invents a speaker. A name comes from the file (`author.name`, `src__name`, and similar), or from a flag in the file that says a human wrote the line (shown as "You"). A message with neither is shown without a name.
|
|
- It never reorders by guesswork. Messages are sorted by time only when every message in a chat has a readable timestamp; otherwise they stay in file order.
|
|
- Chats are split by the id the file carries, including the nested `turn_key.chat_id` that real exports use. Without that, every turn in `message.json` would collapse into one chat.
|
|
- Unknown shapes produce a plain result with zero chats and zero characters. Nothing throws, and nothing is guessed.
|
|
|
|
If your export does not open, it is a layout this parser does not recognise yet. Open an issue with
|
|
the top-level keys of your JSON (not the content) and it can be added.
|
|
|
|
## Sample fixture
|
|
|
|
`sample/` is a **synthetic** export: every name, id and message was invented for testing and is
|
|
marked as such inside the files. It covers the `turn_key.chat_id` turn layout, a turn with no
|
|
speaker name, a turn with no timestamp, an older `chats[].messages[]` layout, and a file that is
|
|
not valid JSON. It is not a real Character.AI export and contains no real person's data.
|
|
|
|
## Files
|
|
|
|
| File | What it is |
|
|
|------|-----------|
|
|
| `index.html` | the viewer; open it in a browser |
|
|
| `parser.js` | the pure parser, shared by the page and the CLI |
|
|
| `zip.js` | a minimal ZIP reader (stored + deflate), shared by both |
|
|
| `cli.js` | `node cli.js export.zip` |
|
|
| `sample/` | synthetic sample export |
|
|
|
|
## Privacy
|
|
|
|
Nothing in this repository talks to a server. There is no analytics, no upload endpoint, no
|
|
third-party script. Read the source; it is short.
|
|
|
|
## License
|
|
|
|
MIT. See `LICENSE`.
|
|
## More from this account
|
|
|
|
- [Scribase](https://scribase.com) — hosted Postgres, one backend instead of stitching together Supabase + Neon + Clerk + Resend
|
|
- [Toolgate](https://toolgate.scribase.com) — one key for agent tools, pay only for what you call
|
|
- All repos: [git.ereboslab.com/caelum0x](https://git.ereboslab.com/caelum0x)
|