I'd like to provide SVG, or at least GIF stroke order diagrams on my website.

Is there a database similar to the Japanese KanjiVG, but for Simplified and Traditional hanzi?

If not, is there a free or paid repository of stroke order diagrams in GIF or some other format?

2 Answers 2


There are some recent open source efforts that have opened this up a bit. One is hanzi writer, which was based on the data for 3195 strokes contained in ZDT but now uses the more complete character data from make me a hanzi demo. It uses javascript to draw and animate the strokes, directly from json versions of the character path data. Update: Recently, the library has been made significantly smaller. As of 2018-03-02, it is also able to show radicals in different colors, based on data in make me a hanzi demo.

Another great recent project is make me a hanzi demo. It contains stroke animations for 9507 characters (includes traditional chars). This data was extracted from two free chinese fonts using a semi-automated algorithmic approach. At present, the main things of interest on the master branch are the two data files graphics.txt and dictionary.txt and a complete collection of animated SVG's of the characters. SVG's vary in size from 2KB to 45KB. If you would prefer to render the characters algorithmically, you may wish to explore some of the other branches, such as demo (check the lib sub-folder) and tools (which seems to be where recent developments are taking place).

One more i've come across that uses the same data format as ZDT but which doesn't reveal license terms is worth mentioning, as the code is brief and easy to follow. Nicely done Chase! To draw a new stroke, you can grab zdtStrokeData.txt from the first project mentioned here, then cut and paste the paths for the stroke you want to draw over the string where the 'strokes' array is defined (currently line 291). Update: You also need to replace tabs with semi-colons and add a final semi-colon first.

Regarding the differences between the two data formats used by the projects above, the ZDT format may include multiple paths for a single stroke, in cases where the direction of stroke changes mid stroke. The prefix format is explained well by Chase. It records the direction of stroke, whether the current path is the final part of a stroke or part of the initial paths of a stroke and whether the current path is part of a radical.

The 'make me a hanzi demo' path data (graphics.txt) does not contain stroke direction information. Also, unlike the ZDT data, a single path defines a single stroke. The stroke information is in SVG path format, using quadratic bezier curves. To ascertain which part of the paths represent the radical, one may do a lookup in dictionary.txt. The dictionary also contains character decomposition data in an interesting format, derived from Unihan and CJKLib. The project page has more information on the format.

  • Fantastic developments, fzzylogic! Thanks for the heads up. Commented Sep 23, 2016 at 8:51
  • Np, hope you make something wonderful! :-) Things in this area have been stagnant for far too long.
    – fzzylogic
    Commented Sep 23, 2016 at 9:25

There is the Wikimedia Commons Stroke Order Project. It's a great resource with images and animations for many simplified characters.

You could also try generating your own diagrams and animations using the Stroke Fanning application, which is backed by stroke order data from ZDT.

YellowBridge is my preferred online dictionary, and it has stroke order animations for almost everything I've ever searched for. I presume they own the copyright for these, so you couldn't just stick them on your website, but you could create your own diagrams or animations using them as a reference.

  • I'm aware of the Stroke Order Project, but it only covers 1,007 PRC standard characters, and it has been in this state for years. Even the Bopomofo & Hangeul characters are barely started - I doubt things will improve in the foreseeable future. Commented Jun 30, 2015 at 12:55
  • Stroker Fanning looks really interesting... I imagine these would work great in paper dictionaries, but I think they're probably not the most intuitive method for beginner learners. It also unfortunately generates PDFs, not image files, and even some of the 500 most common hanzi miss the stroke order data. Commented Jun 30, 2015 at 13:44
  • ZDT is open source, so you could always contribute if you feel some of what you need is missing. Most PDF readers allow saving PDFs, or parts of them, as images.
    – Cocowalla
    Commented Jun 30, 2015 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.