Pinyin Tone Marks in Plain Text on iPhone and Mac
Quick answer
On a Mac, add the ABC - Extended input source and use Option-key combinations to type tone marks. On an iPhone, Apple documents the same layout for a hardware keyboard. Tone numbers such as tong2 are the fallback when no layout is available. Names and greetings for Lunar New Year, like xīnnián kuàilè, read wrongly without the marks, and plain text has no font tricks to hide the problem.
Type tone marks on a Mac
Pinyin marks the four tones of Standard Chinese with diacritics: ā, á, ǎ, à. The neutral tone has no mark. According to Wikipedia's Pinyin article, the mark sits over the main vowel of the syllable.
Press and hold a letter
The quickest route needs no setup. As Apple's Mac guide describes it, press and hold a letter key such as a to open the accent menu, then click a character or press the number shown under it. Two limits apply: the menu doesn't appear for keys without accent marks, and accent marks aren't available in all apps. That suits a one-off word. It's slow for a paragraph.
Add ABC - Extended and use dead keys
For longer text, add the ABC - Extended input source. Apple says it lets you type in several Latin-script languages and add tone marks when typing Pinyin for Mandarin Chinese. The mechanism is the dead key: press the key combination for the mark, then the letter it belongs to. Apple's own example with the ABC layout is Option-N followed by a for a tilde.
If you don't know which keys produce which mark, open the Keyboard Viewer and hold Option, or Option and Shift. Dead keys get an orange outline, so you can read the layout straight off the screen.
Typing ü
The vowel ü is the awkward one. Apple's iPhone guide gives a worked example: to type ǚ in lǚxíng, press Option-V, then type v.
There is also a convention that avoids the problem. Apple's Pinyin - Simplified input method uses v in place of ü, so you type lv to get 绿. That method turns pinyin codes into Chinese characters, though. It does not produce tone-marked romanization. If your goal is pinyin text on the page, you want ABC - Extended instead.
Wikipedia notes that it is common for cellphones to use v instead of ü, with the drawback of limited font support for combining accents on the letter v. Pick one spelling per document and stick to it.
Typing tone marks on iPhone
Apple's iPhone guide covers a Magic Keyboard that lacks the accents for the language you type. Open Settings, then General, then Keyboard, then Hardware Keyboard, and choose ABC - Extended if you use English (US). The same Option-V, then v sequence gives ǚ.
That guide is about hardware keyboards. The sources we checked don't describe tone-mark entry on the touchscreen keyboard, so we won't promise a method there. If you only have the on-screen keyboard, copy a marked syllable from a reference, or use tone numbers until you can connect a keyboard. For the wider picture of keyboards on iOS, see typing Chinese on iPhone and iPad.
Tone numbers and Unicode
Tone numbers are the plain-text safety net: write the number at the end of the syllable, so tóng becomes tong2. Wikipedia notes that the neutral tone is written with no number, with 0, or with 5, and it flags that part of its own page as lacking citations, so choose a convention and state it at the top of the file.
Under the hood, a toned vowel can be stored two ways:
ā = U+0101 (one precomposed character)
a + U+0304 (a, then a combining macron)Wikipedia reports that pinyin tone marks should use the Combining Diacritical Marks block (U+0304, U+0301, U+030C, U+0300), citing ISO 7098:2015. In practice, the Option-key sequences above produce the precomposed form. Both look the same on screen. A search for ā can still miss the combining version, so stay consistent inside one file.
Keeping pinyin intact in plain text
Save the file as UTF-8, or the marks may turn into question marks or boxes later. Our guides to mixed Chinese and English text files and writing Chinese in Markdown cover encoding, spacing, and fonts in more depth.
Test before you share. Paste a line with all four tones and ü into a new file, close it, reopen it, and compare.
mā má mǎ mà lǜ nǚ xīnnián kuàilèDoing this with Carets
Carets fits this job because pinyin is just text, and the file has to stay readable years from now. It is a native notes and code editor for iPhone, iPad, and Mac, so it uses the system keyboard layouts described above, including ABC - Extended. Your notes stay plain text and portable, which is what you want for a greeting list or a name glossary.
Two features help here. Markdown and plain text live in one editor, so a vocabulary list in a Markdown table sits next to a snippet that checks it. Files, projects, and tags let you keep a "Lunar New Year" folder with greetings, names, and a fallback table of tone numbers.
Download Carets on the App Store for iPhone, iPad, and Mac.
Frequently Asked Questions
How do I type ǚ on a Mac?
Add the ABC - Extended input source, then press Option-V followed by v. Apple uses this exact example for lǚxíng.
Can I write tone numbers instead of marks?
Yes. Writing tong2 for tóng is a common plain-text fallback, and the neutral tone can carry no number, 0, or 5. Marks read better, while numbers survive any keyboard.
Is the Pinyin - Simplified input method the way to get tone marks?
No. It converts pinyin codes into Chinese characters, and v stands in for ü. For tone-marked romanization, use ABC - Extended.