Design & Download
Your JS Library
in Seconds!!!

Snippet: deburr() - Remove Diacritics from Characters

Written by Christopher West (cwest) on August 07, 2016.
Remove the most common diacritics from the characters in a string.
var deburr;
  function replaceDeburrChar() {
    return ARR_DEBURR[slice(arguments, 1).join(' ').search(RGX_NON_SPACE, '')];
  deburr = function(str) {
    return str.replace(RGX_DEBURR, replaceDeburrChar);

deburr(...) API Documentation


Converts supplementary latin letters into basic latin letters, removing the diacritical marks.


  1. str {string}:
    The string to be modified and returned without supplementary latin letters.


Returns a copy of str but with all of the following characters replaced by their corresponding basic latin letters:
  • À, Á, Â, Ã, Ä, Å, Ā convert to A
  • à, á, â, ã, ä, å, ā convert to a
  • Ç, Ć, Č convert to C
  • ç, ć, č convert to c
  • Ð, Đ convert to D
  • ð, đ convert to d
  • È, É, Ê, Ë, Ē, Ė, Ę convert to E
  • è, é, ê, ë, ē, ė, ę convert to e
  • Ì, Í, Î, Ï, Ī, Į convert to I
  • ì, í, î, ï, ī, į convert to i
  • Ñ, Ń convert to N
  • ñ, ń convert to n
  • Ò, Ó, Ô, Õ, Ö, Ø, Ō convert to O
  • ò, ó, ô, õ, ö, ø, ō convert to o
  • Ù, Ú, Û, Ü, Ū convert to U
  • ù, ú, û, ü, ū convert to u
  • Ý, Ÿ convert to Y
  • ý, ÿ convert to y
  • Æ converts to Ae
  • æ converts to ae
  • Þ converts to Th
  • þ converts to th
  • ß converts to ss
  • Œ converts to Oe
  • œ converts to oe
  • Ł converts to L
  • ł converts to l