---
title: "Remove bookmarks in PDFs using JavaScript | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/web/bookmarks/remove/"
md_url: "https://www.nutrient.io/guides/web/bookmarks/remove.md"
last_updated: "2026-06-09T10:38:40.957Z"
description: "Learn to delete bookmarks in PDFs using JavaScript with Nutrient Web SDK. Retrieve bookmarks and remove the first one efficiently using simple code."
---

# Remove bookmarks in PDFs using JavaScript

With Nutrient Web SDK, you can delete bookmarks using the [`instance.delete`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#delete) method. The example below shows how to first retrieve bookmarks from a document using the [`instance.getBookmarks`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#getBookmarks) method, and then delete the first bookmark:

```js

async function deleteFirstBookmark() {
  const bookmarks = await instance.getBookmarks();
  const firstBookmark = bookmarks.get(0);

  if (firstBookmark) {
    await instance.delete(firstBookmark.id);
  }
}

```
---

> Part of [JavaScript PDF bookmark library](/guides/web/bookmarks.md)

## Related pages

- [PDF bookmarks in our JavaScript PDF viewer](/guides/web/bookmarks/built-in-ui.md)
- [Create bookmarks in PDF using JavaScript](/guides/web/features/bookmarks.md)
- [Detect changes in PDF bookmarks](/guides/web/bookmarks/detect-changes.md)
- [Edit bookmarks in PDFs using JavaScript](/guides/web/bookmarks/edit.md)

