Export Your Kindle Library to CSV or Excel (Free, No App)

Download the list of every book in your Kindle library as a spreadsheet: title, author, whether you bought it or got it with Kindle Unlimited or Prime Reading, and how much you’ve read. Free, in your browser, without installing anything or giving your password to anyone.

Runs on Kindle for Web (read.amazon.com). Sign in with your Amazon account, open your library and run the script: it reads the whole library itself, 50 books at a time.

export-kindle-library.js · 142 linespaste in the DevTools console on read.amazon.com
// Responsive Muse · Kindle Library Exporter · v1.0 · 2026-11-25
// Saves the list of every book in your Kindle library to CSV or TXT: title, authors, how you got
// it (purchase, Kindle Unlimited, Prime Reading, sample…), percentage read, ASIN and links.
// Amazon has no export button. Runs only on Kindle for Web (read.amazon.com/kindle-library, or
// your country's read.amazon site). It reads your library 50 books at a time in a hidden frame of
// the same Kindle site, the same list the page loads as you scroll. It never sends anything
// anywhere, never reads cookies, passwords or tokens, and never touches the books themselves.
(async () => {
  const TOOL = 'Export Kindle library';
  const FORMAT = 'csv';        // 'csv' (Excel, Sheets, Goodreads, StoryGraph) or 'txt' ("Title - Author", one per line)

  if (!/^read\.amazon\.[a-z.]+$/.test(location.hostname) || !/^\/kindle-library/.test(location.pathname)) {
    alert('Open your Kindle library first (signed in):\nhttps://read.amazon.com/kindle-library');
    return;
  }
  // A small box on the page shows progress and asks before changing anything,
  // so you never need to read or edit the console.
  const many = (n, word) => `${n} ${word}${n === 1 ? '' : 's'}`;   // 1 video, 2 videos
  const panel = (() => {
    const box = document.createElement('div');
    box.style.cssText = 'display:block!important;position:fixed;right:16px;bottom:16px;z-index:2147483647;width:340px;max-width:calc(100vw - 32px);' +
      'background:#111318;color:#e6e8ee;font:14px/1.5 system-ui,sans-serif;border-radius:12px;padding:16px;' +
      'box-shadow:0 8px 30px rgba(0,0,0,.4);text-align:left';
    const head = document.createElement('strong');
    head.textContent = TOOL;
    const msg = document.createElement('p');
    msg.style.cssText = 'margin:8px 0 12px;white-space:pre-line';
    const row = document.createElement('div');
    row.style.cssText = 'display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end';
    box.append(head, msg, row);
    document.body.append(box);
    const button = (label, primary, onClick) => {
      const b = document.createElement('button');
      b.textContent = label;
      b.style.cssText = 'font:600 14px system-ui,sans-serif;padding:8px 14px;border-radius:8px;cursor:pointer;' +
        (primary ? 'background:#0f766e;color:#fff;border:1px solid #0f766e' : 'background:none;color:#e6e8ee;border:1px solid #3a3f4b');
      b.onclick = onClick;
      row.append(b);
    };
    return {
      text(t) { msg.textContent = t; },
      ask(t, yes) {
        msg.textContent = t;
        row.replaceChildren();
        return new Promise(r => {
          button('Cancel', false, () => { row.replaceChildren(); r(false); });
          button(yes, true, () => { row.replaceChildren(); r(true); });
        });
      },
      stoppable(onStop) { row.replaceChildren(); button('Stop', false, onStop); },
      actions(t, list) {
        msg.textContent = t;
        row.replaceChildren();
        list.forEach(([label, primary, run]) => button(label, primary, run));
      },
      finish(t) { this.actions(t, [['Close', true, () => box.remove()]]); },
      close() { box.remove(); },
    };
  })();
  // Offer the result as a downloaded file or as clipboard text (a real click, so it always works)
  const deliver = (summary, body, file) => {
    const save = () => {
      const a = document.createElement('a');
      a.href = URL.createObjectURL(new Blob([/\.csv$/.test(file) ? '\ufeff' + body : body], { type: 'text/plain;charset=utf-8' }));
      a.download = file;
      a.click();
      setTimeout(() => URL.revokeObjectURL(a.href), 5000);
      panel.text(`${summary}\nSaved as ${file} (check your Downloads).`);
    };
    const copy = () => navigator.clipboard.writeText(body)
      .then(() => panel.text(`${summary}\nCopied. Paste it into a spreadsheet or a note.`))
      .catch(() => panel.text(`${summary}\nThe browser blocked the clipboard: use Download instead.`));
    panel.actions(summary, [['Close', false, () => panel.close()], ['Copy', false, copy], ['Download', true, save]]);
  };
  const clean = s => (s || '').replace(/\s+/g, ' ').trim();

  // Load one page of your library list (JSON from this same site) in a hidden frame and read it
  const loadPage = path => new Promise(resolve => {
    const frame = document.createElement('iframe');
    frame.style.cssText = 'position:absolute;left:-9999px;width:10px;height:10px';
    const done = data => { resolve(data); setTimeout(() => frame.remove(), 0); };
    frame.onload = () => {
      try {
        const doc = frame.contentDocument;
        done(JSON.parse((doc.querySelector('pre') || doc.body).textContent));
      } catch (e) {
        done(null);
      }
    };
    setTimeout(() => done(null), 30000);
    frame.src = new URL(path, location.origin).href;
    document.body.appendChild(frame);
  });

  const ORIGIN = {
    PURCHASE: 'Purchase', KINDLE_UNLIMITED: 'Kindle Unlimited', PRIME: 'Prime Reading', SAMPLE: 'Sample',
    PERSONAL_DOCUMENT: 'Personal document', FREE: 'Free', SHARED: 'Family Library', RENTAL: 'Rental', LENDING: 'Borrowed',
  };
  const store = location.origin.replace('//read.', '//www.');   // read.amazon.co.uk → www.amazon.co.uk

  // 1. Every page of the library, 50 books at a time, newest first
  let stop = false;
  panel.stoppable(() => { stop = true; });
  const books = new Map();
  let token = '';
  for (let page = 1; page <= 400 && !stop; page++) {
    panel.text(`Reading your library… ${many(books.size, 'book')} so far`);
    const data = await loadPage('/kindle-library/search?query=&libraryType=BOOKS&sortType=recency&querySize=50' +
      (token ? '&paginationToken=' + encodeURIComponent(token) : ''));
    if (!data || !Array.isArray(data.itemsList)) break;
    for (const b of data.itemsList) {
      if (!b.asin || books.has(b.asin)) continue;
      books.set(b.asin, {
        asin: b.asin,
        title: clean(b.title),
        author: (b.authors || []).map(a => clean(a).replace(/:$/, '')).filter(Boolean).join(' & '),
        origin: ORIGIN[b.originType] || clean(String(b.originType || '').replace(/_/g, ' ').toLowerCase()),
        read: typeof b.percentageRead === 'number' ? b.percentageRead + '%' : '',
        kind: b.mangaOrComicAsin ? 'Comic' : (b.resourceType === 'EBOOK' ? 'Ebook' : clean(String(b.resourceType || '').toLowerCase())),
      });
    }
    token = data.paginationToken || '';
    if (!token) break;
  }
  const list = [...books.values()];
  if (!list.length) {
    panel.finish('No books found. Are you signed in to Kindle for Web? If you are and your library has books, Amazon may have changed its page: please report it on responsive-muse.com.');
    return 0;
  }

  // 2. Build the file and offer it
  const cell = v => '"' + String(v).replace(/"/g, '""') + '"';
  const body = FORMAT === 'txt'
    ? list.map(b => b.author ? `${b.title} - ${b.author}` : b.title).join('\n')
    : ['Title,Author,Acquired as,Type,Read,ASIN,Store page,Read online', ...list.map(b =>
        [b.title, b.author, b.origin, b.kind, b.read, b.asin, `${store}/dp/${b.asin}`, `${location.origin}/?asin=${b.asin}`]
          .map(cell).join(','))].join('\n');
  const started = list.filter(b => parseInt(b.read, 10) > 0).length;
  deliver(`${stop ? 'Stopped early. ' : ''}Found ${many(list.length, 'book')} (${started} started).`, body, `kindle-library.${FORMAT}`);
  return list.length;
})();

🛡️ Chrome says “Don't paste code…”? That's normal. Type allow pasting in the console, press Enter and paste again. You only need to do it once.

Why does Chrome warn me?

Chrome shows this the first time anyone pastes into the console, to protect people from scams that ask them to paste unknown code. It's right to warn you, and that's why this script is fully visible above: 142 commented lines that send nothing anywhere and never touch your passwords or cookies. Why it's safe.

Rather not use the console? Drag the Export Kindle library button to your bookmarks bar and click it on read.amazon.com. No warning that way.

Bookmarklet: drag the middle button to your bookmarks bar, open read.amazon.com and click the bookmark. It runs the same script with the options above.

Why it's safe to runAutomated check passed Nov 23, 2026 · tested on a real account Nov 25, 2026

Sends nothing anywhere. No fetch, XHR or external scripts. The only network activity is read.amazon.com itself loading your list.

Never touches your login. It doesn't read cookies, passwords, tokens or browser storage.

Only runs on read.amazon.com. Anywhere else it stops before doing anything.

Short and readable. 142 commented lines, not minified or obfuscated.

Shows its progress on the page. A small box tells you what it's doing and offers Download or Copy at the end.

Same code for everyone. SHA-256 of the default version: 1f531db01db3ada8…

Verify it yourself in 30 seconds
  1. Read it: every line is above, with comments.
  2. Search the code for fetch, XMLHttpRequest, cookie, localStorage or eval. None of them appear.
  3. Open the Network tab before running it: you'll only see requests to read.amazon.com.
Did it work for you?

How to use it

  1. On a computer, open Kindle for Web at read.amazon.com/kindle-library and sign in with your Amazon account.
  2. Open the console: F12 or Ctrl+Shift+J (Cmd+Option+J on Mac). If Chrome asks, type allow pasting and press Enter.
  3. Copy the script, paste it into the console and press Enter. It reads your whole library, 50 books at a time, and offers you the file.

What you get

One row per book: title, authors, how you got it (purchase, Kindle Unlimited, Prime Reading, sample, Family Library), type, percentage read, ASIN, a link to the book’s store page and a link to open it in Kindle for Web. Choose TXT for a simple “Title – Author” list.

Why export your Kindle library?

Amazon has no export button for Kindle, so a list of your books is the only way to import them into Goodreads or StoryGraph, keep a record of what you own, or see which Kindle Unlimited books you still have to read. Apps that do it ask you to log in to Amazon through them; this script reads the page you already have open and sends nothing anywhere.

Frequently asked questions

Does Amazon let you export your Kindle library?

No. Kindle has no export button on the web, the app or the device. This script reads the same list Kindle for Web shows you and saves it as a spreadsheet.

What does the file include?

Title, authors, how you got each book (purchase, Kindle Unlimited, Prime Reading, sample, Family Library…), type, percentage read, ASIN, a link to the store page and a link to read it online.

Can I import it into Goodreads or StoryGraph?

Yes. Both accept a CSV with title and author. Export as CSV and use their import page, or use the TXT format ("Title - Author") to search the books.

Does it download or copy the books?

No. It only saves the list of titles. It never opens, downloads or converts the books themselves.

Does it work with a large library?

Yes. It asks Kindle for your library 50 books at a time until the end, the same way the page loads more as you scroll.

You may also need