How to use the accent and diacritic remover
- Paste the text. It can have several lines, and spaces, capital letters and punctuation are kept.
- Leave the box about letters such as ß, ø, æ and ł ticked to replace them with plain letters, or untick it to leave them alone.
- Open the advanced options to add your own replacements, one per line as the character, an equals sign and the replacement, such as ü=ue. They take priority over the built-in table.
- Read the result line by line, and the table of which characters changed and how many times. Copy result gives the count and then the plain text.
Formula
split each character into a base letter and combining marks (Unicode normalization form D)
drop the combining marks
put the rest back together (form C)
letters with no decomposition, such as ß ø æ ł, use the replacement table
The recomposition step keeps scripts such as Korean intact, since their syllables split into parts that are not marks and would otherwise come out broken.
Four lines of accented text
The line "Crème brûlée à la façon de São Paulo" becomes "Creme brulee a la facon de Sao Paulo". The line "Smørrebrød, Łódź and Århus" becomes "Smorrebrod, Lodz and Arhus" because ø and Ł are not accented letters but separate letters, which the replacement table maps to o and L.
With the table on, "Straße" becomes "Strasse", "Þórsmörk" becomes "THorsmork" and "Ærø" becomes "AEro". With the table off, ß, Þ, æ and ø stay as they are, and only the accents on letters such as é and ö are removed.
How the marks are removed
Unicode can write a letter with an accent either as one character or as the plain letter followed by a combining mark. Normalization form D turns the first style into the second, so removing every combining mark removes every accent in one rule. The result is checked to be stable: running the page again on its own output changes nothing.
Some letters are not an accented form of another letter, so they have no mark to remove. These include ß, ø, æ, œ, ł, đ, ð and þ, and the page uses a small table for them. Cyrillic and Greek letters with marks are treated the same way as Latin ones, so й becomes и and ά becomes α.
When not to remove accents
Removing accents can change meaning in some languages and can make names no longer match their spelling in other records, so use it for search keys, file names and similar jobs rather than for text people will read. To make a web address from text, use the Slug Generator. To see how normalization forms differ, use the Unicode Normalization Comparer, and to repair text with garbled accents, the Text Encoding Fixer.
Assumptions and limits
- Normalization is done by the browser's own Unicode support, so it follows the version of Unicode the browser has.
- The replacement table covers ß, ẞ, æ, Æ, œ, Œ, ø, Ø, đ, Đ, ð, Ð, þ, Þ, ł, Ł, ħ, Ħ, ı, ŧ and Ŧ.
- Your own replacements must be one character, an equals sign and the replacement, and they replace the character everywhere.
- The text is limited to 200,000 characters.
- The text stays in this browser.
Frequently asked questions
Why does ø become o but Ø become O?
The table keeps the case of the letter. A capital letter maps to a capital replacement, so Ø becomes O, Þ becomes TH and Æ becomes AE.
Does it change characters that are not letters?
No. Digits, punctuation, spaces and symbols are left alone unless a combining mark is attached to them, in which case only the mark goes.
Will it handle accents written as separate marks?
Yes. Text where an accent follows its letter as a separate combining mark is cleaned the same way as text with single accented characters.
Why did й turn into и?
In Unicode the Cyrillic letter й is the letter и with a mark above it, so removing marks removes that mark. If that is not what you want, add a replacement of your own, though it will replace the letter everywhere.