Currently Claude.ai doesn't include a means for exporting a conversation. This add-on to Chrome and Firefox captures the JSON page content as it's downloaded, converts it to HTML that closely mimics the behavior of Claude in the browser, and downloads the result. The basic structure of the add-on was written using Claude.
Firefox and Chrome have different requirements for extensions, so there are two implementations, each in a separate directory.
To install in Firefox, download the claudeExport.xpi file to your computer. In the add-ons window, click the settings gear and then click "Install add-on from file". Browse to wherever you downloaded the .xpi file and select it. Add-ons that have been checked by Firefox contain a META-INF directory which contains a signature generated by Mozilla. This is an automated check so while it should provide some confidence, it's not a guarantee. Of course, you can look at the source code in the repo.
To install in chrome, open the debugger interface by typing "chrome://extensions". In the upper right corner enable "Developer Mode". Then click "Load unpacked". Navigate to the Chrome folder and click on manifest.json. You may be tempted to "pack" the extension into a .crx file so that you don't have to use developer mode. This won't work. Chrome will only install .crx files from the Chrome store. Getting stuff into the Chrome store is hardere than the Firefox store, so I didn't bother.
Because the extenson captures the JSON as it's downloaded, if the extension is not active when the page was initially downloaded you will get a message "no conversation captured" when you try to view or download the captured conversations. If this occurs, just reload the page and try again.
By default, printing does not include non-inlined artifacts - ie, artifacts that appear in the slide-out panel. There is a checkbox labeled Print All Artifacts in the pop-up menu. If you check this box before exporting the HTML, the printed version will have all artifacts printed where they occur in the conversation. The browser view of the file is the same whether or not the box is ticked.
The directory OfflineConversion contains two different solutions for converting all the conversations in an export from Claude. You can export you entire history by clicking on your login name, then settings, then account. Select Export Data. This will give you a zip file of all your conversations, including the data of deleted conversations, though there will be no useful data for deleted conversations.
The first approach requires you have Python installed on your computer. The OfflineConversion directory contains a Python program to convert the export output to formatted html files. claude_export_formatter.py two args on the command line. The first is the name of the json file containing your conversations. The downloaded zip file calls this conversations.json. The second arg is the directory to write the output. When done this directory will contain a file index.html which is a table of contents with links to the formatted versions of all your conversations. The output directory also contains all the HTML formatted files.
The second approach is to open the page Convert_All_Conversations.html in your browser. This page will load the html-converter.js script, so make sure you have downloaded that file in the same directory as the Convert_All_Conversations.html file. Drag the conversations.json file from the download to the page. This will convert all conversations to formatted html and produce a table of contents page index.html. These are packaged in a .zip file. Download and save the file, unpack the zip and you've got all your conversations. In spite of the term "download", all processing is occurring locally to your computer.