Skip to main content

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:

  1. Click your initials (lower left) > Settings > Privacy > Export data
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_json_to_markdown-0.2.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_json_to_markdown-0.2.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

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

Hashes for claude_json_to_markdown-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1c49378e87ce79e4ad3baffede2191b1a49fa5d7d9d972f722efc26dce1750a1
MD5 3dfdbbd31b9127fee2a69decf048c366
BLAKE2b-256 6e7f645ad7d202edbe618c6a6c867ba92c16fd832a504badfc430d05520451dc

See more details on using hashes here.

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

Hashes for claude_json_to_markdown-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49114e9e9a31b41ab6c7276021c8daa6fbb1568d1aea53fb3ded804edacabf55
MD5 112d76bb3f07f76b6473bc02323abe7a
BLAKE2b-256 414a464dbf4c2e34801de75279295694c2d84ac369ff1c8d3af397ed1c51d77e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page