Exportar tus suscripciones de YouTube a CSV u OPML

Saca la lista de todos los canales a los que estás suscrito: en CSV para Excel o en OPML para lectores RSS, NewPipe y FreeTube.

export-subscriptions.js · 118 líneaspégalo en la consola (F12) de www.youtube.com
// Responsive Muse · YouTube Subscriptions Exporter · v1.1 · 2026-10-22
// Saves the list of channels you're subscribed to as CSV (Excel, Sheets) or OPML
// (RSS readers, NewPipe, FreeTube). Runs only on youtube.com/feed/channels.
// The script makes no network requests of its own and never reads cookies, passwords or tokens.
(async () => {
  const TOOL = 'Exportar suscripciones';
  const FORMAT = 'csv';        // 'csv' or 'opml'

  if (location.hostname !== 'www.youtube.com' || location.pathname !== '/feed/channels') {
    alert('Abre primero tus suscripciones (con tu sesión iniciada):\nhttps://www.youtube.com/feed/channels');
    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' })[word] || word + 's'}`;   // 1 vídeo, 2 vídeos
  const panel = (() => {
    const box = document.createElement('div');
    box.style.cssText = '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 sleep = ms => new Promise(r => setTimeout(r, ms));
  const rows = () => [...document.querySelectorAll('ytd-channel-renderer')];

  // 1. Scroll to the end until no new channels appear three times in a row
  let last = -1, idle = 0;
  while (idle < 3) {
    window.scrollTo(0, document.documentElement.scrollHeight);
    await sleep(1200);
    const n = rows().length;
    idle = n === last ? idle + 1 : 0;
    last = n;
    panel.text(`Cargando tus suscripciones… ${n} canales`);
  }

  // 2. Read every channel (the data YouTube already rendered on this page)
  const channels = rows().map(el => {
    const text = sel => (el.querySelector(sel)?.textContent || '').trim();
    const handle = text('#subscribers');
    return {
      name: text('#channel-title #text'),
      handle: handle.startsWith('@') ? handle : '',
      subscribers: text('#video-count').replace(/ subscribers?$/i, ''),
      id: el.data?.channelId || '',
      url: 'https://www.youtube.com' + (el.querySelector('a#main-link')?.getAttribute('href') || ''),
    };
  });
  if (!channels.length) {
    panel.finish('No se han encontrado canales. Puede que YouTube haya cambiado su diseño: avísanos en responsive-muse.com.');
    return 0;
  }

  // 3. Build the file and offer it
  const esc = s => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
  const cell = v => '"' + String(v).replace(/"/g, '""') + '"';
  const body = FORMAT === 'opml'
    ? ['<?xml version="1.0" encoding="UTF-8"?>', '<opml version="1.1">',
       '<head><title>Suscripciones de YouTube</title></head>', '<body><outline text="YouTube" title="YouTube">',
       ...channels.filter(c => c.id).map(c =>
         `<outline type="rss" text="${esc(c.name)}" title="${esc(c.name)}" ` +
         `xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=${c.id}" htmlUrl="${esc(c.url)}"/>`),
       '</outline></body>', '</opml>'].join('\n')
    : ['Canal,Usuario,Suscriptores,ID del canal,URL',
       ...channels.map(c => [c.name, c.handle, c.subscribers, c.id, c.url].map(cell).join(','))].join('\n');
  deliver(`Listo: ${many(channels.length, 'canal')}.`, body, `youtube-subscriptions.${FORMAT}`);
  return channels.length;
})();

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

Por qué es seguro ejecutarloComprobación automática superada 23 oct 2026 · probado en una cuenta real el 22 oct 2026
  • No envía nada a ningún sitio. Sin fetch, XHR ni scripts externos. La única actividad de red es la de www.youtube.com cargando tu lista.
  • No toca tu sesión. No lee cookies, contraseñas, tokens ni el almacenamiento del navegador.
  • Solo funciona en www.youtube.com. En cualquier otra web se detiene antes de hacer nada.
  • Corto y legible. 118 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: f4b5043219bfd114…
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 www.youtube.com.
¿Te ha funcionado?

Cómo usarlo

  1. Abre tus suscripciones con tu sesión iniciada.
  2. Abre la consola: F12 o Ctrl+Mayús+J (Cmd+Opción+J en Mac). Si Chrome te lo pide, escribe permitir pegar (o allow pasting si lo tienes en inglés) y pulsa Enter.
  3. Elige las opciones, copia el script, pégalo en la consola y pulsa Enter. Al terminar aparece un recuadro: pulsa Descargar (o Copiar).

¿Para qué sirve el OPML?

Es el formato que entienden los lectores RSS (Feedly, Inoreader, Thunderbird) y las apps alternativas de YouTube como NewPipe o FreeTube. Al importarlo, cada canal se convierte en un feed con sus vídeos nuevos.

Preguntas frecuentes

¿Cómo importo el OPML en un lector RSS?

Todos los lectores tienen una opción «Importar OPML» (Feedly, Inoreader, NetNewsWire, Thunderbird). Cada canal se convierte en un feed con sus vídeos nuevos.

¿No basta con Google Takeout?

Takeout funciona, pero tarda horas o días y te manda un zip. Esto te da la lista en unos segundos.

Más herramientas gratis

Limpiar

Exportar y hacer copia