Pinyin to HTML
Transcribe your text pinyin into HTML with tones.
Why tone marks break on the web, and what this fixes
Tone marks are ordinary Unicode characters, and on a correctly configured page they need nothing special. The trouble starts everywhere else: a form that mangles accented input, a database column in a legacy encoding, a template that escapes what it should not, an email client from another decade. The symptom is always the same, an accented vowel arriving as a question mark or as a pair of stray letters.
HTML entities are the way round it. Writing an accented letter as its numeric reference keeps the file pure ASCII, so nothing in the chain can corrupt it, and every browser renders it identically. It is verbose and unreadable in the source, which is why nobody writes it by hand.
That is all this tool does: you type pinyin, it returns the same text as entities you can paste straight into a page, a template or a message. If your site is UTF-8 from end to end you do not need this. If something between you and the reader is not, this is the reliable way through.