A simple Chrome extension that automatically closes duplicate tabs with one click. Keep your browser organized and improve performance by eliminating redundant tabs.
- 🚀 One-click operation - Close all duplicate tabs instantly
- 🧠 Smart detection - Identifies tabs with identical URLs
- 💡 Preserves oldest tabs - Keeps the first opened tab for each URL
- 📊 User feedback - Shows how many duplicates were closed
- 🎨 Clean interface - Modern, intuitive popup design
- ⚡ Fast performance - Processes tabs quickly and efficiently
-
Download the extension files
- Download all the files from this repository
- Create a new folder on your computer (e.g.,
duplicate-tab-closer) - Save all files in this folder:
manifest.jsonpopup.htmlpopup.jsbackground.js
-
Create extension icons (optional)
- Add icon files:
icon16.png,icon48.png,icon128.png - Or remove the
"icons"section frommanifest.jsonif you skip this step
- Add icon files:
-
Load the extension in Chrome
- Open Google Chrome
- Navigate to
chrome://extensions/ - Enable "Developer mode" using the toggle in the top-right corner
- Click "Load unpacked"
- Select the folder containing your extension files
- The extension should now appear in your extensions list
-
Pin the extension (recommended)
- Click the puzzle piece icon (🧩) in the Chrome toolbar
- Find "Duplicate Tab Closer" in the list
- Click the pin icon to add it to your toolbar for easy access
-
Open multiple tabs - Navigate normally and open tabs (some duplicates will naturally occur)
-
Click the extension - Click the "Duplicate Tab Closer" icon in your toolbar
-
View results - The popup will show:
- A button to close duplicates
- Status message indicating how many tabs were closed
- "No duplicate tabs found" if there are no duplicates
The extension uses Chrome's tabs API to:
- Scan all open tabs across all Chrome windows
- Group tabs by URL to identify duplicates
- Preserve the oldest tab for each unique URL (based on tab ID)
- Close duplicate tabs automatically
- Provide feedback on the number of tabs closed
duplicate-tab-closer/
├── manifest.json # Extension configuration
├── popup.html # User interface
├── popup.js # Main logic for closing duplicates
├── background.js # Background service worker
├── icon16.png # 16x16 icon (optional)
├── icon48.png # 48x48 icon (optional)
├── icon128.png # 128x128 icon (optional)
└── README.md # This file
The extension requires the following Chrome permissions:
tabs- To access and manage browser tabsactiveTab- To interact with the currently active tab
These permissions are necessary for the extension to detect and close duplicate tabs.
- Make sure all required files are in the same folder
- Check that Developer mode is enabled in
chrome://extensions/ - Verify the
manifest.jsonfile is properly formatted
- Type
chrome://extensions/directly in the address bar - Make sure you're using Google Chrome (not another browser)
- Either add icon files (
icon16.png,icon48.png,icon128.png) to your folder - Or remove the entire
"icons"section frommanifest.json
- The extension compares exact URLs, including parameters
https://example.comandhttps://example.com/are considered different- Query parameters make URLs unique (e.g.,
?utm_source=google)
Feel free to submit issues, feature requests, or pull requests to improve this extension.
This project is open source and available under the MIT License.
- v1.0 - Initial release
- Basic duplicate tab detection and closing
- Simple popup interface
- Status feedback
Note: This extension is designed for personal use and development purposes. Always review code before installing browser extensions, especially in developer mode.