Free & open source · No account, no tracking

Sort any YouTube playlist by duration.

Reorder a playlist you own by video length, shortest or longest first, in seconds. YouTube makes you drag videos one at a time. YTSort does the whole list for you and verifies it actually worked.

Drag the red button up to your bookmarks bar, then click it on any playlist page.

The YTSort panel on a YouTube playlist page
Install

Three ways to run it.

All three run the same engine. Pick whichever fits how you browse. Nothing is sent anywhere; it only talks to YouTube, using your own login.

Easiest 01 · BOOKMARKLET

Drag & go

A single bookmark that loads the latest version on the fly. Nothing to install or update; drag it once and it stays current forever.

Recommended 02 · USERSCRIPT

Tampermonkey

Install once in Tampermonkey or Violentmonkey and it auto-updates. The panel is there every time you open a playlist, no clicking a bookmark.

03 · EXTENSION

Chrome / Edge

A zero-permission extension from the Chrome Web Store. Install it once and the panel is just there on every playlist page.

Prefer to add the bookmarklet by hand? Copy the code
Features

Fast, and honest about it.

A ground-up rebuild (v5) engineered to be quick and to prove its work, so it never silently half-finishes.

Actually fast

Sorts through YouTube's own reorder API. A 300-video playlist finishes in seconds, not minutes.

Verified

Re-reads the final order from YouTube's servers and only says "done" when it's truly sorted.

🔀

Either direction

Shortest-first or longest-first, with an alphabetical tiebreaker for equal-length videos.

📃

Whole playlist

Reads every video, not just the handful currently loaded on screen.

🔍

Dry run

Preview the exact before/after order first, then apply it with one click.

🎯

Length filters

Only sort videos within a duration range; everything else moves to the end.

📊

Stats & CSV

Total, average, shortest and longest at a glance. Export the whole list to CSV.

🌗

Light & dark

Matches YouTube's theme automatically, panel and all.

🛟

Drag fallback

If the fast path is ever unavailable, it falls back to a verified drag-and-drop engine.

How to use

Four steps, then walk away.

1

Open a playlist you own

Any playlist you created, or your Watch Later. You can only reorder playlists that are yours.

2

Set "Sort by" to Manual

YouTube only allows reordering in Manual mode. The panel reminds you if you forget.

3

Open the YTSort panel

It appears just below the playlist header. Pick shortest or longest first, and a scope if you want.

4

Hit Sort

Watch the log. When it verifies the new order it refreshes the page so you see the result immediately.

Keep it on "Manual" afterward. Switching back to an automatic sort (Date added, and so on) discards the custom order you just built.
A look inside

Everything in one small panel.

YTSort in dark mode on a playlist
YTSort settings
Playlist duration stats