Complete guide

How to run a
free Instagram giveaway

In 4 simple steps you can pick a fair random winner from all the comments on your post. Free, no sign-up and no comment limit.

1

Open the post on Instagram Web

From your computer, go to instagram.com and open the giveaway post. Make sure to do this from a desktop browser, not from your phone or the app.

2

Scroll to the bottom of the comments

Scroll down until no more comments appear. Instagram loads them in batches, so you need to reach the last comment before capturing them. With many comments, this may take a few minutes.

3

Open the console and paste the script

Press F12 to open the browser developer tools. Click the Console tab, paste the script below and press Enter. The file comments_instagram.csv will download automatically.

⚠️ Chrome and Edge: when you open the console for the first time, a security warning appears. This is normal. Simply type allow pasting and press Enter — after that, you can paste the script without any issue.

Compatible browsers: Chrome, Edge, Brave and Opera (they require allow pasting) · Firefox (it does not require this step; paste directly).

4

Paste the comments into Sorteador

Open the CSV with Notepad, copy all the content and paste it into Sorteador. Configure the rules and press Run giveaway to see the animation and reveal the winner.

5

Download the giveaway certificate

Once the winner is revealed, press Download certificate. A 9:16 image is automatically generated, ready to share in stories, with the winner's name, the date and a unique verification code. Anyone can confirm the giveaway was legitimate at sorteador.social/en/verify.

JavaScript — F12 → Console → Enter
// Sorteador — Script to export Instagram comments
// Step 1: scroll to the bottom of the post comments
// Step 2: F12 → Console → paste this → Enter

(function() {
  const results = [];
  const seen = new Set();
  let csv = "username,comment\n";

  document.querySelectorAll('a[href^="/"][role="link"]').forEach(link => {
    const href = link.href;
    if (!href.match(/instagram\.com\/[a-zA-Z0-9_.]+\/?$/)) return;
    const username = link.textContent.trim();
    if (!username || username.length < 2) return;

    let container = link.closest('li, [role="menuitem"]');
    if (!container) return;

    const spans = container.querySelectorAll('span');
    let commentText = '';
    spans.forEach(s => {
      const t = s.textContent.trim();
      if (t && t !== username && t.length > 1 &&
          !t.match(/^[0-9]+[smhd]$/) &&
          !t.includes('Like') &&
          !t.includes('Reply')) {
        if (t.length > commentText.length) commentText = t;
      }
    });

    if (!commentText || seen.has(username + commentText)) return;
    seen.add(username + commentText);

    csv += `"${username}","${commentText.replace(/"/g, '""')}"\n`;
    results.push({ username, commentText });
  });

  console.log(`✅ ${results.length} comments found`);

  const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });
  const url = URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.href = url;
  a.download = 'comments_instagram.csv';
  a.click();

  return `Done: ${results.length} comments exported`;
})();
⚠️

Important: Instagram updates its structure from time to time, which can affect how many comments the script captures. If the number seems low, make sure you reached the last comment before running it. The console will show you how many comments it found.

🎉

100% free

No plans, no subscriptions, no credit card. Sorteador is completely free forever.

🔓

No sign-up

You do not need to create an account or log in. Open it, run the giveaway and you are done. No forms or emails.

No comment limit

Whether you have 100 or 10,000 comments, Sorteador processes them all without restrictions.

🛡️

No data upload

Everything runs in your browser. Comments are never sent to any external server.

👥

Multiple winners

You can choose how many winners you want. Each one gets their own carousel animation.

📋

Verifiable certificate

Each giveaway generates a 9:16 certificate with a unique code. Anyone can verify it at sorteador.social/en/verify.

Sorteador discards comments that don't meet the rules you define, such as insufficient mentions.

Ready to run your giveaway?

You have everything you need. Now go to Sorteador and pick your winner.

Go to Sorteador ✦