Lodash _.deburr() Method

Beginner
⏱️ 7 min read
📚 Updated: Jul 2026
🎯 6 Examples + 3 Try It
String utilities

What You’ll Learn

By the end of this tutorial, you’ll remove accents and diacritical marks from strings using Lodash’s _.deburr() for cleaner search and comparison.

01

Core Syntax

Call _.deburr(string) on any Unicode text.

02

Accent Removal

Converts accented letters to basic Latin equivalents.

03

Search Matching

Match café when users type cafe.

04

Array Mapping

Pass _.deburr directly to .map().

05

vs normalize

Know when native normalize('NFD') is enough.

06

Production Tips

Deburr for search keys, not for displaying proper names.

What Is _.deburr()?

_.deburr() removes combining diacritical marks from a string, converting accented characters like é into their base Latin forms like e. It is ideal for normalization before search, sort, or equality checks—not for erasing locale-specific spelling that users expect to see on screen.

💡
Beginner tip

Think of _.deburr('résuḿé') as “make this text ASCII-friendly for matching,” not “fix spelling for display.”

International apps use deburr on search indexes, slug generation, and fuzzy matching so users are not punished for omitting accents on their keyboard.

📝 Syntax

Pass the string containing accented or decorated characters:

javascript
_.deburr(string)

Syntax Rules

  • string — the input text with possible diacritics.
  • Return value — a new string with combining marks stripped.
  • Latin focus — works on common Latin accented characters; not a full transliteration system.
  • Non-mutating — the original string is unchanged.
  • Composable — chain with _.toLower for case-insensitive search keys.
javascript
import deburr from "lodash/deburr";

const accented = "résuḿé";
const plain = deburr(accented);
// -> "resume"

⚡ Quick Reference

TaskCode patternResult
Basic deburr_.deburr('café')cafe
Compare equal_.deburr('café') === _.deburr('cafe')true
Map arrayitems.map(_.deburr)Normalized list
Search key_.deburr(q.toLowerCase())Accent-insensitive query
Native alts.normalize('NFD').replace(/\p{M}/gu,'')Similar idea in ES2018+
HTML safety_.escape(str)Different job—entity escaping
Mutates?
No

Returns a new string

Purpose
Normalize

Strip diacritics

Pair with
_.toLower()

Search indexes

Not for
Display names

Keep accents for users

🧰 Parameters

Arguments to _.deburr() and what they control:

string Required

The input string that may contain accented or decorated Latin characters.

_.deburr('naïve')
return value New string

A deburred copy with combining diacritical marks removed.

// -> 'naive'
composition Unicode

Lodash decomposes characters and strips mark code points.

_.deburr('résumé')
limits Important

Not a substitute for full transliteration of non-Latin scripts.

// Cyrillic unchanged

For display-quality localization, preserve original characters and deburr only internal search/sort keys.

Examples Gallery

Practical _.deburr() patterns with copy-ready code, sample output, and interactive Try It Yourself labs.

📚 Getting Started

Strip diacritics from accented strings.

Example 1 — Deburr a résumé heading

Convert an accented word to its plain Latin form.

javascript
import deburr from "lodash/deburr";

const accented = "résuḿé";
const plain = deburr(accented);

console.log(plain);
// -> "resume"
Try It Yourself

How It Works

Lodash decomposes Unicode characters and removes combining mark code points.

Example 2 — Accent-insensitive equality

Treat café and cafe as equal after deburring.

javascript
import deburr from "lodash/deburr";

const a = "café";
const b = "cafe";

console.log(deburr(a) === deburr(b));
// -> true
Try It Yourself

How It Works

Compare deburred forms instead of raw strings when accents should not break matches.

Example 4 — Map deburr over an array

Batch-normalize tags or names from an import file.

javascript
import deburr from "lodash/deburr";

const tags = ["naïve", "résumé", "Zürich"];
const normalized = tags.map(deburr);
// -> ["naive", "resume", "Zurich"]

