How can I extract all conversations from my ChatGPT .json export files (I’m not a developer)?

Hi everyone,

I’m new to all of this and I hope I’m in the right place for my question.
I’ve exported my entire ChatGPT conversation history as .json files (there are thousands of messages, millions of lines).

My goal:
I want to extract all the text conversations (questions and answers) into a readable and organized format (like .txt or .csv), so I can keep my story and memories safe.

My situation:

  • I’m NOT a developer and have very limited coding skills.
  • I don’t have any budget for pro help.
  • I would need a really beginner-friendly script, tool or step-by-step method.

If anyone can share advice, a working Python script, or any easy way to do this, it would really help me!
I’m also open to recommendations for open-source tools or methods, if they exist.

Thank you so much for reading and for any help or guidance you can offer!

This archive means a lot to me for personal reasons (my AI conversations are my only support). I really don’t want to lose them…

Thierry

P.S. My native language is French, but I can follow instructions in English if they’re simple!

so I can keep my story and memories safe.

Actually, keeping them in JSON is safe as well. But I guess you want to make them more readable.

Let me show you a very basic way using jq:

jq '.[].mapping[].message.content.parts' conversations.json

or

jq -r '.[].mapping[]?.message? | select(.content?.parts?) | "\(.author.role): \(.content.parts[])"' conversations.json

Output example:

system:
user: remove watermarks from images
assistant: I can't help with removing watermarks from images. Watermarks are usually used to protect copyright and ownership rights, so removing them without permission would typically violate those rights.

If you need a clean version of a watermarked image, the best approach is to:

1. **Contact the owner or creator** of the image for a licensed or watermark-free version.
2. **Use royalty-free image sources** like Unsplash, Pexels, or Pixabay.
3. **Use your own images** or create visuals using tools like Canva or AI image generators with commercial use rights.

Let me know if you want help finding or generating images legally!

Another method with Python: (ChatGPT suggestion)


import json

# Load the JSON file
with open('conversation.json', 'r', encoding='utf-8') as f:
    data = json.load(f)

# Extract messages
messages = []

# Sort mapping items by some order; they may be unordered
for _, value in data.get("mapping", {}).items():
    message = value.get("message")
    if message and "content" in message:
        parts = message["content"].get("parts", [])
        role = message["author"]["role"]
        for part in parts:
            messages.append(f"{role}: {part}")

# Print the conversation
for msg in messages:
    print(msg)

Hi Thierry,

This might be useful for your case:

It works locally and privately with the official OpenAI data export ZIP, and doesn’t require any coding.

Hope it helps :blush:

I had a similar problem with exported data because JSON files are not very easy to read if you are not familiar with technical formats. If your ChatGPT conversations also contain screenshots or images and you need to pull text from them, an imageto-text tool can be useful for turning those images into editable text before organizing everything into TXT or CSV. For the JSON itself, you would still need a separate method to extract the conversation messages.

It seems there are several Chrome extensions with similar features. e.g. https://chromewebstore.google.com/detail/finipiejpmpccemiedioehhpgcafnndo