N with Tilde Unicode Code Point

The Unicode code points for ñ (U+00F1) and Ñ (U+00D1), their combining-tilde alternative, encodings and escapes, and how copying, reversing or restyling affects the letter.

Quick answer: the code points for ñ and Ñ

The lowercase letter ñ is U+00F1, named LATIN SMALL LETTER N WITH TILDE. The uppercase Ñ is U+00D1, LATIN CAPITAL LETTER N WITH TILDE. Both sit in the Latin-1 Supplement block, which follows ISO-8859-1, so their code point values match the old Latin-1 byte values 0xF1 and 0xD1. The same visible letter can also be stored as two code points: a plain n (U+006E) or N (U+004E) followed by U+0303 COMBINING TILDE. Most identification problems with this letter come from that second form.

Character | Code point | Unicode name | Decimal | General category
ñ | U+00F1 | LATIN SMALL LETTER N WITH TILDE | 241 | Ll (lowercase letter)
Ñ | U+00D1 | LATIN CAPITAL LETTER N WITH TILDE | 209 | Lu (uppercase letter)
(combining) | U+0303 | COMBINING TILDE | 771 | Mn (nonspacing mark)

Precomposed versus decomposed: what is actually stored

Unicode treats U+00F1 and the sequence U+006E U+0303 as canonically equivalent: they are meant to look and behave as the same letter. They are still different stored data. The precomposed form is one code point; the decomposed form is two. Normalization converts between them: NFC composes n plus combining tilde into U+00F1, and NFD splits U+00F1 back into n plus U+0303. On screen the two usually look identical, so a visual check cannot tell you which one you have. String length, byte length, exact-match comparisons and some search indexes can all see the difference.

import unicodedata

precomposed = "\u00f1"     # ñ as one code point
decomposed  = "n\u0303"    # n + COMBINING TILDE

print(precomposed == decomposed)                                # False
print(len(precomposed), len(decomposed))                        # 1 2
print(unicodedata.normalize("NFC", decomposed) == precomposed)  # True
print(unicodedata.name(precomposed))                            # LATIN SMALL LETTER N WITH TILDE

To identify the form in a given string, paste it into a code point inspector or print the code points programmatically. One entry (U+00F1 or U+00D1) means precomposed; two entries ending in U+0303 mean decomposed. Decomposed text often comes from systems that store or emit NFD, such as file names on older macOS HFS+ volumes, or from input methods and libraries that build accented letters from a base letter and a mark.

Encodings and escape sequences

Format | ñ | Ñ
UTF-8 bytes | C3 B1 | C3 91
UTF-16 code unit | 00F1 | 00D1
ISO-8859-1 / Windows-1252 byte | F1 | D1
HTML named entity | ñ | Ñ
HTML numeric reference | ñ or ñ | Ñ or Ñ
CSS escape | \F1 or \0000F1 | \D1 or \0000D1
JavaScript / JSON escape | \u00F1 | \u00D1
Python escape | \u00f1 or \N{LATIN SMALL LETTER N WITH TILDE} | \u00d1 or \N{LATIN CAPITAL LETTER N WITH TILDE}

The decomposed form has a different byte signature. In UTF-8, the combining tilde is CC 83, so a decomposed ñ is three bytes instead of two:

ñ precomposed:  C3 B1        (U+00F1)
ñ decomposed:   6E CC 83     (U+006E U+0303)
Ñ precomposed:  C3 91        (U+00D1)
Ñ decomposed:   4E CC 83     (U+004E U+0303)

Common ways to type the precomposed letter: on Windows with a numeric keypad, Alt+0241 for ñ and Alt+0209 for Ñ. On macOS, press Option+N and then n, or Shift+N for Ñ. On many Linux desktops using GTK or IBus input, Ctrl+Shift+U followed by f1 or d1 enters the code point, and a configured Compose key with tilde and n also works. Spanish and other keyboard layouts that use the letter usually have a dedicated key.

Recognizing encoding damage

