Hanzi2Pinyin

AnkiWeb addon 77106192

Converts Chinese characters in any Anki field into Pinyin or Zhuyin ruby annotations displayed above the Hanzi, supporting simplified and traditional text.
AI-generated summary; may contain mistakes.

card-creationformatting

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
6 (👍 6 · 👎 0)
Updated
2025-09-23
Anki versions
25.09~
License
MIT (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON, TSV, CSV
Description language
en

Maintenance

stale

  • Last update or commit: 2025-09-23 (404 days before the snapshot).
  • Test files: 2.
  • GitHub Actions workflows: 1.
  • Commits in the last year: 0.
  • Issues: 3 open, 2 closed.
  • Pull requests: 1 open, 3 merged.
  • Median first response: 16 hours (4 answered issues and pull requests).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
23.1024.122025-01-14
24.12.125.02.72025-07-07
25.09+2025-09-23
History across monthly snapshots

Loading…

Similar addons

Pinyin on top of Hanzi

Generates Pinyin ruby annotations above Hanzi in selected fields, matching existing Pinyin or producing it via word segmentation and a bundled dictionary, and can build HTML definition tables.

card-creationformattingdictionary

27 votes 59% approval 👍 21 · 👎 6 ⭐ 2 Updated 2018-01-30
anki_ruby_support

Adds customizable ruby annotations (furigana/pinyin) to selected card text via toolbar button or shortcut key, with adjustable font size, text color, and error logging.

formattingshortcuts

1 votes 21% approval 👍 1 · 👎 0 Anki 2.1.1~ Updated 2025-01-14

Description

Description

This Anki add-on lets you add Pinyin and Zhuyin readings above Chinese characters (Hanzi) in any field.

It works by converting your Chinese text into ruby annotations, where the Pinyin appears as small text above the original characters, making it easier to read and study Chinese text.

Usage

  • Quick start guide here
  • Documentation here

⚠️ For the ruby annotation to work use this Anki note type made specifically for this add-on.

More info here: Anki documentation on Ruby characters

Review and Support

⚠️ Before giving this add-on a negative rating, please report any issues on GitHub: Issue Tracker. This helps improve the add-on for everyone (as someone might run through the same issue as you!). For support check the documentation page.

Demo

Demo
Demo

More demo on the Documentation and Quick Start Guide page.

Planned Features

  • Bulk add/remove 🐝 soon
  • Jyutping and Cantonese support
  • Xiao'erjing (Xiaor jin/Xiaojing/Arabic-Persian script) support (Maybe)

加油
Demo

README

Hanzi2Pinyin


Demo of Hanzi2Pinyin

💜 For the Quick Start Guide click here💜
To download the companion Anki note type click here

Description

This Anki add-on lets you add Pinyin and Zhuyin readings above Chinese characters (Hanzi) in any field.

It works by converting your Chinese text into ruby annotations, where the Pinyin appears as small text above the original characters, making it easier to read and study Chinese text.

Why Hanzi2Pinyin when there are other great add-ons?

⚠️ For the ruby annotation to work use this Anki note type made specifically for this add-on.

Read the Anki documentation on Ruby characters.

Looking for the Quick Start Guide? Need help? Want to raise an issue? Looking for documentation? See Contributing & Support

Example
Type Pinyin Zhuyin
Hanzi 你好 你好
Hanzi to Ruby 你[nǐ]好[hǎo] 你[ㄋㄧˇ]好[ㄏㄠˇ]
HTML Code <ruby>你<rt>nǐ</rt></ruby><ruby>好<rt>hǎo</rt></ruby> <ruby>你<rt>ㄋㄧˇ</rt></ruby><ruby>好<rt>ㄏㄠˇ</rt></ruby>
HTML Output
你nǐ好hǎo
你ㄋㄧˇ好ㄏㄠˇ

Demo


Demo of Hanzi2Pinyin Demo
⬇️
Demo
Demo with Zhuyin

Demo of Hanzi2Pinyin
Demo Tools settings (macOS)

Demo of Hanzi2Pinyin

Features

  • [x] Pinyin support - Browse editor dialog
  • [x] Pinyin support - Add editor dialog
  • [x] Zhuyin (Bopomofo) support
  • [x] Note Type that supports ruby text for Chinese

Key benefits:

  • Works with any field name of your choosing (No restrictions)
  • Simple and reliable functionality
  • Support both Simplified and Traditional Chinese Characters

Planned Features

Status Feature Details
🔄 Bulk add/remove Available in tools menu
🔄 Jyutping and Cantonese Support for Cantonese pronunciation
🔄 Xiao'erjing Support for Arabic-Persian script (also known as Xiaor jin/Xiaojing)
🔄 Sandhi Support for phonological changes between adjacent tones (Note 1)

Note 1: Sandhi refers to how tones change when certain tones/words are next to each other in speech. For example, in Mandarin, when a hanzi with the third tone is followed by another hanzi with the third tone, the first hanzi changes to second tone instead.

I plan on making additional Chinese language tools that will be released as separate add-ons to maintain simplicity as I prefer single-purpose add-ons.

Why Hanzi2Pinyin when there are other great add-ons?

This add-on focuses on simplicity and flexibility. While many add-ons offer extensive features, they often come with drawbacks:

  • Break when Anki or Qt versions are updated
  • Restrict you to specific field names
  • Bundle multiple features you might not need

Contributing & Support

Type Description
Issues & Requests Bug reports or feature requests
Contributing Fork the repo and submit a PR
Discussions Getting help and questions
Support Support
Quick Start Guide Quick Start Guide
Technical documentation Technical documentation

OS
This script has been primarily tested on macOS and Windows. I currently don't have access to a Linux machine for thorough testing.

Acknowledgements

Libraries

Library Links
jieba PyPi, GitHub
pypinyin PyPi, GitHub

Other

Description Source
Anki SVG logo Glutanimate

加油

Demo of Hanzi2Pinyin