Chrome 북마크를 JSON으로 내보내는 방법 — 그리고 이를 위해 원클릭 확장 프로그램을 만든 이유
발행: (2026년 2월 5일 오전 04:20 GMT+9)
2 min read
원문: Dev.to
Source: Dev.to
What it does
- 팝업도 없고, 설정도 없으며, 계정도 필요 없습니다.
- 오프라인에서도 작동합니다.
- 전체 확장 프로그램 크기는 약 5 KB에 불과합니다.
Permissions
bookmarks— 북마크 트리를 읽기 위해 사용됩니다.
The code
chrome.action.onClicked.addListener(exportBookmarks);
async function exportBookmarks() {
const bookmarks = await chrome.bookmarks.getTree();
const blob = new Blob([JSON.stringify(bookmarks, null, 2)], { type: 'application/json' });
const url = URL.createObjectURL(blob);
chrome.downloads.download({
url,
filename: 'bookmarks.json',
saveAs: true
});
}
이 확장 프로그램은 Manifest V3와 chrome.bookmarks API를 사용해 트리를 가져오고, chrome.downloads를 이용해 파일을 저장합니다.
When it’s useful
- 읽기 쉬운 형식으로 북마크를 백업할 때.
- 북마크 컬렉션을 버전 관리하고 싶을 때.
- JSON을 소비하는 스크립트나 다른 도구에 북마크를 전달할 때.
Try it
- Chrome Web Store – (link to the extension)
- GitHub – (link to the source code)