- Smart Sorting - Ascending/descending by duration with alphabetical tiebreaker
- Settings Panel - Persistent preferences (sort mode, auto-scroll, log verbosity)
- Dry Run Mode - Preview changes before applying (v4.5.0)
- Duration Filters - Include only videos within specific length ranges (v4.3.0)
- Analytics - Stats on total duration, avg length, shortest/longest videos (v4.2.0)
- CSV Export - Export playlist data for external analysis (v4.4.0)
- Real-time Logging - Copy-to-clipboard support with 1000 message retention
Option 1: Userscript (Recommended)
- Install Tampermonkey in Chrome
- Copy contents of
extension/yt.jsand create new Tampermonkey script - Save and it runs automatically on YouTube
Option 2: Chrome Extension
- Clone/download this repository
- Go to
chrome://extensions/β Enable "Developer mode" - Click "Load unpacked" β Select
extensionfolder
- Open any editable YouTube playlist in Chrome
- Expand the "Sort Playlist by Duration" panel injected below playlist header
- Optional: Configure Settings, view Stats, or set duration filters
- Select sort order:
Shortest FirstorLongest First - Choose:
Sort all(loads entire playlist) orSort only loaded(current videos) - Recommended: Enable Dry Run to preview changes before applying
- Click
Sortand watch the real-time log - Optional: Export playlist data as CSV
Note: After sorting, don't switch back to YouTube's auto-sort (Date Added, etc.) - manual sorting is permanent.
- Verify Tampermonkey shows script active on youtube.com
- Reload page if controls don't appear
- Use Dry Run mode to preview before applying changes
- Adjust Settings panel for scroll retry times or log verbosity
- Use Copy Console button for detailed logs
- Check browser console for additional error messages
v4.6.0 (Oct 2025) - Missing video tolerance & adaptive reload tweaks
v4.5.0 - Settings Panel & Dry Run Mode
v4.4.0 - CSV Export & improved move counter
v4.3.0 - Duration filters (min/max length)
v4.2.0 - Playlist statistics button
v4.1.0 - Copy Console & lazy loading fixes
GPL-2.0-only
