Parsing ChatGPT's Nested Mapping Tree and Export ZIPs in Zero-Dependency Browser JS A developer published a zero-dependency browser JavaScript technique for converting ChatGPT and Claude data exports into clean Markdown, using the native DecompressionStream API to inflate ZIP archives client-side and walking the current_node parent chain to extract only the active conversation branch. The approach avoids JSZip and CDN requests, keeping the converter in a single standalone HTML file, and adds YAML frontmatter so exported threads are queryable in Obsidian Dataview or Bases. The developer also disclosed building ThreadAttic, a local-only Chrome extension for folders, pins, search and one-click Markdown export inside chatgpt.com and claude.ai. If you have ever requested an official data export from ChatGPT Settings → Data Controls → Export , you get a .zip containing a massive conversations.json file. Try opening it in an editor and you immediately hit two annoyances: mapping graph of node IDs, parent pointers, hidden system prompts, and discarded regenerations. Here is how to parse both ChatGPT's .zip / mapping tree and Claude's conversations.json into clean, Obsidian-ready Markdown completely client-side with zero external libraries . conversations.json from a .zip using native DecompressionStream You do not need JSZip or a bundler to read a ZIP archive in modern browsers. A standard ZIP file ends with an End of Central Directory 0x06054b50 record pointing to each entry's offset, compression method 0 = stored, 8 = deflate , and sizes. Once you slice the compressed bytes from the local file header 0x04034b50 , the browser's built-in DecompressionStream 'deflate-raw' inflates it natively: js async function inflateRaw compressedBytes { const ds = new DecompressionStream 'deflate-raw' ; const writer = ds.writable.getWriter ; writer.write compressedBytes ; writer.close ; const buf = await new Response ds.readable .arrayBuffer ; return new Uint8Array buf ; } That keeps the entire converter in a single standalone HTML file with zero CDN requests. current node branch cleanly A naive Object.values chat.mapping breaks conversation order and mixes in edited/regenerated branches you threw away. Instead, start from chat.current node and walk node.parent back to the root, then reverse: js function extractActiveBranch chat { const mapping = chat.mapping || {}; const chain = ; const seen = new Set ; let id = chat.current node; while id && mapping id && seen.has id { seen.add id ; chain.push mapping id ; id = mapping id .parent; } chain.reverse ; return chain .map n = n.message .filter m = m && m.author?.role === 'user' || m.author?.role === 'assistant' .map m = { role: m.author.role, created: m.create time || null, text: Array.isArray m.content?.parts ? m.content.parts.filter p = typeof p === 'string' .join '\n\n' .trim : '' } .filter m = m.text.length 0 ; } For Claude exports conversations.json , the schema is simpler: each entry has name , created at , updated at , and a flat chat messages array with sender: 'human' | 'assistant' and text / content blocks. Adding lightweight YAML properties makes exported threads immediately queryable in Obsidian Dataview or Bases: --- title: "Postgres Indexing Checklist for SaaS" source: chatgpt created: 2026-11-06 updated: 2026-11-06 messages: 3 tags: - ai-chat - chatgpt --- Disclosure: I also build ThreadAttic https://lukaslabs.top/threadattic , a small local-only Chrome extension that adds folders, pins, search, saved prompts, and one-click Markdown export directly inside chatgpt.com and claude.ai — free up to 20 folders, no account. The JSON→Markdown converter above is completely free, standalone, and MIT-licensed.