Exportar tu biblioteca de Kindle a CSV o Excel, gratis

Descarga la lista de todos los libros de tu biblioteca de Kindle en una hoja de cálculo: título, autor, si lo compraste o lo tienes con Kindle Unlimited o Prime Reading, y cuánto has leído. Gratis, en tu navegador, sin instalar nada ni dar tu contraseña a nadie.

Funciona en Kindle para la web (read.amazon.com). Inicia sesión con tu cuenta de Amazon, abre tu biblioteca y ejecuta el script: lee la biblioteca entera él solo, de 50 en 50 libros.

export-kindle-library.js · 142 líneaspégalo en la consola (F12) de 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 = 'Exportar biblioteca de Kindle';
  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('Abre primero tu biblioteca de Kindle (con tu sesión iniciada):\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} ${n === 1 ? word : ({ canal: 'canales', 'canción': 'canciones', 'publicación': 'publicaciones', 'elemento guardado': 'elementos guardados', lugar: 'lugares' })[word] || word + 's'}`;   // 1 vídeo, 2 vídeos
  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('Cancelar', false, () => { row.replaceChildren(); r(false); });
          button(yes, true, () => { row.replaceChildren(); r(true); });
        });
      },
      stoppable(onStop) { row.replaceChildren(); button('Parar', false, onStop); },
      actions(t, list) {
        msg.textContent = t;
        row.replaceChildren();
        list.forEach(([label, primary, run]) => button(label, primary, run));
      },
      finish(t) { this.actions(t, [['Cerrar', 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}\nGuardado como ${file} (mira tu carpeta de Descargas).`);
    };
    const copy = () => navigator.clipboard.writeText(body)
      .then(() => panel.text(`${summary}\nCopiado. Pégalo en una hoja de cálculo o en una nota.`))
      .catch(() => panel.text(`${summary}\nEl navegador ha bloqueado el portapapeles: usa Descargar.`));
    panel.actions(summary, [['Cerrar', false, () => panel.close()], ['Copiar', false, copy], ['Descargar', 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: 'Compra', KINDLE_UNLIMITED: 'Kindle Unlimited', PRIME: 'Prime Reading', SAMPLE: 'Muestra',
    PERSONAL_DOCUMENT: 'Documento personal', FREE: 'Gratis', SHARED: 'Biblioteca familiar', RENTAL: 'Alquiler', LENDING: 'Prestado',
  };
  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(`Leyendo tu biblioteca… ${many(books.size, 'libro')} hasta ahora`);
    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 ? 'Cómic' : (b.resourceType === 'EBOOK' ? 'Libro electrónico' : clean(String(b.resourceType || '').toLowerCase())),
      });
    }
    token = data.paginationToken || '';
    if (!token) break;
  }
  const list = [...books.values()];
  if (!list.length) {
    panel.finish('No se han encontrado libros. ¿Has iniciado sesión en Kindle para la web? Si es así y tu biblioteca tiene libros, puede que Amazon haya cambiado su página: avísanos en 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')
    : ['Título,Autor,Cómo lo conseguiste,Tipo,Leído,ASIN,Página de la tienda,Leer 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 ? 'Parado antes de terminar. ' : ''}Listo: ${many(list.length, 'libro')} (${started} empezados).`, body, `kindle-library.${FORMAT}`);
  return list.length;
})();

🛡️ ¿Chrome te dice «No pegues código…»? Es normal. Escribe allow pasting en la consola (o permitir pegar si tu Chrome está en español), pulsa Intro y vuelve a pegar. Solo hace falta una vez.

¿Por qué avisa Chrome?

Chrome lo muestra la primera vez que alguien pega algo en la consola, para proteger de estafas en las que te piden pegar código desconocido. Hace bien en avisar, y por eso este script está entero a la vista: 142 líneas comentadas que no envían nada a ningún sitio ni tocan tus contraseñas o cookies. Por qué es seguro.

