How to Export and Locally Archive Your Character.AI Chats & Character Cards Before December 2026 (Pure Client-Side JSON/PNG Workflow)

Disclosure: This technical guide is written by Rubii AI Engineering. We maintain the MIT-licensed...

Rubii AI Engineering (Open-Source)13 min read0 kali dilihat
How to Export and Locally Archive Your Character.AI Chats & Character Cards Before December 2026 (Pure Client-Side JSON/PNG Workflow)

Disclosure: This technical guide is written by Rubii AI Engineering. We maintain the MIT-licensed character-card-toolkit, its offline Chrome extension, and the Rubii AI interactive fiction platform. Every conversion, validation, and PNG packing step below executes 100% client-side in your browser or local Node.js environment with zero file uploads, and the resulting Character Card V2/V3 JSON and PNG archives are open community formats you can use anywhere.


Why Local Archival Matters Right Now (Ahead of December 1, 2026)

Public court filings confirm that Character.AI's consumer platform and associated assets are scheduled for a bankruptcy auction on December 1, 2026, and a coalition of 42 state attorneys general has asked the court to block the proposed transfer of 21 million user accounts' private chat logs and metadata.

Regardless of how the court ultimately rules—or who eventually acquires the consumer service—this is a textbook reminder of a core software engineering principle: creative writing, custom worldbuilding, and long-running story archives should never live exclusively inside a closed cloud platform.

If you have spent months writing original character definitions, branching roleplay scenarios, and long-form stories on Character.AI, you have two overlapping problems right now:

  1. Official export latency: Character.AI's built-in "Export Your Data" pipeline commonly takes 3 to 4 weeks to generate and email an archive link, and those download links expire after a short window.
  2. Proprietary format fragmentation: Even once you have an export in hand (whether from the official archive or a community browser exporter), raw Character.AI payloads do not conform to the open Character Card V2 (chara_card_v2) or V3 (chara_card_v3) standards used across local tools and modern interactive fiction platforms.

This guide walks through a 100% honest, pure client-side archival pipeline—starting with what to request immediately, clarifying the exact schema boundaries of each open-source and browser tool (so you do not hit unexpected parse errors), and finishing with self-contained dual-chunk ccv3 + chara PNG archives you own permanently on disk.


Step 1: Submit the Official Character.AI Export Request First (And Do NOT Delete Your Account Yet)

Before doing anything else, trigger Character.AI's official account export so your place in the queue starts ticking today:

  1. Sign in to Character.AI on web or mobile.
  2. Open Settings → Account → Export Your Data (or Request Data Export).
  3. Confirm the export email address tied to your account.

Two critical operational caveats to keep in mind:

  • Expect a 3–4 week turnaround. Community reports throughout 2026 consistently note that official archive emails can take several weeks to arrive. Once the email lands, the download link is time-limited (typically 7 days), so archive the ZIP to local storage immediately when it arrives.
  • Never delete your account before verifying every downloaded file. Deleting your account cancels pending export deliveries and permanently cuts off access to character definitions you authored. Wait until your local ZIP, JSON, and PNG backups are opened, parsed, and verified offline.

Because official archives take weeks, relying only on the official queue leaves you without an immediate backup ahead of December 2026. That is where Step 2 comes in.


Step 2: Capture an Immediate Local Snapshot of Your Original Characters & Chats

Before touching any converter, understand what Character.AI's own web interface actually exposes to your browser session:

  • Characters you created yourself (or public characters whose creators explicitly enabled public definitions): you can view and export the full name, title, short_description, long_description, greeting, and definition (including example dialogue blocks).
  • Third-party characters with hidden definitions: Character.AI's API does not send hidden character definitions to the client. Local exporters can still save your own chat turns, greetings, and visible metadata, which is useful for preserving your story transcript, even though private upstream prompt text stays hidden.

