Chinese Pinyin Annotator

Add pinyin ruby annotations above every Simplified Chinese character.

Free pinyin annotator: paste Simplified Chinese and get tone-marked pinyin rendered as HTML ruby text above each character, ideal for learners, teachers and subtitles. Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is pinyin and what do the tone marks mean?

Pinyin is the official romanisation of Mandarin Chinese. The diacritics show the four tones: flat (mā), rising (má), dipping (mǎ) and falling (mà). A character with no mark is read in the neutral tone. Tones change meaning, so they are essential for learners.

The Chinese Pinyin Annotator places the romanised reading of each Simplified Chinese character directly above it, using the same ruby layout found in learner textbooks and graded readers. Paste a sentence and instantly see how it should be pronounced, tone marks and all — a fast way to bridge the gap between recognising characters and saying them aloud.

How it works

Each character in your text is looked up in a built-in dictionary that maps it to its Hanyu Pinyin reading, complete with the diacritic that encodes the tone. The annotator wraps every matched character in an HTML <ruby> element with the pinyin inside an <rt> (ruby text) tag, which the browser positions above the base character. Characters that are not in the dictionary — and any non-Chinese text such as punctuation — pass through unchanged so the original layout is preserved.

The four Mandarin tones are written as ā á ǎ à over the main vowel of each syllable, following the standard tone-placement rules. A syllable with no diacritic is read in the neutral (light) tone.

Understanding Mandarin tones

Each Chinese syllable carries one of four tones (or a neutral tone), and tones are phonemic — they change the word’s meaning entirely. The four tones on the syllable “ma” alone give four unrelated words:

DiacriticToneDescriptionExample
ā1st (flat)High, level, held steady妈 (mother)
á2nd (rising)Starts mid, rises sharply麻 (hemp, numb)
ǎ3rd (dipping)Falls then rises马 (horse)
à4th (falling)Starts high, drops sharply骂 (to scold)
aNeutralShort, unstressed吗 (question particle)

The diacritic always sits above the main vowel of the syllable. When multiple vowels appear together (e.g. “ou”, “ui”), tone-placement rules decide which vowel carries the mark — generally the one pronounced most prominently.

Tone placement rules

Standard Hanyu Pinyin tone placement follows these priorities:

  1. If the syllable contains a or e, the diacritic goes there.
  2. If the syllable contains ou, the diacritic goes on o.
  3. Otherwise the diacritic goes on the last vowel.

The annotator applies these rules automatically, so guó places the mark on o and huì places it on i.

Heteronyms and when to verify manually

Many Chinese characters have two or more valid readings depending on context, known as heteronyms (多音字). A few common examples:

  • 行 — xíng (to walk, acceptable) or háng (a row, a profession, a bank)
  • 长 — cháng (long) or zhǎng (to grow, a senior person)
  • 发 — (to send, to emit) or (hair)
  • 乐 — (happy) or yuè (music)

The annotator always renders the most frequent reading for each character. When you are working with text where these words appear in the less common sense, verify that syllable manually. The coverage counter shows how many characters were matched, so you can spot gaps quickly.

Use cases

Pinyin annotation is most valuable for: learner handouts and textbook extracts where students need pronunciation support; creating subtitles or captions for Mandarin video; annotating song lyrics or poems for performance; and proofreading text-to-speech scripts to catch unusual readings before recording. Everything runs locally in your browser — private documents are safe.