If ñ shows up as "ñ", UTF-8 bytes (C3 B1) were decoded as Latin-1 or Windows-1252. Under Windows-1252 the uppercase Ñ appears as "Ñ". The reverse mistake, a Latin-1 byte F1 read as UTF-8, is not a valid UTF-8 sequence and typically appears as the replacement character � or a question mark. Neither failure changes the underlying letter's code point; it means a system along the way used the wrong encoding. The fix is to correct the declared or assumed encoding, not to retype the character.

What "reverse", "mirror" and "font" tools do to ñ

Reversal reorders stored characters. With precomposed text this is safe for ñ, because the letter is a single code point. With decomposed text, reversing by code point separates the tilde from its n and attaches it to whatever letter now precedes it. Using the Spanish word año as an example:

Precomposed input:    U+0061 U+00F1 U+006F           "año"
Reversed by code point: U+006F U+00F1 U+0061         "oña"   (correct)

Decomposed input:     U+0061 U+006E U+0303 U+006F    "año"
Reversed by code point: U+006F U+0303 U+006E U+0061  "õna"   (tilde moved onto the o)

A reliable reverser works on grapheme clusters, the user-perceived characters, rather than individual code points. Normalizing to NFC before reversing also fixes ñ specifically, because a precomposed form exists, but that does not cover every base-plus-mark combination, so grapheme-aware reversal is the more general safeguard.

Styled "font" generators do not change fonts; they substitute different code points, usually from the Mathematical Alphanumeric Symbols block. That block has no precomposed styled ñ. Generators therefore either leave ñ as plain U+00F1 in the middle of styled text, or output a styled n followed by U+0303. In the second case, where the tilde lands depends on the destination font, and the result is no longer the letter ñ as far as search, spell-checking or text comparison are concerned. Mirror and upside-down generators face the same gap: Unicode has no dedicated mirrored or flipped ñ, so any output is an approximation built from substitute letters and combining marks.

Presentation-only changes are different. CSS text-transform: uppercase displays ñ as Ñ without changing the stored text, and a font change alters appearance only. What a reader gets when copying such text can vary by browser and application, so do not rely on display styling to change stored case.

Will it stay readable and usable after copying or sharing?

  • Copy and paste: precomposed U+00F1 in UTF-8 is the most widely supported form. Decomposed text usually survives copying, but the destination may display it with a misplaced or detached tilde if the font or renderer handles combining marks poorly.
  • Matching and search: an exact search for the precomposed form may miss decomposed text unless the system normalizes. Some tools offer accent-insensitive matching that treats ñ as n; that can help find results but erases a distinction Spanish readers consider meaningful.
  • Meaning: dropping the tilde changes words, for example año (year) versus ano, or peña versus pena. Automatic slug or file-name transliteration that converts ñ to n carries the same risk.
  • Sorting: plain code point order puts ñ after z, while Spanish collation places it directly after n. Use locale-aware collation when order matters.
  • Assistive technology: a screen reader's pronunciation of ñ generally depends on the language set for the content and on the voice in use. Marking the content language helps. Styled substitutes from font generators may be announced as mathematical symbols, spelled out, or skipped, depending on the screen reader.
  • Styled and flipped versions: these copy as their substitute code points, not as ñ, so the recipient cannot reliably search, edit or spell-check them.

Evidence gap: no destination-specific tests or documentation for particular apps, platforms or screen readers were supplied for this article. The compatibility points above describe how Unicode, encodings and normalization are specified to behave, not verified results in any named product. If a particular destination matters, test the exact string there, including copying it back out and running a search for it.

Recommendation

For text people will read, search, sort or copy, store ñ and Ñ as the precomposed code points U+00F1 and U+00D1, encode in UTF-8, and normalize input to NFC where data enters your system. This gives the broadest compatibility and avoids surprises with reversal, length checks and exact matching. Decomposed text is acceptable when every step of your pipeline normalizes, but it is the decisive risk factor for broken reversal and missed matches.

Treat styled, mirrored or flipped versions of the letter as decoration only. Plain text is preferable whenever the content carries meaning that must survive: personal names, place names, identifiers, form input, anything that needs to be searchable, and anything a screen reader user must understand. If you do publish a decorative version, provide the plain-text equivalent alongside it.