CLI tool to convert Claude conversation exports to Markdown files
Project description
Claude JSON to Markdown Converter (cj2md)
A command-line tool that converts Anthropic Claude conversation exports to Markdown files.
Installation
# Run directly (recommended)
uvx cj2md <input.json> [output_dir]
# Or install globally
uv tool install claude-json-to-markdown
# Or add to a project
uv add claude-json-to-markdown
Exporting Your Data
Follow Anthropic's export guide:
- Click your initials (lower left) > Settings > Privacy > Export data
- Download link arrives via email
Usage
cj2md [OPTIONS] JSON_INPUT_FILE [MARKDOWN_OUTPUT_DIRECTORY]
Arguments
| Argument | Description | Default |
|---|---|---|
JSON_INPUT_FILE |
Path to exported JSON file | Required |
MARKDOWN_OUTPUT_DIRECTORY |
Output directory for .md files | markdown_conversations |
Options
| Option | Description |
|---|---|
-l, --limit INT |
Limit number of conversations processed |
--log-path PATH |
Custom log file path |
--no-summary |
Omit conversation summary from header |
--no-thinking |
Omit Claude's thinking blocks |
--no-citations |
Omit References section with URLs |
--no-tools |
Omit tool usage (web_search, artifacts, etc.) |
--verbose-tools |
Show full tool inputs/outputs |
Example
uvx cj2md conversations.json ./output --limit 50 --no-thinking
Output Format
Each conversation becomes a Markdown file named YYYY-MM-DD_slugified-name_uuid.md containing:
- Header: UUID, name, timestamps, optional summary
- Messages: Sender, timestamp, content, attachments
- Thinking blocks: Claude's reasoning (unless
--no-thinking) - Tool usage: Web searches, artifacts, file operations (unless
--no-tools) - References: Citation URLs (unless
--no-citations)
Conversations with no name or empty content are automatically skipped.
Development
git clone https://github.com/olearydj/claude-json-to-markdown.git
cd claude-json-to-markdown
uv sync
uv run pytest
Limitations
- Project data from exports is not processed (no clear way to link conversations to projects)
- Artifact content is shown as operations (create/update/rewrite) rather than reconstructed final state
License
MIT
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_json_to_markdown-0.2.0.tar.gz.
File metadata
- Download URL: claude_json_to_markdown-0.2.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c49378e87ce79e4ad3baffede2191b1a49fa5d7d9d972f722efc26dce1750a1
|
|
| MD5 |
3dfdbbd31b9127fee2a69decf048c366
|
|
| BLAKE2b-256 |
6e7f645ad7d202edbe618c6a6c867ba92c16fd832a504badfc430d05520451dc
|
File details
Details for the file claude_json_to_markdown-0.2.0-py3-none-any.whl.
File metadata
- Download URL: claude_json_to_markdown-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49114e9e9a31b41ab6c7276021c8daa6fbb1568d1aea53fb3ded804edacabf55
|
|
| MD5 |
112d76bb3f07f76b6473bc02323abe7a
|
|
| BLAKE2b-256 |
414a464dbf4c2e34801de75279295694c2d84ac369ff1c8d3af397ed1c51d77e
|