How to Mass Unfollow on Twitter/X in 2026 (Free Method)
Following too many people on X (formerly Twitter)? A bloated following list hurts your engagement rate, clutters your timeline, and makes you look like a spam account. The problem is, Twitter doesn't have a built-in mass unfollow feature — you'd have to click "Following" → "Unfollow" → confirm, one by one. For hundreds of accounts? That's hours of tedious clicking.
XActions is a free, open-source tool that lets you mass unfollow on Twitter in under 30 seconds. No API key, no sign-up, no payment. Just a browser script you paste into DevTools.
What You'll Need
- A desktop browser — Chrome, Edge, Brave, or Firefox
- Your X/Twitter account — logged in at x.com
- 30 seconds — that's it
Method 1: Unfollow Everyone
This script unfollows every account you currently follow. Perfect for a fresh start or cleaning up a spam account.
Step 1: Go to your Following page
Navigate to x.com/YOUR_USERNAME/following — replace YOUR_USERNAME with your actual handle. You should see the list of accounts you follow.
Step 2: Open DevTools Console
Press F12 (or Ctrl+Shift+J on Windows, Cmd+Option+J on Mac) to open browser DevTools. Click the Console tab.
Step 3: Paste the script
Copy the entire script below and paste it into the console. Press Enter to run it.
// Unfollow Everyone — by nichxbt
// Go to: x.com/YOUR_USERNAME/following
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
const $confirmButton = '[data-testid="confirmationSheetConfirm"]';
const retry = { count: 0, limit: 3 };
const sleep = ({ seconds }) =>
new Promise((resolve) => {
console.log(`⏳ Waiting ${seconds}s...`);
setTimeout(resolve, seconds * 1000);
});
const unfollowAll = async (buttons) => {
console.log(`🔄 Unfollowing ${buttons.length} users...`);
for (const btn of buttons) {
btn.click();
await sleep({ seconds: 1 });
const confirm = document.querySelector($confirmButton);
if (confirm) confirm.click();
await sleep({ seconds: 1 });
}
};
const nextBatch = async () => {
window.scrollTo(0, document.body.scrollHeight);
await sleep({ seconds: 1 });
const buttons = [...document.querySelectorAll($followButtons)];
if (buttons.length > 0) {
await unfollowAll(buttons);
await sleep({ seconds: 2 });
return nextBatch();
}
retry.count++;
if (retry.count >= retry.limit) {
console.log('✅ Done! Reload and re-run if any were missed.');
} else {
await sleep({ seconds: 2 });
return nextBatch();
}
};
console.log('🚀 Starting mass unfollow...');
nextBatch();
})();
Method 2: Unfollow Only Non-Followers
Want to keep your mutual follows but remove everyone who doesn't follow you back? XActions has a script for that too.
// Unfollow Who Doesn't Follow Back — by nichxbt
// Go to: x.com/YOUR_USERNAME/following
(() => {
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
const nextBatch = async () => {
window.scrollTo(0, document.body.scrollHeight);
await sleep(2000);
const cells = document.querySelectorAll('[data-testid="UserCell"]');
for (const cell of cells) {
const followsYou = cell.querySelector('[data-testid="userFollowIndicator"]');
if (!followsYou) {
const unfollowBtn = cell.querySelector('[data-testid$="-unfollow"]');
if (unfollowBtn) {
unfollowBtn.click();
await sleep(500);
const confirm = document.querySelector(
'[data-testid="confirmationSheetConfirm"]'
);
if (confirm) confirm.click();
await sleep(1500);
}
}
}
const remaining = document.querySelectorAll('[data-testid="UserCell"]');
if (remaining.length > 0) return nextBatch();
console.log('✅ Done! All non-followers unfollowed.');
};
console.log('🔍 Finding non-followers...');
nextBatch();
})();
Method 3: Use the CLI
If you prefer the command line, XActions has a CLI tool:
# Install globally
npm install -g xactions
# Unfollow everyone
xactions unfollow --all
# Unfollow non-followers only
xactions unfollow --non-followers
Method 4: Use AI (MCP Server)
If you use Claude Desktop, Cursor, or another MCP-compatible AI tool, you can just ask in natural language:
"Unfollow everyone who doesn't follow me back"
"Unfollow all accounts I'm following"
"Clean up my following list — remove anyone who hasn't tweeted in 6 months"
Set up the XActions MCP server once, and your AI assistant handles the rest. See our MCP setup guide.
Is Mass Unfollowing Safe?
XActions scripts include built-in delays (1-3 seconds between actions) to mimic human behavior. This drastically reduces the risk of rate limits or account flags. However:
- Don't run multiple automation scripts at the same time
- Start with smaller batches if your account is new
- Avoid unfollowing more than ~400 accounts per day
- The script runs entirely in YOUR browser — your data never leaves your machine
Why Clean Up Your Following List?
- Better engagement rate — a high follower-to-following ratio signals quality
- Cleaner timeline — see content from people you actually care about
- Algorithm boost — the X algorithm rewards engaged, curated accounts
- Professional appearance — brands and collaborators check your ratio
FAQ
Will unfollowed people be notified?
No. X doesn't send notifications when you unfollow someone.
Can I undo it?
You can re-follow people, but there's no bulk "undo." Export your following list first with XActions' scraper tools if you want a backup.
Does this work on mobile?
The browser script requires desktop DevTools. Use the CLI for a non-browser option.
Ready to clean up your following list?
XActions is 100% free and open source. No sign-up required.
Run the Script Now →