Doodle Code is a type of barcode: a machine-readable optical label. Similar to QR codes, it can be used to store data. Although it is less information-dense than QR codes, it has more flexibility in its appearance. It can be hand-drawn and is easy to learn using a few simple rules. It is designed to be robust so that photos of a Doodle Code can be correctly decoded under various angles or lighting conditions.
Doodle Code uses black paths on a white background. The paths should be at least two pixels wide.
Data is stored in binary, using a sequence of 0s and 1s. There should be a single path connecting all of the symbols in a sequential order. Since this path has two "ends", the following system is used to label the direction of the path: an extra "0" is used at the start and an extra "1" is used at the end. For example, to encode the data "10", after adding the start/end labels the final sequence will be "0101".
A "0" symbol is made by splitting the path into two paths and then re-joining later:
The distance between the split and the join should be approximately the same on both paths. This example violates this rule:
A "1" symbol is made by splitting the path into three paths and then re-joining later:
There should be a single point where the path splits into three. This example violates this rule because there are two separate split points on the left side:
The path connecting two symbols should be sufficiently long: at least twice the "width" of the path.
Black paths should be made as solid as possible, without any gaps or holes. Any hole in a black path could potentially be interpreted as a symbol. To make Doodle Codes more robust, black pixels are sometimes expanded outwards to fill in small gaps (potentially caused by noise in photos). As a consequence, the inner white regions for the "0" and "1" symbols need to be sufficiently large: at least the width of the black path. In addition, separate black paths should not get too close to each other: they should be separated by at least the width of the black paths.