How to Type ñ (N with tilde) on HTML
Need ñ on HTML for a name, an address or a word in another language? You do not have to copy it from a website every time. The fastest method is ñ, and there are a few backups below for when that one is not available.
ñ on HTML: ñ
Ñ on HTML: Ñ
Or copy it:
Method 1: Codes for web pages
| Format | Code for ñ |
|---|---|
| Named entity | ñ |
| Decimal entity | ñ |
| Hex entity | ñ |
| CSS content | content: "\00F1"; |
| JavaScript | "\u00F1" |
| URL encoded | %C3%B1 |
| UTF-8 bytes | C3 B1 |
Method 2: Type it directly with UTF-8
If your page starts with <meta charset="utf-8"> and the file is saved as UTF-8, you can paste ñ straight into the HTML. Entities are only needed when your editor or database cannot store the character.
Method 3: Watch for normalization
ñ can also be written as n plus a combining mark. Both look the same but compare as different strings. In JavaScript, call str.normalize("NFC") before comparing or searching.
How to type the capital Ñ
The uppercase form works the same way with Shift added where a letter is typed.
Codes for web pages
| Format | Code for Ñ |
|---|---|
| Named entity | Ñ |
| Decimal entity | Ñ |
| Hex entity | Ñ |
| CSS content | content: "\00D1"; |
| JavaScript | "\u00D1" |
| URL encoded | %C3%91 |
| UTF-8 bytes | C3 91 |
Type it directly with UTF-8
If your page starts with <meta charset="utf-8"> and the file is saved as UTF-8, you can paste Ñ straight into the HTML. Entities are only needed when your editor or database cannot store the character.
About the letter ñ
ñ is Unicode U+00F1, named LATIN SMALL LETTER N WITH TILDE. It is used in Spanish. A wavy line above a letter. Spanish uses it for ñ, Portuguese for nasal vowels (ã, õ), Estonian for õ, and Vietnamese for the broken rising tone. See the ñ character page for every code and shortcut.
Troubleshooting
- If you see à and other symbols, the file is UTF-8 but the browser reads it as Windows-1252. Add the meta charset tag.
- Named entities are case sensitive: É and é are different letters.
- In XML and XHTML only five named entities exist, so use numeric codes there.
Frequently asked questions
What is the shortcut for ñ on HTML?
ñ.
Can I just copy and paste ñ?
Yes. Click the copy button above, then paste with Ctrl+V on Windows and Chromebook, Cmd+V on a Mac, or touch and hold and choose Paste on a phone.
What is the Unicode code for ñ?
U+00F1. In HTML it is ñ.
Related guides
- How to Type ñ (N with tilde) on Windows
- How to Type ñ (N with tilde) on Mac
- How to Type ñ (N with tilde) on iPhone
- How to Type ñ (N with tilde) on Android
- How to Type ñ (N with tilde) on Microsoft Word
- How to Type ñ (N with tilde) on Google Docs
- How to Type ð (Eth) on HTML
- How to Type ß (Sharp s (eszett)) on HTML
- How to Type þ (Thorn) on HTML
- How to Type ÿ (Y with umlaut) on HTML