¿Prefieres no usar la consola? Arrastra el botón Exportar biblioteca de Kindle a tu barra de marcadores y haz clic en él estando en read.amazon.com. Así no sale el aviso.

Marcador: arrastra el botón del medio a tu barra de marcadores, abre read.amazon.com y pulsa el marcador. Ejecuta el mismo script con las opciones de arriba.

Por qué es seguro ejecutarloComprobación automática superada 23 nov 2026 · probado en una cuenta real el 25 nov 2026

No envía nada a ningún sitio. Sin fetch, XHR ni scripts externos. La única actividad de red es la de read.amazon.com cargando tu lista.

No toca tu sesión. No lee cookies, contraseñas, tokens ni el almacenamiento del navegador.

Solo funciona en read.amazon.com. En cualquier otra web se detiene antes de hacer nada.

Corto y legible. 142 líneas comentadas, sin minificar ni ofuscar.

Muestra su progreso en la página. Un pequeño recuadro te dice qué está haciendo y al final te ofrece Descargar o Copiar.

El mismo código para todos. SHA-256 de la versión por defecto: 3e9faeb277fe13dc…

Compruébalo tú mismo en 30 segundos
  1. Léelo: todas las líneas están arriba, con comentarios.
  2. Busca en el código fetch, XMLHttpRequest, cookie, localStorage o eval. No aparece ninguna.
  3. Abre la pestaña Red (Network) antes de ejecutarlo: solo verás peticiones a read.amazon.com.
¿Te ha funcionado?

Cómo usarlo

  1. En el ordenador, abre Kindle para la web en read.amazon.com/kindle-library e inicia sesión con tu cuenta de Amazon.
  2. Abre la consola: F12 o Ctrl+Mayús+J (Cmd+Opción+J en Mac). Si Chrome te lo pide, escribe permitir pegar y pulsa Enter.
  3. Copia el script, pégalo en la consola y pulsa Enter. Lee tu biblioteca entera, de 50 en 50 libros, y te ofrece el archivo.

Qué obtienes

Una fila por libro: título, autores, cómo lo conseguiste (compra, Kindle Unlimited, Prime Reading, muestra, biblioteca familiar), tipo, porcentaje leído, ASIN, enlace a la ficha de la tienda y enlace para abrirlo en Kindle para la web. Elige TXT para una lista simple «Título – Autor».

¿Para qué exportar tu biblioteca de Kindle?

Amazon no tiene botón de exportar en Kindle, así que una lista de tus libros es la única forma de importarlos en Goodreads o StoryGraph, guardar un registro de lo que tienes o ver qué libros de Kindle Unlimited te quedan por leer. Las apps que lo hacen te piden entrar en Amazon a través de ellas; este script lee la página que ya tienes abierta y no envía nada a ningún sitio.

Preguntas frecuentes

¿Amazon deja exportar la biblioteca de Kindle?

No. Kindle no tiene botón de exportar ni en la web, ni en la app ni en el lector. Este script lee la misma lista que te enseña Kindle para la web y la guarda como hoja de cálculo.

¿Qué incluye el archivo?

Título, autores, cómo conseguiste cada libro (compra, Kindle Unlimited, Prime Reading, muestra, biblioteca familiar…), tipo, porcentaje leído, ASIN, enlace a la ficha de la tienda y enlace para leerlo online.

¿Puedo importarlo en Goodreads o StoryGraph?

Sí. Los dos aceptan un CSV con título y autor: expórtalo en CSV y usa su página de importación, o usa el formato TXT («Título - Autor») para buscar los libros.

¿Descarga o copia los libros?

No. Solo guarda la lista de títulos. Nunca abre, descarga ni convierte los libros.

¿Funciona con bibliotecas grandes?

Sí. Pide tu biblioteca a Kindle de 50 en 50 libros hasta el final, igual que hace la página cuando bajas.

También te puede servir