Remove accents and normalize text

Remove accents and diacritics from text (é becomes e, ç becomes c, ß becomes ss), keep the letters you choose, or normalize Unicode to NFC, NFD, NFKC

loading Remove accents and normalize text
About this tool

What does it mean to remove accents?

Removing accents (also called stripping diacritics or "accent folding") turns letters such as é, ç, ñ and ü into their plain base letters e, c, n and u. People do it to build URLs and file names, to search text without caring about accents, to sort names, to clean data before importing it into a system that only accepts ASCII, and to compare strings that were typed with and without accents.

This tool removes accents from any text you paste and also normalizes Unicode. Its default mode works the way Unicode defines: it splits each letter into the base letter plus a separate accent mark (the NFD form), drops the marks, and joins the rest again (NFC). Some letters have no accent to remove but still are not ASCII: ß, æ, œ, ø, đ, ł. An option spells them with plain letters (ß becomes ss, æ becomes ae, ø becomes o, ł becomes l). You can also list characters to keep exactly as they are, for example ñ, to strip everything else.

Besides removing accents, the tool can normalize to NFC, NFD, NFKC or NFKD and shows the code points before and after, so you can see why two strings that look identical are different. Everything runs in your browser and your text is never sent anywhere.

How to remove accents from text

  1. Paste or type the text. An example with accents is loaded when the page opens.
  2. Choose "Remove accents". Keep the transliteration option on if the text can contain ß, æ, ø, ł and similar letters.
  3. If some letters must stay (for example ç in a Portuguese word you want to keep), type them in "Characters to keep as they are".
  4. Read the result and the counter of how many letters changed. If nothing changed, the tool says the text has no accents.
  5. Copy the result. To see the invisible difference, look at the line of code points.
  6. To normalize instead of stripping, choose NFC, NFD, NFKC or NFKD. NFC is the usual form to store and compare text; NFKC also replaces compatibility characters (fi becomes fi, ² becomes 2, full-width letters become normal).

Examples

Portuguese: São Paulo, ação, coração

The result is Sao Paulo, acao, coracao, with 5 letters changed (the ã of São, the ç and ã of ação, the ç and ã of coração).

French: Crème brûlée à la façon

The result is Creme brulee a la facon, 5 letters changed.

German and Nordic: Straße Æsir Øre Łódź

With transliteration on, the result is Strasse AEsir Ore Lodz (6 letters changed). With it off, only the accents go: Straße Æsir Øre Łodz, because ß, Æ, Ø and Ł have no combining accent to remove.

Keeping a letter

With "keep" set to ñ, the text ação cañón becomes acao cañon: the ã and ó lose their accents, but ñ is untouched.

Why é is not always é

The letter é can be one code point (U+00E9, NFC) or two (U+0065 followed by U+0301, NFD). They look identical but 'é'.normalize('NFD') === 'é' is false in JavaScript. Normalizing both to NFC makes them compare equal. Use the Unicode text tool to inspect code points.

Common mistakes

  • Removing accents from text that has to keep its meaning. In Portuguese, "pais" and "países", or "são" and "sao", are different words, and in Spanish "él" and "el" differ. Strip accents for search keys and slugs, not for the text people read.
  • Assuming ß or ø are accented letters. They are separate letters with no decomposition, so you need transliteration (ß becomes ss).
  • Comparing strings without normalizing. The same word in NFC and NFD does not match byte by byte.
  • Using the wrong form. NFKC and NFKD change the meaning of some characters (² becomes 2), so do not use them for text you must preserve.
  • Stripping accents for non-Latin scripts. Marks in Vietnamese stack (ệ becomes e), but removing marks in Arabic or Hindi can change words. This tool targets Latin text.
  • Forgetting invisible characters. A string that still fails to match may contain a zero-width space; check with the invisible character finder.

FAQ

How do I remove accents from a word in JavaScript or Excel?

In JavaScript, normalize to NFD and remove the combining marks (see the code below). In a spreadsheet, there is no built-in function for it; paste the column here and copy the result back.

Does it remove the cedilla (ç) and the tilde (ã, ñ)?

Yes. They are combining marks in Unicode, so ç becomes c, ã becomes a and ñ becomes n, unless you list them in the characters to keep.

What is the difference between NFC and NFD?

NFC joins a letter and its accent into one character (é). NFD splits them into two (e and a combining acute accent). They are canonically equivalent, so they should be treated as the same text.

How do I make a URL slug without accents?

Strip the accents, lowercase, and replace spaces with hyphens. The slug generator does all of that in one step, and the case converter handles upper and lower case.

Is my text uploaded?

No. The conversion runs in your browser.

Remove accents in code

JavaScript

const strip = s => s.normalize('NFD').replace(/[̀-ͯ]/g, '');
console.log(strip('São Paulo, ação')); // Sao Paulo, acao

Python

import unicodedata
def strip(s):
    return ''.join(c for c in unicodedata.normalize('NFD', s) if not unicodedata.combining(c))
print(strip('Crème brûlée'))  # Creme brulee

Bash

echo 'São Paulo' | iconv -f UTF-8 -t ASCII//TRANSLIT   # Sao Paulo (GNU iconv)
Report a problem