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

Save the list of every game in your GOG library as a spreadsheet: genre, Windows/Mac/Linux, release date, GOG rating and store link, including the games you hid. Free, in your browser, without GOG Galaxy plugins or any app.

Sign in on gog.com and open your library (Account > Games), then run the script. It reads the whole library itself, 100 games at a time, including hidden games.

export-gog-library.js · 144 linespaste in the DevTools console on www.gog.com
// Responsive Muse · GOG Library Exporter · v1.0 · 2026-11-25
// Saves every game in your GOG library to CSV or TXT: title, genre, platforms (Windows, Mac,
// Linux), release date, rating, DLC count, hidden or not, and the store link. GOG has no export
// button. Runs only on gog.com while you are signed in. It reads your library 100 games at a time
// in a hidden frame of the same GOG site, the same list your library page loads. It never sends
// anything anywhere and never reads cookies, passwords or tokens.
(async () => {
  const TOOL = 'Export GOG library';
  const FORMAT = 'csv';          // 'csv' (Excel, Sheets) or 'txt' (one game per line)
  const INCLUDE_HIDDEN = true;   // also the games you hid in your library

  if (!/(^|\.)gog\.com$/.test(location.hostname)) {
    alert('Open GOG first (signed in):\nhttps://www.gog.com/account');
    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 (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);
  });

  // 1. Every page of the library (and of the hidden games), 100 at a time
  let stop = false;
  panel.stoppable(() => { stop = true; });
  const games = new Map();
  for (const hidden of INCLUDE_HIDDEN ? [0, 1] : [0]) {
    for (let page = 1; page <= 100 && !stop; page++) {
      panel.text(`Reading your library… ${many(games.size, 'game')} so far`);
      const data = await loadPage(`/account/getFilteredProducts?mediaType=1&sortBy=title&page=${page}` + (hidden ? '&hiddenFlag=1' : ''));
      if (!data || !Array.isArray(data.products)) {
        if (page === 1 && !hidden) {
          panel.finish('Could not read your library. Are you signed in to GOG? Open gog.com/account and run it again.');
          return 0;
        }
        break;
      }
      for (const p of data.products) {
        if (!p.id || games.has(p.id)) continue;
        const os = p.worksOn || {};
        games.set(p.id, {
          title: clean(p.title),
          genre: clean(p.category),
          platforms: ['Windows', 'Mac', 'Linux'].filter(k => os[k]).join(', '),
          released: (p.releaseDate?.date || '').slice(0, 10),
          rating: p.rating ? p.rating + '/5' : '',
          dlc: p.dlcCount || 0,
          hidden: hidden ? 'yes' : '',
          url: p.url ? new URL(p.url, 'https://www.gog.com').href : '',
          id: p.id,
        });
      }
      if (page >= (data.totalPages || 1)) break;
    }
  }
  const list = [...games.values()];
  if (!list.length) {
    panel.finish('Your GOG library looks empty. If it isn\'t, GOG may have changed its site: 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(g => g.title).join('\n')
    : ['Title,Genre,Platforms,Release date,GOG rating,DLCs,Hidden,Store page,GOG ID', ...list.map(g =>
        [g.title, g.genre, g.platforms, g.released, g.rating, g.dlc, g.hidden, g.url, g.id].map(cell).join(','))].join('\n');
  const hid = list.filter(g => g.hidden).length;
  deliver(`${stop ? 'Stopped early. ' : ''}Found ${many(list.length, 'game')}` + (hid ? ` (${hid} hidden).` : '.'), body, `gog-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: 144 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 GOG library button to your bookmarks bar and click it on www.gog.com. No warning that way.

Bookmarklet: drag the middle button to your bookmarks bar, open www.gog.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 www.gog.com itself loading your list.

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

Only runs on www.gog.com. Anywhere else it stops before doing anything.

Short and readable. 144 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: 95513de075dfc2be…

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 www.gog.com.
Did it work for you?

How to use it

  1. Sign in on gog.com and open your library (Account > Games).
  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, 100 games at a time, and offers you the file.

What you get

One row per game: title, genre, platforms (Windows, Mac, Linux), release date, GOG rating, number of DLCs, whether it’s hidden, store link and GOG ID. Choose TXT for a plain list of titles.

Why export your GOG library?

GOG has no export button, and GOG Galaxy only shows the list inside the app. A spreadsheet is the easiest way to see every DRM-free game you own, check which ones run on Mac or Linux, or merge it with your Steam and Epic libraries.

Frequently asked questions

Does GOG have an export option?

No. GOG Galaxy can show your games but there is no button to save the list. This script reads the same library list the GOG website loads and saves it as a spreadsheet.

Does it work with GOG Galaxy?

It runs on the GOG website, not in Galaxy. The list is the same: every game you own on GOG.

What is the rating column?

The GOG store rating of each game, out of 5.

Does it download the games?

No. It only saves the list. Use GOG Galaxy or the website to download the installers.

More game library tools

Export & back up