Developers and writers currently capture immediate local snapshots in three common ways:

  1. Direct manual copy of your own character sheets into a local JSON or Markdown folder (always the cleanest starting point for original characters you authored).
  2. Open-source local browser exporters such as the MIT-licensed Amavie exporter, which writes a single local amavie.character-ai-export JSON file containing character fields plus labeled speaker turns without uploading data to third-party servers.
  3. Community exporters such as CAI Tools, which can export either a standardized Character Card V2 JSON/PNG (for character sheets) or Tavern .jsonl line-delimited chat logs.

For a broader non-developer walkthrough of the export timeline and privacy checklist, see the full step-by-step overview at Rubii AI's Character.AI Export Guide.


Step 3: Know Your Exact Format Boundaries (Zero Magic, Zero Guesswork)

A common frustration during platform migrations is dropping a raw export file into a Character Card tool and getting an opaque Unrecognized character card schema error. To keep this workflow 100% transparent, here is the exact format compatibility matrix verified directly against source code as of November 2026:

| Input File / Format | Rubii Browser Converter (100% Client-Side Web) | Character Card & Story Toolkit Chrome Extension & character-card-toolkit CLI | Recommended Handling | |---|---|---|---| | Official Character.AI data_export .zip | Not ingested as raw .zip | Not ingested as raw .zip | Unzip locally first; keep the raw JSON archive untouched as your cold backup, and extract individual character JSON files if needed | | Character.AI character JSON (short_description, greeting, definition, participant__name) | Supported directly (parses flat or wrapped C.AI objects, normalizes placeholders, exports chara_card_v2 JSON) | Not parsed directly (detectCardVersion() strictly validates V1/V2/V3 specs) | Run through the browser converter first → export V2 JSON → load into Extension/CLI | | Amavie amavie.character-ai-export v1 JSON | Supported directly (extracts character + turns, builds <START> dialogue examples, exports V2 JSON) | Not parsed directly until converted to V2 JSON | Convert to V2 JSON locally in browser first, then archive/pack via Extension/CLI | | CAI Tools / Tavern .jsonl chat exports (or JSON turn arrays) | Supported directly (parses JSONL header + recent turns into portable V2 fields) | Not parsed directly until converted to V2 JSON | Keep raw .jsonl for full transcript history; convert to V2 JSON for character continuity | | Character Card V1 JSON (flat name + description/first_mes) | Supported directly | Supported directly (auto-upgrades cleanly to V2/V3) | Ready for either tool immediately | | Character Card V2 JSON / PNG (chara_card_v2 / chara chunk) | Supported directly | Supported directly (read, validate, lint, token-budget, repack PNG) | Ready for offline Extension & CLI immediately | | Character Card V3 JSON / PNG (chara_card_v3 / ccv3 chunk) | Supported directly | Supported directly (including dual-chunk ccv3 + chara PNG export) | Ready for offline Extension & CLI immediately |

Why is there a deliberate architectural boundary between the two tools?

Because YoMio-Tech-Inc/character-card-toolkit (and the Chrome Web Store extension built directly from its extension/ directory) is designed as a strict, zero-dependency specification engine (permissions: [], zero host permissions, zero external parsers). Inside src/parser.ts, detectCardVersion() intentionally accepts only canonical Character Card V1, V2 (spec === 'chara_card_v2'), and V3 (spec === 'chara_card_v3'):

export function detectCardVersion(raw: unknown): CardVersion {
  if (!isRecord(raw)) return 'unknown';

  if (raw.spec === 'chara_card_v3' && isRecord(raw.data)) {
    return 'v3';
  }
  if (raw.spec === 'chara_card_v2' && isRecord(raw.data)) {
    return 'v2';
  }
  if (
    typeof raw.name === 'string' &&
    (typeof raw.description === 'string' ||
      typeof raw.personality === 'string' ||
      typeof raw.first_mes === 'string')
  ) {
    return 'v1';
  }
  return 'unknown';
}

Separating Stage 1 (proprietary format normalization) from Stage 2 (strict V2/V3 archival, validation, linting, and PNG chunk packing) keeps both tools clean, inspectable, and completely client-side.


Step 4: Stage 1 — Normalize Character.AI / Amavie / JSONL Exports to chara_card_v2 JSON Locally

