Join Observable to explore and create live, interactive data visualizations.
About Blocks
Since September 16, 2010

Bl.ocks (pronounced “Blocks”) is a simple viewer for sharing code examples hosted on GitHub Gist. For example, if your Gist URL is:

Replace “” with “” in the URL to view it:

The main source for your example is in index.html. This file can contain relative links to other files in your Gist, such as images, scripts or stylesheets. And of course you can use absolute links, such as CDN-hosted D3, jQuery or Leaflet. To explain your example, add a written in Markdown. (You can omit the index.html if you just want to write, too.)

Customize the appearance of your Block by adding a .block YAML configuration. The following options are supported:

For example:

license: gpl-3.0
height: 500
scrolling: no
border: yes

To add a thumbnail preview, add a 230×120 thumbnail.png to your Gist. For social media, you can also add a larger 960×500 preview.png or preview.jpg.

Browser Extensions

For convenient access, install the browser extension for Chrome or Firefox!

Credits is run by . is not affiliated with GitHub.

Code highlighting by Highlight.js (BSD license).
Markdown formatting by Showdown (BSD license).