Hanyu Pinyin is the standard romanisation of Mandarin Chinese, and its four tones are written either with a number after the syllable (ma1, ma4) or with a diacritic over a vowel (mā, mà). This free tool converts between the two notations in both directions, applying the official tone-mark placement rule, instantly and with no upload.
The four Mandarin tones
Mandarin has four tones plus a neutral tone, each of which changes the meaning of a syllable completely. The tone is indicated in pinyin either by a number at the end of the syllable or by a diacritic over the vowel.
| Tone | Number notation | Accent notation | Description |
|---|---|---|---|
| First tone | mā1 | mā | High, level, sustained |
| Second tone | má2 | má | Rising, like asking a question |
| Third tone | mǎ3 | mǎ | Dip-and-rise, falls then rises |
| Fourth tone | mà4 | mà | Falling sharply, like a command |
| Neutral tone | ma5 / ma0 | ma (no mark) | Short, unstressed, no inherent tone |
For example: mā (mother), má (hemp), mǎ (horse), mà (to scold) — four
entirely different words from one consonant-vowel combination, distinguished only
by tone. This is why tone accuracy matters enormously in Mandarin.
How the tone-mark placement rule works
The rule for where to put the diacritic is fixed in standard pinyin:
- If the syllable contains a or e, the mark goes on that vowel.
- In the two-vowel sequence ou, the mark goes on the o.
- Otherwise, the mark goes on the last vowel in the syllable.
This rule resolves every case unambiguously. For example:
hao3→hǎo(mark on a, rule 1)gou4→gòu(mark on o in ou, rule 2)gui4→guì(mark on last vowel i, rule 3)liu2→liú(mark on last vowel u, rule 3)
How it works
To add accents, the tool reads each syllable and its trailing tone number (1 to 4, with 5 or 0 meaning neutral). It applies the placement rule above, then swaps the base vowel for its pre-composed accented Unicode form.
To remove accents, the tool detects any accented vowel in a syllable, records which tone it represents, replaces it with the plain vowel, and appends the matching number after the syllable. Neutral-tone syllables are returned with no number.
When to use each notation
- Numbered pinyin (
ni3 hao3) is used in textbooks, flashcard files, and software input because it is ASCII-safe and easy to type on any keyboard. - Accented pinyin (
nǐ hǎo) is used in printed dictionaries, learning materials, and anywhere the text needs to look polished and readable to a learner.
Converting between them is a recurring task for Mandarin learners, textbook authors, and app developers who work with both representations.
Tips and notes
Because keyboards lack the ü key, type v or ue where ü is needed — for example lv4 or lue4 yields lǜ. Tone marks always sit on vowels, never consonants, which is why the placement rule matters for clusters like iao or uan. Words and punctuation between syllables pass through unchanged. Everything runs locally in your browser — your text is never sent to a server.