Yen sign (¥) in HTML
The yen sign is the currency symbol for the Japanese yen and, in Latin script contexts, for the Chinese yuan as well. Its named reference is ¥ and its code point is U+00A5.
At a glance
- Character
- ¥
- Named entity
- ¥
- Decimal reference
- ¥
- Hex reference
- ¥
- Unicode code point
- U+00A5
- Unicode name
- YEN SIGN
- In the entity reference
- Currency
In detail
One symbol, two currencies. The same character is used for the Japanese yen and for the Chinese yuan when written in Latin script, which means a price marked with it is genuinely ambiguous without a country or a currency code beside it. For anything commercial the three letter codes JPY and CNY do the disambiguating work that the symbol cannot.
Fonts draw it with either one crossbar or two, and both are the same code point. That is a typeface decision rather than a distinction between currencies, so a design that specifies a two bar yen is asking for a font, not for a different character. Do not go looking for a separate code point to get the other look.
Yen amounts are conventionally whole numbers. The subunit was withdrawn from circulation long ago, so a price rendered with two decimal places looks wrong to a Japanese reader in the way a price in pounds with four decimal places would look wrong in Britain. An internationalisation formatter given the JPY currency code handles this correctly on its own.
The character has an odd history on Japanese systems. In the Shift-JIS encoding the byte that ASCII uses for the backslash was drawn as a yen sign, which is why older Japanese Windows machines show file paths separated by yen signs. The separator is still the backslash byte; only the glyph differs, so a path copied from such a display works despite looking wrong.
Examples
new Intl.NumberFormat("ja-JP", { style: "currency", currency: "JPY" }).format(1980);
// "\uFFE51,980" using the full width form, with no decimals
new Intl.NumberFormat("en-US", { style: "currency", currency: "JPY" }).format(1980);
// "\u00A51,980"<p>¥1,980 <abbr title="Japanese yen">JPY</abbr></p>
<p>¥98 <abbr title="Chinese yuan renminbi">CNY</abbr></p>Things that catch people out
- A yen amount with two decimal places is not just unusual, it suggests the value came from a system that treated it like a dollar amount and may have divided by a hundred somewhere.
- There is a separate full width yen sign at U+FFE5 used in East Asian typography. It is a different code point with a different advance width, and mixing the two in a column breaks the alignment.
- The symbol alone does not say which currency. Pair it with a code anywhere money changes hands.
Try it: HTML Entity Reference
Search 152 entities across 9 categories, switch the copy format between the character, the name, the decimal form and the hex form, and copy in one click.
HTML Entity Reference
LOCAL · Browser-OnlySearchable reference of 150+ HTML entities with one-click copy in any format
152 entities across 9 categories
Commonly Used
→Arrows(13)
±Math(35)
$Currency(8)
…Punctuation(21)
©Symbols(24)
πGreek(30)
½Fractions(6)
●Geometric(7)
æLatin Special(8)
Click any entity card to copy it in your chosen format. All data is embedded in the page and works offline.
Related HTML entities
All html entities →Euro sign (€) in HTML
The euro sign at U+20AC, why it fell outside Latin-1, which side of the amount it belongs on in each language, and how to format currency properly.
Pound sign (£) in HTML
The pound sign at U+00A3, its entity forms, why the name is ambiguous between sterling and the hash key, and the encoding bug that doubles the character.
Cent sign (¢) in HTML
The cent sign at U+00A2, its entity forms, why it follows the amount instead of preceding it, and why it has all but disappeared from modern pricing.
Indian rupee sign (U+20B9) in HTML
The Indian rupee sign at U+20B9, why it has only numeric references, how it differs from the generic rupee sign, and the digit grouping it belongs with.
Degree sign (°) in HTML
The degree sign at U+00B0, its entity forms, the spacing rule that differs between temperatures and angles, and the three characters it gets confused with.
Plus minus sign (±) in HTML
The plus minus sign at U+00B1, its entity forms, how it reads in a tolerance versus a measurement uncertainty, and the minus plus character that reverses it.
Tools for this
- HTML Entity Reference Free online HTML entity reference - search and copy HTML entities with live preview
- HTML Entity Encoder Free online HTML entity encoder - encode or decode HTML entities to prevent XSS and display issues