The Accent Letters

How to Type ñ (N with tilde) on LaTeX

Published July 27, 2026, 2 min read

ñ is n with tilde, a letter used in Spanish. On LaTeX, the quickest way to get it is \~{n}. This guide covers every method that works, including the capital Ñ and fixes for common problems.

ñ on LaTeX: \~{n}

Ñ on LaTeX: \~{N}

Or copy it:

Method 1: LaTeX command

Write \~{n} in text mode. Load \usepackage[T1]{fontenc} for correct hyphenation and copy-paste from the PDF.

Method 2: Type the character directly

Since 2018 pdfLaTeX reads UTF-8 by default, so you can paste ñ into your source. On Overleaf, set the compiler in Menu → Compiler.

Method 3: In math mode

For a variable with this accent, use $\tilde{n}$. Math accents are for symbols, so use the text command for words.

How to type the capital Ñ

The uppercase form works the same way with Shift added where a letter is typed.

LaTeX command

Write \~{N} in text mode. Load \usepackage[T1]{fontenc} for correct hyphenation and copy-paste from the PDF.

Type the character directly

Since 2018 pdfLaTeX reads UTF-8 by default, so you can paste Ñ into your source. On Overleaf, set the compiler in Menu → Compiler.

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

Frequently asked questions

What is the shortcut for ñ on LaTeX?

\~{n}.

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

All accent shortcuts for LaTeX