To convert numbered pinyin to tone marks, map tone digits 1–4 to the appropriate accent and place it on the syllable’s vowel in this order: a, then e, then o, otherwise the last vowel. Tone 5 is neutral and usually stays unmarked. For example, Ni3 hao3 ma5? becomes Nǐ hǎo ma?.
This transforms pinyin that already contains tone numbers; it does not convert Chinese characters into pinyin. Here are the implementation choices and details to define before using the conversion in an app.
As an Amazon Associate I earn from qualifying purchases.
What the conversion does
A numbered pinyin syllable ends with a tone digit. The digit determines the tone, while the vowel-placement rule determines which letter receives the mark. The focused JavaScript package pinyin-tone-convert documents this transformation and shows numbered pinyin converted to marked pinyin.
Recommended Free Tools
Keep syllable parsing separate from tone placement. Input may have spaces between syllables, as in Ni3 hao3 ma5?, or may be connected, as in Zhong1guo2ren2. A digit in arbitrary text is not necessarily a pinyin tone, so decide which input forms your function accepts rather than applying conversion indiscriminately.
#1 Best Overall
- This Keyboard Sticker is widely used for a variety of keyboards for Computers, Laptops, Notebooks, and Desktops. They are a good replacement for faded or worn letters key, giving the keyboard a different fresh new look. Converting your keyboard keys to another language is well suited for different language communication, education or language self-learning.
- Full Size: 180mmx65mm/7.1" x 2.6"(L*W); Each Units Size: 13mm x 11mm/0.5" x 0.4"(L*W); Color: Black Background with Orange White Lettering;
- The PC keyboard sticker is made of durable PVC material, with a matte texture that will provides a better touching and typing experience close to the original keyboard. Each individual keyboard key sticker is cut neatly, and is easy to apply and remove without glue left.
- Steps of installation: 1)Wipe the dust off the keyboard with a cloth; 2)Tear each keyboard sticker; 3)Paste it on the corresponding key position; 4)Press hard several times to fully fit.
- All size above is measured by manual, please allow +/-0.1 inch error.
Implement the tone-mark rule
For each valid syllable, identify its tone digit and choose the marked vowel using this priority:
- Mark a if the syllable contains it.
- Otherwise, mark e if present.
- Otherwise, mark o if present.
- If none of those vowels appears, mark the last vowel.
Apply the accent for tones 1–4. Tone 5 conventionally represents neutral tone and remains unmarked in mark notation, so ma5 becomes ma. Dragon Mapper independently documents the same vowel-placement priority: tone number and mark conversion.
Rank #2
- 【Wide Compatibility】 This Korean keyboard stickers specially designed for any laptops, notebooks, PC computers, desktops keyboards, wired keyboard, wireless keyboard, such as Logitech, Apple Macbook iMac, HP, Samsung, Acer, Microsoft Surface, Arteck, DELL, ASUS, Lenovo etc. and other keyboards.
- 【Premium Materials】 The laptop keyboard stickers are made of durable, long-lasting vinyl material with a matte texture finish. The coating is designed to be durable and will not fade even after prolonged use.
- 【Renew Worn-Out Keyboards】: These keyboard stickers can adhere firmly, clear and easy to read. They can renew faded or worn-out letters, giving your keyboard a brand-new look while saving you the expense of buying a new keyboard!
- 【Easy to Install and Remove】: This computer keyboard letter sticker is easy to install and remove, leaving no adhesive residue after removal. You can effortlessly convert your keyboard keys to another language, making it simple and quick to use.
- 【Package Included】 The Korean keyboard stickers letters set includes 2 x Korean Keyboard Stickers, 1 x Tweezer, and 1 x Microfiber Cleaning Cloth, 1 x Keyboard Cleaning Brush, a complete installation kit set for you to install the keyboard stickers quickly and easily.
A small converter can follow this sequence: parse the accepted syllable or numbered unit, validate its tone, select the target vowel, replace it with the corresponding accented character, and preserve the rest of the input. The vowel rule is compact; the parser and its behavior on malformed input are where applications need an explicit contract.
Define your input and output contract
Before writing a whole-text converter, decide how it should handle these cases:
Rank #3
- This Keyboard Sticker is widely used for a variety of keyboards for Computers, Laptops, Notebooks, and Desktops. They are a good replacement for faded or worn letters key, giving the keyboard a different fresh new look. Converting your keyboard keys to another language is well suited for different language communication, education or language self-learning.
- Full Size: 190mmx70mm/7.5" x 2.8"(L*W); Each Units Size: 13mm x 11mm/0.5" x 0.4"(L*W); Color: Transparent Background with Black Lettering;
- The PC keyboard sticker is made of durable PVC material, with a matte texture that will provides a better touching and typing experience close to the original keyboard. Each individual keyboard key sticker is cut neatly, and is easy to apply and remove without glue left.
- Steps of installation: 1)Wipe the dust off the keyboard with a cloth; 2)Tear each keyboard sticker; 3)Paste it on the corresponding key position; 4)Press hard several times to fully fit.
- All size above is measured by manual, please allow +/-0.1 inch error.
- Syllable boundaries: Are syllables separated by spaces, or may tone digits mark units in connected text?
- Accepted digits: Are only tones 1–5 valid? Decide whether invalid values should be rejected, left unchanged, or reported.
- Malformed units: Specify what happens when a digit has no valid syllable before it, or a unit has no tone digit.
- Capitalization and punctuation: Preserve capitalization and punctuation if that is part of the desired output. Test cases such as
Ni3 hao3 ma5?. - Alternative spelling: If your input uses
vforü, define whether and how it is converted. - Neutral tone: Decide whether tone 5 is required in input and whether it is removed from marked output.
- Unicode representation: Choose precomposed accented characters or combining diacritics, and verify the displayed result in the browsers and fonts your application supports.
These are separate formatting and parsing decisions, not changes to the basic vowel-priority rule. PinyinJS documents options for capitalization, punctuation, apostrophes, and grouping, illustrating the kinds of choices a reusable converter may expose: PinyinJS documentation.
Use a package or write a focused function?
Use a package for broader notation support
pinyin-tone-convert documents npm installation, CommonJS usage, conversion of connected pinyin, and the vowel-placement rule. Check its current version and compatibility in the package registry before adding it; the cited documentation does not establish how recently it was released or maintained.
Rank #4
- This Keyboard Sticker is widely used for a variety of keyboards for Computers, Laptops, Notebooks, and Desktops. They are a good replacement for faded or worn letters key, giving the keyboard a different fresh new look. Converting your keyboard keys to another language is well suited for different language communication, education or language self-learning.
- Full Size: 180mmx65mm/7.1" x 2.6"(L*W); Each Units Size: 13mm x 11mm/0.5" x 0.4"(L*W); Color: Black Background with Blue Lettering;
- The PC keyboard sticker is made of durable PVC material, with a matte texture that will provides a better touching and typing experience close to the original keyboard. Each individual keyboard key sticker is cut neatly, and is easy to apply and remove without glue left.
- Steps of installation: 1)Wipe the dust off the keyboard with a cloth; 2)Tear each keyboard sticker; 3)Paste it on the corresponding key position; 4)Press hard several times to fully fit.
- All size above is measured by manual, please allow +/-0.1 inch error.
PinyinJS offers notation helpers including applyToneMark and toneFromNotation. Its syllable utilities can work without loading a Hanzi dictionary: PinyinJS documentation. The project also describes notation formats for marks, trailing numbers, superscript numbers, and no tone, with neutral tone represented without a mark: PinyinJS notation documentation.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Write your own for a tightly controlled input
A custom function is appropriate when you control the input grammar—for example, a known set of space-separated syllables—and can define validation and formatting behavior yourself. Keep parsing, tone validation, vowel selection, and output formatting as distinct steps. This makes it easier to test edge cases without implying that one parser handles every possible pinyin string.
Best Value
- This is made from of Eco-environment PVC Printing .
- for Adhesive without harmful
- Apply for different lapotop and model
- The sticker is , so keys color is your keyboard color when you sticker. but the is colored like discreption.
- Easy to use, you do not have to think apply the stickers.
Numbered pinyin is not Hanzi-to-pinyin conversion
A tone-marking function needs pinyin with tone numbers as input. It does not determine the pronunciation of Chinese characters. PinyinJS documents Hanzi conversion separately and notes that readings can depend on word context, which requires lexical data and word-level decisions: PinyinJS documentation.
Check Unicode output in your application
Tone marks can be represented using precomposed accented letters or combining diacritical marks. Pinyin.info discusses historical browser rendering issues and a mixed representation approach, but its browser discussion is not evidence of current compatibility: Pinyin.info on diacritical marks. For a modern web application, verify the chosen output with the browsers and fonts you support; a current compatibility matrix is not established by that historical source.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →




