You can download the code you've written on CodeHS from your Code History settings, or one assignment at a time from the code editor.
In your Code History settings, you can choose the courses you want and request a data export. When the course code is ready, it appears in your list of previous exports, where you can download it as many times as you need before it expires.
Downloading Code From Code History Settings
To find your Code History Settings:
Select your profile icon in the top right of the site, then select Account Settings.
Select the Code History tab in the left menu.
The Code History tab has two sections:
Request Data Export — where you choose your courses and start a new export.
Previous Exports — where your finished exports wait for you to download them.
Requesting a Data Export
You can request an export of your code to download and use outside of CodeHS:
In the Request Data Export section, choose a course from the dropdown, or select Select All to include all of your courses.
Select Request Data Export.
Your export starts right away and runs in the background. You don't need to stay on the page or keep the tab open while it builds — this helps most with large exports that cover several courses. When it's finished, it appears in the Previous Exports table on this same page.
Downloading a Previous Data Export
Every export you request is listed in the Previous Exports table, with the courses it covers and the date it expires.
To download an export:
Find its row in the Previous Exports table and select Download to the right of the expiration date.
You can download an export as many times as you need to before it expires.
⚠️ Note: Downloads expire seven days after the export was created, and the expiration date is listed in the Expires column. After that, request a new export to get your code again.
Working With the Export List
If you have a long list of exports, a few controls help you find what you're looking for:
Use the filter icons in the Courses and Expires column headers to narrow the list.
Use Page Size and the page arrows at the bottom to move through your exports.
Select the Export CSV button to download the list itself as a spreadsheet, or the Copy Link button to copy it.
Downloading Code From the Code Editor
For information on how to download the code for a single assignment from the code editor instead, check out For Students: Downloading Your Code.
Still have questions? Contact our team at support@codehs.com to learn more!





