Skip to content

Instantly share code, notes, and snippets.

@Vinaco00
Vinaco00 / archive-all-chatgpt-chats.js
Last active February 13, 2025 22:41 — forked from aomarks/archive-all-chatgpt-chats.js
Archive all ChatGPT chats browser script
// This script will iterate over all of your ChatGPT sessions and archive them one-by-one.
//
// 1. Go to https://chat.openai.com/
// 2. Open Chrome devtools (see https://developer.chrome.com/docs/devtools/open) or equivalent in your browser
// 3. Open the console tab
// 4. Paste the code below and press enter
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const history = document.querySelector('[aria-label="Chat history"]');