Chris Zetter

Mapping anything with BSicons

If you go to the Wikipedia page for the Forth and Clyde Canal, the Trans-Siberian Railway or the London Circle Line you may notice that they all have route maps with a similar visual style.

A diagram of the Glasgow subway loop that shows the route of the subway alongside station names and connecting rail services
A route map of the Glasgow subway from Wikipedia.

How do the many Wikipedia contributors create all these similar-looking maps? The answer is BSicons.


BSicons are the building blocks for these route maps. They are an SVG icon set that Wikipedia contributors use to map railways, subways, footpaths, waterways, cycle paths and roads. Any transport system that they want to produce a simplified schematic for.

A diagram of the Glasgow subway. The diagram is made up of square icons in a grid which is highlighted
The Glasgow subway map is made up of many BSicons icons. Most are square, but there are a few half-width icons too that allow for a more compact map.

The icons were first used on the German Wikipedia which is why most of their names are based on German words. ‘BSicons’ comes from the German word Bahnstrecken (Railway Lines).

Each icon has a shorthand name that follows some conventions:

Here are some of the icons:


A rail line

Root: STRSTReke (line)


A river or other waterway

Root: WASSER (water)


Two rail lines crossing with one going under the other

Root: KRZKReuZung (crossing)
Suffix: uunter (under)


A rail line that comes from the left

Root: STRSTReke (line)
Suffix: +l+ (from), links (left)

Directions are relative to the line (which is drawn from top to bottom) rather than the page. This is why the suffix says the line is from the left rather than going to the right.


A station on an underground light rail line that comes from the first corner

Root: BHFBahnHoF (station)
Prefix: utku-bahn, tunnel, kombination (Compound)

the k denotes that the icon is for drawing compound turns that span four columns of icons.


A two-lane paved road with a roundabout

Root: RP2Road Paved 2-lane
Suffix: rroundabout1


A rail line that goes into a tunnel

Root: STRSTReke (line) Prefix: ttunnel
Suffix: aanfang (start)


An elevated rail line going over a light elevated rail line

Root: KRZKReuZung (crossing)
Prefix: mhmischbetrieb (mixed), hochbahn (high level/elevated)
Suffix: hohochbahn (high level/elevated), overpass

These are a few examples. The BSicon Catalogue explains many more conventions.

Building maps

To help put all these icons together into a map Wikipedia has a Routemap template. The template defines a syntax to provide shortcuts to build maps.

A diagram of the Glasgow subway loop that shows one line of icons highlighted.
Routemaps are made up of rows of icons

Here is the code used to generate the single highlighted row:

{{Subway|Hillhead}}! !\utkBHF+1\\\utkBHF+4\tSTRa~~{{Subway|St George's Cross}}

The syntax is a bit cryptic and uses the shorthand icons names we saw above. Here is what each part does:

Hundreds of thousands of icons

There are more than 290,000 BSicons out there due to an explosive number of combinations needed for different colours, rotations, intersections, bridges, curves, embankments and tunnels. Many obscure BSicons might only be used a few times across Wikipedia (like BHFABZgl+l)2.

Each icon is simple, so simple many of them are marked as ineligible for copyright on Wikipedia. Together the icons can combine to map more complex systems. Seeing how these icons can be combined inspired me to make a random BSicon map generator.

A gird of icons showing train lines crossing over and under each other with stations.
A random tiling image made by my random map generator
  1. The use of r for roundabout clashes with the use of r for right that's used with other root icons. If you want a road goes to the right you need to use rf (right forward) instead. While many prefixes and suffixes work the same way across multiple roots it's not a perfect system.

  2. This icon is used to represent triangular railway stations such as Shipley. There are only two of these stations in the UK.

Read more by me, follow me on Mastodon or subscribe.