A simple and user-friendly utility to split exported HTML/JSON files from ChatGPT and Claude into individual files for each conversation. Perfect for organizing and managing your conversation history from multiple LLM platforms.
- Easy-to-use GUI (Windows/macOS/Linux via Tkinter)
- Cross-platform CLI for advanced users
- Drag-and-drop support for quick file processing
- No external dependencies - uses only Python's standard library
- Smart filename handling - automatically sanitizes and deduplicates filenames
- Preserves original formatting - keeps the look and feel of your ChatGPT conversations
-
Install Python 3.8+ if you haven't already
- Download from python.org
- Make sure to check "Add Python to PATH" during installation
-
Download and extract this repository to any folder
-
Launch the tool:
- Method A: Double-click
Run_Chat_Splitter.bat
- Method B: Drag your chat file (
chat.html
orconversations.json
) ontoRun_Chat_Splitter.bat
- Method A: Double-click
-
Use the GUI:
- Select the platform (ChatGPT or Claude) from the dropdown menu.
- Click "Browse..." to select your exported chat file.
- Choose your output directory.
- Click "Run Extractor" and wait for completion.
- Install Python 3.8+ (recommended from
python.org
). - Make the launcher executable:
chmod +x MacOS/Run_Chat_Splitter.command
- Launch:
- Double-click
MacOS/Run_Chat_Splitter.command
, or - Drag your
chat.html
onto it to prefill the path.
- Double-click
- If macOS blocks the script (Gatekeeper), Control-click → Open.
- Install Python 3.8+ and Tkinter (e.g., Debian/Ubuntu:
sudo apt-get install -y python3-tk
). - Make the launcher executable:
chmod +x Linux/run.sh
- Launch:
./Linux/run.sh
(optionally pass/path/to/chat.html
).
# Basic usage with custom input and output
python chat_extractor.py path/to/your/chat.html path/to/output/directory
# Quick usage with defaults (looks for chat.html in current directory)
python chat_extractor.py
# Silent mode (no progress messages)
python chat_extractor.py --quiet
# Get help
python chat_extractor.py --help
Note: On Windows, you can use py
instead of python
. On macOS/Linux, you might need python3
.
- Go to ChatGPT Settings → Data Controls → Export
- Request your data export
- Download the ZIP file when ready
- Extract the ZIP and locate the
chat.html
file
- Log in to your Claude account.
- Click on your profile icon in the top right corner.
- Select "Account Settings".
- Click on the "Export Data" button.
- You will receive an email with a link to download your data.
- Download the ZIP file and extract it to find the
conversations.json
file.
The tool:
- Reads your exported
chat.html
file - Extracts the embedded JSON data containing all conversations
- Creates individual HTML files for each conversation
- Preserves the original ChatGPT styling and formatting
- Generates clean, filesystem-friendly filenames
After running the tool, you'll get:
your-output-directory/
├── How_to_learn_Python_programming.html
├── Recipe_for_chocolate_cake.html
├── Travel_tips_for_Japan.html
└── ... (one file per conversation)
python llm_exports_chat_extractor.py [input_file] [output_dir] [--quiet]
input_file
: Path to your chat.html (default:chat.html
)output_dir
: Output directory (default:split_chats
)--quiet
: Suppress progress messages
# Process a specific file to a custom directory
python chat_extractor.py ~/Downloads/chat.html ~/Documents/ChatGPT_Conversations
# Use current directory's chat.html, output to custom folder
python chat_extractor.py chat.html my_conversations
# Silent processing
python chat_extractor.py --quiet
- Large exports: Very large chat histories may take a few minutes to process
- File organization: Consider creating dated folders for multiple exports
- Backup: Keep your original
chat.html
file as a backup - Portable: You can copy this tool to any directory and run it there
- Updates: Check back for updates if you encounter any issues
- Check Python installation: Run
python --version
orpy --version
in Command Prompt - PATH issues: Reinstall Python and ensure "Add to PATH" is checked
- Try CLI: If GUI fails, try the command line version
- Wrong file: Make sure you're selecting the correct
chat.html
from your ChatGPT export - Corrupted export: Try re-exporting your data from ChatGPT
- File encoding: Ensure the file wasn't modified or corrupted during download
- Output directory: Make sure you have write permissions to the output directory
- Admin rights: Try running as administrator if needed
- Different location: Try saving to a different directory (like Desktop)
- Large files: Very large exports (>100MB) may take several minutes
- Memory: Close other applications if you're running low on RAM
- Progress: Remove
--quiet
flag to see progress messages
Found a bug or have a suggestion? Feel free to:
- Open an issue on GitHub
- Submit a pull request
- Share your feedback
This project is open source and available under the MIT License.
Happy organizing! 🎉