Pie Chart API

Turn a URL into a pie chart image. No API key, no sign-up, no watermark. Paste it into a GitHub README, Notion page, website or dashboard and the chart appears.

Chart type
Theme
Monthly Budget
Image URL
https://www.createpiechart.com/api/pie?labels=Rent,Food,Transport,Savings,Fun&values=1200,450,200,400,150&title=Monthly+Budget
Markdown (GitHub, Notion)
![Monthly Budget](https://www.createpiechart.com/api/pie?labels=Rent,Food,Transport,Savings,Fun&values=1200,450,200,400,150&title=Monthly+Budget)
HTML
<img src="https://www.createpiechart.com/api/pie?labels=Rent,Food,Transport,Savings,Fun&amp;values=1200,450,200,400,150&amp;title=Monthly+Budget" alt="Monthly Budget" width="600">

How it works

Every chart is described entirely by its URL. Send a GET request to https://www.createpiechart.com/api/pie with your labels and values, and you get back an SVG image. The same URL always returns the same image, so it’s cached worldwide and loads fast.

https://www.createpiechart.com/api/pie?labels=Yes,No,Maybe&values=62,30,8&title=Survey

Parameters

ParameterWhat it doesExample
labelsSlice names, separated by commas (or | if a name contains a comma).labels=Rent,Food,Fun
valuesSlice values in the same order. Plain numbers; $ and % are ignored.values=1200,400,150
dataLabels and values together, instead of labels + values.data=Rent:1200,Food:400
titleTitle shown above the chart.title=Monthly%20Budget
typepie (default) or donut.type=donut
showWhat the slice labels show: percent (default), value, label or none.show=label
legendShow the legend: 1 (default) or 0.legend=0
width / heightImage size in pixels, 200 to 2000. Height is chosen automatically if left out.width=800
themelight (default) or dark.theme=dark
paletteclassic, vibrant, pastel, corporate, colorblind, ocean, sunset, earth, neon or mono.palette=pastel
colorsYour own slice colors as hex codes, without #.colors=2563eb,f97316
bg / textBackground and text colors as hex codes, or bg=transparent.bg=transparent
prefix / suffixAdded around values, e.g. currency or units.prefix=$
decimalsDecimal places in percentages, 0 to 2.decimals=1
centerText in the middle of a donut (defaults to the total).center=72%25

Values can be raw numbers; percentages are worked out for you. Up to 40 slices are allowed, but a pie chart reads best with seven or fewer (see when not to use a pie chart). If something is wrong with the URL, the image shows a short error message instead of a chart.

Where to use it

  • GitHub READMEs and docs: show language breakdowns, survey results or budget splits with one line of Markdown.
  • Notion, Confluence and wikis: paste the image URL or the Markdown snippet.
  • Websites, blogs and dashboards: drop the HTML snippet into any page, CMS or internal tool that accepts images.
  • Your own app: generate the URL in code and set it as an <img> source. No server-side chart library needed.

Need more than a flat pie?

The API covers the most common case. For 3D pie charts, half pies, nested rings, patterns, exploded slices, PNG and PDF downloads or interactive embeds, use the free online editor.

Frequently asked questions

Is the pie chart API free?

Yes. There's no API key, no sign-up and no watermark. Please use it fairly: images are cached, so the same URL is cheap to serve, but don't generate millions of unique charts per day.

What format are the images?

SVG, a vector format that stays sharp at any size and works in browsers, GitHub, Notion and design tools. Some places don't accept SVG, including Gmail and many other email apps; for those, make the chart in the pie chart maker and download a PNG.

Can I use it in a GitHub README?

Yes. Paste the Markdown snippet from the builder above. GitHub loads the image through its own proxy, and the chart updates whenever you change the URL.

Is my data stored?

No. The chart is drawn from the numbers in the URL and nothing is saved. Remember that anyone who sees the URL can read the numbers in it, so don't put private data in public links.

Can I make 3D or nested charts with the API?

The API makes flat pie and donut charts. For 3D, half pie and nested charts, use the online editor, then download an image or copy the embed code.