How It Works

Because deburr is a plain function, you can pass it directly to .map() without wrapping in an arrow function.

Example 5 — Build a slug-friendly key

Combine deburr with lowercase for URL-safe tokens.

javascript
import deburr from "lodash/deburr";
import toLower from "lodash/toLower";

const title = "Café & Crêpes";
const key = toLower(deburr(title)).replace(/\s+/g, "-");
// -> "cafe-&-crepes"  (pair with kebabCase for cleaner slugs)

How It Works

Deburr removes accents first; lowercase and hyphen replacement build a simple slug. For production URLs, follow with _.kebabCase().

🚀 Beyond the Basics

Native alternatives and display vs search keys.

Example 6 — Native normalize alternative

Modern JavaScript can strip marks with normalize and a regex.

javascript
import deburr from "lodash/deburr";

const input = "jalapeño";

// Lodash
console.log(deburr(input)); // -> "jalapeno"

// Native (ES2018+)
const native = input.normalize("NFD").replace(/\p{M}/gu, "");
console.log(native); // -> "jalapeno"

How It Works

Lodash deburr wraps similar Unicode logic with a consistent API across your app.

🧠 How _.deburr() Works

1

Receive input string

Lodash reads the string argument.

Input
2

Decompose characters

Accented letters are split into base char + combining marks.

Unicode
3

Strip mark code points

Diacritical combining characters are removed.

Filter
4

Recompose result

Base characters are joined into a plain Latin string.

Output
=

Deburred string returned

A normalized copy ready for search indexes, slugs, or equality checks.

📝 Notes

  • _.deburr() is for matching and indexing, not for replacing proper localized display.
  • Pair with _.toLower() for case- and accent-insensitive search.
  • It focuses on Latin accented characters; full transliteration needs dedicated libraries.
  • The original string is never mutated.
  • You can pass _.deburr directly to Array.prototype.map.
  • Import lodash/deburr to keep bundles lean.

Conclusion

_.deburr() makes international text easier to search and compare by stripping decorative marks while keeping recognizable Latin letters. Use it on queries and indexes, not on user-visible names unless you have a deliberate reason.

Next, learn suffix checking with _.endsWith() for file types, URL paths, and filtered lists.

💡 Best Practices

✅ Do

  • Deburr search queries and index keys
  • Combine with toLower for insensitive matching
  • Use .map(deburr) on imported label arrays
  • Keep original strings for display
  • Import lodash/deburr only

❌ Don’t

  • Strip accents from user names shown in UI
  • Assume deburr handles all non-Latin scripts
  • Use deburr as a security sanitizer alone
  • Forget locale rules for proper sorting
  • Confuse deburr with HTML escaping

Key Takeaways

Knowledge Unlocked

Five things to remember about _.deburr()

Use these points when normalizing Unicode text for search and comparison.

5
Core concepts
🌐 02

Unicode

Strips combining marks.

Parse
📦 03

Indexes

Normalize keys, not display.

Pattern
🔄 04

map()

Pass deburr to .map.

API
📝 05

endsWith

Next: suffix checks.

Next step

❓ Frequently Asked Questions

_.deburr() removes combining diacritical marks from a string, converting accented Latin characters to their basic forms.
Usually no. Preserve accented spelling in UI. Deburr internal search keys and comparison values instead.
No. Only diacritics are removed. Pair with _.toLower() when you need case-insensitive matching.
No. It targets Latin diacritics. Use dedicated transliteration libraries for other scripts.
_.escape() converts HTML special characters to entities. _.deburr() strips Unicode accent marks.
Yes. items.map(_.deburr) is a common pattern for batch normalization.
Did you know?

Lodash _.deburr() is often paired with _.toLower() in search bars so Café matches cafe. For HTML safety, use _.escape()—deburr only strips accent marks, not tags.

Practice _.deburr() in the Live Editor

Open the Try It editor, run the examples, and experiment with your own strings.

Open Try It editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

6 people found this page helpful