If your snapshot is a Character.AI character definition JSON, an Amavie export JSON, or a CAI Tools / Tavern .jsonl chat export, start with the browser-local converter:

You can verify in DevTools (Network tab) that dropping a file triggers zero outbound POST requests—all PNG chunk extraction, JSON/JSONL parsing, macro normalization, and token estimation execute in browser memory.

Here is what the local normalizer does under the hood when it detects a Character.AI or Amavie payload:

  1. Field mapping: Consolidates name / participant__name, title, short_description, long_description, and prose extracted from definition into canonical data.description, while mapping greeting to data.first_mes and user__username to data.creator.
  2. Placeholder cleanup: Rewrites Character.AI-specific macros (such as {{random_user_1}}) into standard {{user}} / {{char}} tokens understood across V2/V3 ecosystems.
  3. Dialogue example separation: Splits END_OF_DIALOG / structured example lines from definition (or samples the last 6 labeled turns from an Amavie / .jsonl chat export) into <START> blocks inside data.mes_example.
  4. Context window budget check: Estimates permanent vs. total token consumption across Latin, CJK (Chinese/Japanese), Korean, and Thai scripts against 8K, 16K, 24K, and 32K context windows so bloated legacy definitions don't silently starve conversation memory.

Click Export V2 JSON to save a clean <character>-v2.json file to disk. Keep your original raw Character.AI / Amavie / .jsonl files alongside it in a raw/ subfolder so your full verbatim transcript is preserved untouched.


Step 5: Stage 2 — Pack Permanent, Self-Contained Dual-Chunk PNG Archives Offline

Once you have a standard V1, V2, or V3 JSON file (either exported from Stage 1 above, or exported directly as Character Card V2 JSON/PNG from CAI Tools), you can graduate to a permanent, portable offline archive using either the Chrome Extension or the MIT CLI.

Option A: 100% Offline Manifest V3 Chrome Extension (Zero Permissions)

Install the open-source extension from the Chrome Web Store:

