Guide
How to move ChatGPT chats into Obsidian
An Obsidian vault is just a folder of Markdown files, so getting a ChatGPT conversation into it means turning the chat into a .md file and putting that file in the folder. Here are three ways, from a single chat to your whole history. The first two need nothing from us.
One chat now: copy and paste (way 1). Everything you have ever written, free: a short script (way 2). All three assistants, searchable first, one click to a vault: Hindshelf Pro (way 3).
Way 1: copy a single chat
-
Copy the answer
In ChatGPT, use the copy button under a reply. It copies the reply as Markdown, so headings, lists, tables and code blocks keep their formatting. To keep your question too, select and copy the whole conversation instead.
-
Create a note
In Obsidian, make a new note in the folder you want (for example
AI Chats) and paste. Name the note after the topic. -
Add properties
Obsidian reads YAML at the very top of a note as properties. A small header makes chats filterable later:
--- title: "Fix Docker Compose networking" date: 2026-10-29 source: chatgpt tags: [ai-chat, chatgpt] ---
This is fine for a handful of chats and tedious beyond that.
Way 2: convert your whole export with a free script
Request your ChatGPT export first. Then:
-
Unzip the export
Unzip it into a folder, for example
chatgpt-export. You should seeconversations.json, or severalconversations-000.json-style files for large accounts. -
Save the script
Save the script below as
chatgpt-to-markdown.py(or download it). It needs Python 3. On macOS, runningpython3may first offer to install Apple’s Command Line Tools; on Windows, install it from python.org; most Linux systems include it. The script uses only the standard library. Nothing is uploaded; everything happens on your computer. -
Run it
python3 chatgpt-to-markdown.py chatgpt-export "ChatGPT Notes"The first argument is the unzipped folder, the second is where the notes go. You get one file per conversation, named like
2026-10-29 Fix Docker Compose networking.md, each with YAML properties and### Youand### ChatGPTsections. -
Move the folder into your vault
Copy the output folder into your vault (or in Obsidian choose Open folder as vault to make a new vault from it). Obsidian indexes the notes automatically.
#!/usr/bin/env python3
"""Turn a ChatGPT export into one Markdown file per conversation (for Obsidian or any notes app).
Usage: python3 chatgpt-to-markdown.py <folder with the unzipped export> <output folder>
Reads: conversations.json, or conversations-000.json, conversations-001.json, ... (any depth).
Writes: <output>/<YYYY-MM-DD> <title>.md, each with YAML properties and "You" / "ChatGPT" sections.
Only the Python standard library is used. Nothing is uploaded anywhere.
"""
import json, re, sys
from datetime import datetime, timezone
from pathlib import Path
def safe_name(text):
text = re.sub(r'[\\/:*?"<>|#^\[\]\x00-\x1f]', " ", text or "Untitled")
text = re.sub(r"\s+", " ", text).strip(" .")
return (text or "Untitled")[:100].rstrip(" .")
def messages(conv):
"""Walk from current_node up through the parents, then reverse: the branch you actually see."""
mapping, node, chain, seen = conv.get("mapping") or {}, conv.get("current_node"), [], set()
while node and node not in seen:
seen.add(node)
item = mapping.get(node) or {}
chain.append(item.get("message"))
node = item.get("parent")
for msg in reversed(chain):
if not msg or (msg.get("metadata") or {}).get("is_visually_hidden_from_conversation"):
continue
role = (msg.get("author") or {}).get("role")
content = msg.get("content") or {}
if role not in ("user", "assistant"):
continue
if content.get("content_type") == "code":
text = "```\n" + (content.get("text") or "") + "\n```"
else:
text = "\n\n".join(p for p in content.get("parts", []) if isinstance(p, str))
if text.strip():
yield ("You" if role == "user" else "ChatGPT"), text.strip()
def main(src, out):
out = Path(out)
out.mkdir(parents=True, exist_ok=True)
files = sorted(Path(src).rglob("conversations*.json"))
if not files:
sys.exit("No conversations*.json found in " + src)
seen, count = set(), 0
for f in files:
for conv in json.loads(f.read_text(encoding="utf-8")):
if not isinstance(conv, dict):
continue
try:
ts = float(conv.get("create_time") or conv.get("update_time") or 0)
day = datetime.fromtimestamp(ts, timezone.utc).strftime("%Y-%m-%d")
except (TypeError, ValueError, OverflowError, OSError):
day = "0000-00-00"
title = conv.get("title") or "Untitled"
base, n = f"{day} {safe_name(title)}", 1
while base.lower() in seen:
n += 1
base = f"{day} {safe_name(title)} ({n})"
seen.add(base.lower())
body = [f"---\ntitle: {json.dumps(title, ensure_ascii=False)}\ndate: {day}\nsource: chatgpt\n---\n", f"# {title}\n"]
for who, text in messages(conv):
body.append(f"### {who}\n\n{text}\n")
(out / (base + ".md")).write_text("\n".join(body), encoding="utf-8")
count += 1
print(f"Wrote {count} files to {out}")
if __name__ == "__main__":
if len(sys.argv) != 3:
sys.exit(__doc__)
main(sys.argv[1], sys.argv[2])
What the script does and does not do: it follows the branch of each conversation you were actually looking at (ChatGPT stores edits and regenerations as a tree), skips hidden system messages, and writes text and code. Images, uploaded files and tool output are not rendered. Titles are cleaned of characters Obsidian does not allow in file names.
Way 3: Hindshelf, for all your assistants
Hindshelf imports the ChatGPT, Claude and Gemini exports into one local library, so you can search and tidy before anything reaches Obsidian.
-
Import your exports
Install Hindshelf, then drop each official ZIP or Takeout file into the Import window. It is read in your browser, not uploaded. Full-history import is free.
-
Pick what to export
Open Export and choose a scope: all chats, a folder or a tag. Single chats export as Markdown for free; JSON backup is free too.
-
Choose Obsidian vault (ZIP)
Bulk export is part of Pro: $1.99 once, no subscription. Hindshelf writes one note per chat under
AI Chats/<Assistant>/<Folder>/, namedYYYY-MM-DD Title.md, with YAML properties (title, assistant, created, updated, URL, tags, folder, source) and anAI Chats/Index.mdthat links every chat with a[[wikilink]], newest first. -
Unzip into your vault
Unzip the file into your vault folder. A plain Markdown ZIP (without properties) is also available, for Notion import or any editor.
Tips for a tidy vault
- Keep AI chats in one folder. Use a top-level folder such as
AI Chatsso they do not crowd your own notes, and exclude it from sync or search where you want to. - Use properties and tags. Obsidian’s Properties view and tag pane make a long list of chats navigable by assistant or date.
- File names are limited. Obsidian does not allow
\ / : * ? " < > |in names, and wikilinks do not like#,^,[or]. Both the script and Hindshelf strip them. - Link, do not paste. When a chat produced something you use, make a real note and link the chat as its source.
- Re-export occasionally. Each export is a full snapshot. Re-running the script on a newer export overwrites notes with the same name, so keep your own edits in separate notes.
Common problems
Code blocks look wrong
Make sure the pasted text is Markdown. If you copied from a rendered page that lost its fences, paste again from the copy button.
Two chats have the same title
The script and Hindshelf add (2), (3) and so on to the file name so nothing is overwritten.
The script says no conversations found
Point it at the folder that contains conversations.json (or the numbered files). It searches inside sub-folders too.