Host your Plotly Chart Studio visualizations online for free using GitHub Pages. Export your charts from Chart Studio as HTML files and publish them with a simple web link.
Upload your Chart Studio HTML exports or JSON data files, and they'll be automatically published online:
- An index page listing all your Plotly charts is created at
https://yourusername.github.io/your-project/ - Each chart gets its own web address:
https://yourusername.github.io/your-project/my-chart.html - NEW: Support for JSON exports - just place Chart Studio JSON files in the
json/directory and they'll be automatically converted to HTML
Perfect for sharing interactive Plotly visualizations with your team or embedding in presentations!
- At the top of this page on GitHub, click the green "Use this template" button
- Select "Create a new repository"
- Give your project a name (like "my-plotly-charts")
- Click "Create repository"
- Go to Chart Studio
- Open the chart you want to publish
- Click Export and select HTML
- Save the
.htmlfile to your computer - Repeat for any other charts you want to publish
This is the most important step - your charts won't be published without it!
Note: If you're using a free GitHub account, your repository must be public to use GitHub Pages. If your repo is private, go to Settings → General → scroll to the bottom → click Change visibility → select Make public.
- In your new repository, click Settings at the top
- Look in the left sidebar and click Pages
- Under "Build and deployment", find the Source dropdown
- Select GitHub Actions (not "Deploy from a branch")
- The page will refresh - you're all set!
You can add files directly on GitHub (easiest) or use GitHub Desktop:
Option A: Upload on GitHub (Easiest)
- Click on the
chartsfolder - Click Add file → Upload files
- Drag and drop your Chart Studio
.htmlfiles - Click Commit changes at the bottom
Option B: Using GitHub Desktop
- Download GitHub Desktop
- Clone your repository to your computer
- Copy your Chart Studio
.htmlfiles into thechartsfolder - In GitHub Desktop, write a description and click Commit to main
- Click Push origin to upload
Option C: Upload JSON Files (Alternative) If you have JSON exports from Chart Studio instead of HTML files:
- Click on the
jsonfolder (or create it if it doesn't exist) - Click Add file → Upload files
- Drag and drop your Chart Studio JSON files (e.g.,
chart_data.jsonfiles) - Click Commit changes at the bottom
- The GitHub Action will automatically convert these to HTML files in the
chartsfolder
After uploading files:
- Click the Actions tab at the top of your repository
- You'll see a workflow running (yellow dot = in progress, green check = done)
- This usually takes 30-60 seconds
Your interactive Plotly charts are now live!
View All Charts: Go to your main page to see a gallery of all your Plotly visualizations:
https://YOUR-USERNAME.github.io/YOUR-REPO-NAME/
View Individual Charts: Each Plotly chart has its own direct link:
https://YOUR-USERNAME.github.io/YOUR-REPO-NAME/FILENAME.html
Example:
- If your GitHub username is
jane-smith - Your repository is named
my-plotly-charts - Your main gallery page is at:
https://jane-smith.github.io/my-plotly-charts/ - A specific chart is at:
https://jane-smith.github.io/my-plotly-charts/sales-report.html
Don't remember the exact address?
- Go to Settings → Pages
- At the top you'll see "Your site is live at [address]"
- Visit that address to see all your charts listed with clickable links
- Or add a filename to the end for a specific chart:
[address]/your-file.html
Just repeat Step 4! Every time you export a new chart from Chart Studio and add the .html file to the charts folder:
- GitHub will automatically publish it within about a minute
- The index page will automatically update to include your new Plotly chart
My chart isn't showing up
- Double-check that GitHub Pages is enabled (Settings → Pages → Source should say "GitHub Actions")
- Make sure your file is in the
chartsfolder, not somewhere else - Wait 1-2 minutes after uploading - it's not instant
- Check the Actions tab to see if there were any errors (red X icon)
I see a 404 error
- Make sure you're using the exact filename (including
.html) - Check that the file name doesn't have spaces - use dashes instead (
my-chart.htmlnotmy chart.html)
Need to remove a chart?
- Go to the
chartsfolder, click on the file, and click the trash icon - Commit the change, and it will be removed from your site within a minute
If you have many charts in Chart Studio and want to download them all at once, you can use the poll_all_charts.py script instead of manually exporting each one.
The script automatically:
- Connects to your Chart Studio account using your API credentials
- Fetches all charts that you own
- Downloads the chart data as JSON
- Generates standalone HTML files using Plotly.js 1.58.5
- Saves them to the
charts/folder, ready to be published
This is much faster than manually exporting charts one-by-one from the Chart Studio interface, especially if you have dozens or hundreds of visualizations.
Step 1: Install UV
UV is a fast Python package manager. Install it by running:
# On macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"Step 2: Get Your Chart Studio API Credentials
- Log in to Chart Studio
- Go to Settings → API Keys
- Copy your API key
Step 3: Update the Script
Open poll_all_charts.py and update these lines with your credentials:
username = 'your-username' # Replace with your Chart Studio username
api_key = 'your-api-key' # Replace with your API key from Step 2Step 4: Run the Script
In your terminal, navigate to the repository folder and run:
./poll_all_charts.pyOr:
uv run poll_all_charts.pyThe script will download all your charts and save them as HTML files in the charts/ folder. Then just commit and push the changes to publish them on GitHub Pages!
Note: This script uses Plotly.js version 1.58.5 to ensure compatibility and consistent rendering across all your charts.
If you have Chart Studio JSON exports (such as chart_data.json files from bulk exports), this repository can automatically convert them to HTML files.
- Bulk exports from Chart Studio often come as JSON files
- JSON files are more portable and easier to version control
- You can modify chart data programmatically before converting to HTML
- Smaller file sizes compared to full HTML files
Option 1: Manual Conversion (Local)
- Place your JSON files in the
json/directory - Run the conversion script locally:
./convert_json_to_html.py
- The script will create HTML files in the
charts/directory
Option 2: Automatic Conversion (GitHub)
- Upload your JSON files to the
json/folder in your repository - Commit and push the changes
- GitHub Actions will automatically:
- Detect the JSON files
- Convert them to HTML using the same Plotly.js version (1.58.5)
- Include them in your published site
The JSON files should match the Chart Studio export format:
{
"data": [
{
"type": "scatter",
"x": [1, 2, 3],
"y": [2, 4, 6],
"mode": "lines+markers"
}
],
"layout": {
"title": {
"text": "My Chart"
},
"xaxis": {"title": {"text": "X Axis"}},
"yaxis": {"title": {"text": "Y Axis"}}
}
}The conversion script reads the data and layout fields and generates standalone HTML files with embedded Plotly.js.