npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

chatgpt-to-markdown

v1.12.0

Published

Convert ChatGPT exported conversations.json to Markdown

Readme

ChatGPT to Markdown

npm version license

Convert ChatGPT conversation JSON files to Markdown format with ease.

ChatGPT exports

Go to chat.openai.com > Settings > Data controls > Export data and export your data.

Unzip the file you're mailed and run:

npx chatgpt-to-markdown path/to/your/conversations.json

NO NEED TO INSTALL - npx will automatically install the package if it's not already installed.

This will generate one Markdown file for each chat same directory as the conversations JSON file. The file name will be the chat title, with invalid filename characters replaced by spaces. Duplicate titles get (1), (2) suffixes to keep names unique.

For example, the Markdown output for a chat with the title Medium-Style Table CSS might look like this:

# Medium-Style Table CSS

- Created: 26/9/2023, 10:10:54 am
- Updated: 26/9/2023, 10:11:19 am

## user

    Generate CSS for a Medium-style table

## assistant

Creating a Medium-style table requires a clean and minimalist design. Here's a simple CSS snippet to help you create a table that resembles the style seen on Medium. This code assumes that you have a basic HTML table structure in place.

```css
/* Resetting some table styles */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}
...
```

Claude exports

Go to claude.ai > Settings > Privacy > Export data and export your data. Unzip the file you're mailed and run:

npx -p chatgpt-to-markdown claude-to-markdown path/to/your/conversations.json

This writes a Markdown file per conversation (using the conversation name), including summaries, attachments (extracted content), files, thinking blocks, tool calls and tool results.

Thinking Time Analysis

Analyze thinking time statistics from your ChatGPT conversations:

npx -p chatgpt-to-markdown thinktime path/to/your/conversations.json

This will analyze all conversations and show statistics about thinking/reasoning time, including:

  • Total conversations with thinking
  • Total thinking time and blocks
  • Distribution of thinking times
  • Top conversations by thinking time
  • Top individual thinking blocks

Optional flag:

  • --save-details: Save detailed results to thinking_analysis_results_node.json

Installation

npm install chatgpt-to-markdown

API

You can also use chatgpt-to-markdown programmatically in your JavaScript or TypeScript projects.

import chatgptToMarkdown from "chatgpt-to-markdown";

const json = [
  // ... your ChatGPT conversation data
];

const sourceDir = "./output";
const options = {
  dateFormat: (d) => d.toLocaleString(),
};
chatgptToMarkdown(json, sourceDir);

Options

  • dateFormat: A function that takes a Date object and returns a string. Defaults to a string format like "1 Jan 2023 11:30 PM".

Development

git clone https://github.com/sanand0/chatgpt-to-markdown.git
cd chatgpt-to-markdown

npm install
npm run lint
npm test

npm publish
git commit . -m"$COMMIT_MSG"; git tag $VERSION; git push --follow-tags

Release notes

  • 1.12.0: 22 Jan 2026. Claude Markdown metadata shows created, updated, and link - same as ChatGPT
  • 1.11.0: 28 Nov 2025. Add Claude converter + CLI, richer tool formatting (artifacts, web_search, bash_tool, create_file, str_replace, web_fetch, view, repl)
  • 1.10.0: 8 Oct 2025. Streams conversations.json to handle large files
  • 1.9.1: 2 Aug 2025. Sort conversations by create_time to ensure chronological ordering of filenames
  • 1.9.0: 31 Jul 2025. Append numeric suffixes for duplicate chat titles
  • 1.8.0: 30 Jul 2025. Standardized package.json & README.md
  • 1.7.1: 29 Jun 2025. Add thinktime analysis tool as npx executable. Analyze thinking/reasoning time statistics from ChatGPT conversations
  • 1.6.0: 18 Jun 2025. Handle thoughts, reasoning_recap, sonic_webpage. Include projects
  • 1.5.5: 2 Nov 2024. Add conversation link. Use conversation ID as fallback title if title is empty
  • 1.5.4: 2 Nov 2024. Skip user_editable_context to avoid polluting Markdown with custom instructions
  • 1.5.3: 5 Aug 2024. Show text from multimodal prompts
  • 1.5.2: 5 Aug 2024. Show tether_browsing_display summary
  • 1.5.1: 22 Mar 2024. Handle unicode filenames
  • 1.5.0: 28 Nov 2023. Handle tether_browsing_display, tether_quote and system_error
  • 1.4.0: 29 Oct 2023. Handle multi-modal text from Dall-E
  • 1.3.0: 29 Sept 2023. Set create and update dates from chat
  • 1.2.0: 28 Sept 2023. Added test cases
  • 1.1.0: 26 Sept 2023. Add date format option
  • 1.0.0: 26 Sept 2023. Initial release

License

MIT