Because its manifest.json declares permissions: [] with no host_permissions, no tabs, no cookies, and no remote API calls, you can even disconnect from Wi-Fi after installation and run your entire archival workflow completely offline:

  1. Drag and drop your normalized -v2.json (or existing V2/V3 .png) into the workspace.
  2. Review the live Schema Validator and Roleplay Prompt Linter—it flags malformed macros ({char}, {{ user }}, unclosed {{), missing <START> markers in mes_example, openings that accidentally narrate {{user}} actions, and overly broad Lorebook stopword triggers.
  3. Attach or swap a PNG cover portrait (Swap PNG Cover) and add structured Lorebook (character_book) world entries if you want to move static backstory out of permanent tokens into keyword-triggered entries.
  4. Click Export PNG to generate a single self-contained .png file embedding both your artwork and full JSON metadata.
  5. Optional: test custom RPG status bars, sealed letters, or layout overlays inside the built-in Zero-XSS Styles & Regex Sandbox, which runs an allowlist HTML sanitizer (stripping <script>, inline on* handlers, and javascript: URIs) inside an isolated <iframe sandbox="">.

Option B: Scripted Batch Archival via the MIT Open-Source CLI & Library

If you have dozens of character cards to audit, upgrade to V3, and pack into versioned local archives, clone or build YoMio-Tech-Inc/character-card-toolkit locally (Node.js >= 20, zero runtime dependencies):

git clone https://github.com/YoMio-Tech-Inc/character-card-toolkit.git
cd character-card-toolkit
npm install
npm run build

# 1. Inspect schema, prompt lint score, and 8K/16K/24K/32K token fit
node dist/cli.js inspect ./archive/lyra-v2.json

# 2. Enforce strict validation (fails on warnings too—handy in CI or pre-delete checks)
node dist/cli.js validate ./archive/lyra-v2.json --strict

# 3. Upgrade cleanly to Character Card V3 JSON with timestamps
node dist/cli.js convert ./archive/lyra-v2.json --to v3 --out ./archive/lyra-v3.json

And if you want to batch-pack portraits into dual-chunk PNG archives programmatically, exportCardToPng() writes both a V3 ccv3 tEXt chunk and a backward-compatible V2 chara tEXt chunk (each with verified IEEE 802.3 CRC-32 checksums) into your base PNG:

import { readFileSync, writeFileSync } from 'node:fs';
import {
  parseCardBuffer,
  convertCard,
  exportCardToPng,
  validateCard,
  lintCard,
} from './dist/index.js';

const jsonBytes = new Uint8Array(readFileSync('./archive/lyra-v2.json'));
const coverPng = new Uint8Array(readFileSync('./archive/lyra-portrait.png'));

const parsed = parseCardBuffer(jsonBytes);
const report = validateCard(parsed.card);
const lint = lintCard(parsed.card);

if (!report.valid) {
  throw new Error(`Invalid card: ${report.errors.map((e) => e.message).join('; ')}`);
}

console.log(`Validated ${parsed.card.data.name} | Lint score: ${lint.score}/100`);

// Upgrade to V3 and pack dual-chunk PNG (`ccv3` + backward-compatible `chara` V2 chunk)
const { card: v3Card } = convertCard(parsed.card, 'v3');
const archivedPng = exportCardToPng(coverPng, v3Card, { includeV2Fallback: true });

writeFileSync('./archive/lyra-dualchunk-archive.png', archivedPng);

Why Dual-Chunk (ccv3 + chara) PNG Archival Beats Loose Text Files

Storing your backup as a dual-chunk PNG alongside the raw JSON gives you three practical safeguards:

  • Forward and backward compatibility: Modern V3 tools read the ccv3 chunk (preserving nickname, creation_date, modification_date, and V3 Lorebook regex keys), while older V2-only platforms seamlessly fall back to the chara chunk.
  • Integrity verification: Because src/png.ts computes strict IEEE 802.3 CRC-32 checksums on every chunk, corrupted downloads or social-media image recompression (which strips tEXt chunks) are caught immediately on re-inspection.
  • Single-file portability: Portrait + character definition + Lorebook stay bound together in one artifact—just never run archived card PNGs through lossy chat apps or image optimizers that strip PNG metadata chunks!

Step 6: Recommended Local Folder Structure & Pre-Deletion Verification Checklist

A clean local archive layout takes two minutes to set up and keeps raw history separate from portable character assets:

cai-local-archive-2026/
├── official-export/              # Raw Character.AI ZIP (once emailed in 3-4 weeks)
├── raw-snapshots/
│   ├── amavie-export-2026-11.json
│   └── tavern-logs/*.jsonl       # Verbatim conversation transcripts
├── portable-cards/
│   ├── lyra-v2.json              # Stage 1 normalized V2 JSON
│   ├── lyra-v3.json              # Stage 2 upgraded V3 JSON
│   └── lyra-dualchunk-archive.png # Portrait + ccv3 + chara chunks
└── SHA256SUMS.txt

Before deleting any cloud character or submitting an account deletion request, run this quick 4-point sanity check:

  1. Re-parse every exported PNG and JSON with character-card inspect (or drop it back into the Chrome extension) to confirm zero JSON syntax or CRC-32 errors.
  2. Confirm your token budget: Check that permanent tokens (description + personality + scenario + system_prompt) stay comfortably under ~15–20% of your target context window (e.g., under ~4,000 tokens for a 24K window) so long-running chapters have plenty of room for story history.
  3. Verify verbatim chat backups: Open your .jsonl or Amavie .json transcript locally and confirm both speaker labels and timestamps are intact.
  4. Store at least two offline copies (e.g., local drive + encrypted external backup), and wait until your official Character.AI export ZIP arrives if you want the complete account archive before closing the account.

Where to Take Your Portable Worlds Next

Because your archived files are standard Character Card V2/V3 JSON and dual-chunk PNGs, you are never locked into a single cl

...


Sumber artikel open-source oleh Rubii AI Engineering di DEV Community — Baca artikel asli. Topik: #typescript #javascript #privacy #opensource

Sukai & bagikan artikel ini

Komentar