Tools

Home
StopwatchCountdown TimerDate DifferenceTimerTimezone Converter

Sort Time Intervals

Sort time intervals by start time, end time, or duration. 100% client-side.

Your files never leave your browser
0
Intervals Sorted
--
Shortest
--
Longest
--
Total Duration
Ready·Enter time intervals to sort

Paste a jumbled list of time ranges — shift blocks, meeting windows, class periods — and sort them by start time, end time, or total duration in one click. Each interval gets its length calculated automatically, so you can spot the longest or shortest slot right away. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste Intervals
➞
Pick Sort Order
➞
Get Sorted Results

Type or paste time intervals one per line using formats like "08:00 - 12:30" or "14:00:00 -> 18:30:00". The tool parses each line, calculates the duration of every interval, then reorders the full list based on your chosen criterion. Intervals that cross midnight (like 23:00 - 02:00) are handled automatically — duration wraps around the 24-hour mark.

Examples

Organizing a meeting schedule

You pulled meeting times from a shared calendar and need them in chronological order.

INPUT
14:00 - 15:30 09:00 - 10:00 11:30 - 12:15 08:00 - 08:45
OUTPUT (Start Time Asc)
08:00 - 08:45 (45m) 09:00 - 10:00 (1h) 11:30 - 12:15 (45m) 14:00 - 15:30 (1h 30m)

Finding the longest shift

A manager needs to spot which employee worked the longest shift this week.

INPUT
06:00 - 14:00 22:00 - 06:00 09:00 - 17:30 12:00 - 18:00
OUTPUT (Duration Desc)
09:00 - 17:30 (8h 30m) 06:00 - 14:00 (8h) 22:00 - 06:00 (8h) 12:00 - 18:00 (6h)

Sorting class periods with seconds

A school admin exported bell times that include seconds and wants them sorted by when each period ends.

INPUT
10:15:00 - 11:00:00 08:30:00 - 09:15:00 13:00:00 - 13:50:00 11:10:00 - 11:55:00
OUTPUT (End Time Asc)
08:30:00 - 09:15:00 (45m) 10:15:00 - 11:00:00 (45m) 11:10:00 - 11:55:00 (45m) 13:00:00 - 13:50:00 (50m)

Who Uses This

💼 Project Managers

Sort sprint meetings and standups into a clean daily timeline.

📈 Shift Supervisors

Rank employee shifts by duration to spot overtime or understaffing.

🎓 Teachers & Admins

Reorder class periods or exam blocks when building a timetable.

💻 Developers

Sort log timestamps or cron windows while debugging time-based jobs.

Common Mistakes

Using 12-hour format instead of 24-hour

Writing "2:00 PM - 5:00 PM" won't work. Drop the AM/PM and use 14:00 - 17:00 instead. The parser expects 24-hour time only.

Missing the separator between start and end

Each interval needs a clear separator: a dash with spaces (08:00 - 12:00), an arrow (08:00 -> 12:00), or the word "to" (08:00 to 12:00). Smushing them together like "08:0012:00" gets skipped.

Putting extra text on the same line

Lines like "Meeting: 09:00 - 10:00" will fail because the tool expects only times and a separator. Strip labels first — just paste the raw time ranges, one per line.

Technical Details

Frequently Asked Questions

How do I sort time intervals by duration?

Paste your intervals, then pick "Duration (Shortest First)" or "Duration (Longest First)" from the dropdown. The tool calculates how long each block lasts and reorders accordingly. You'll see the duration printed next to each interval in the output.

Can I sort time ranges that cross midnight?

Yes. If the end time is earlier than the start time — say 22:00 - 03:00 — the tool treats it as crossing midnight and calculates a 5-hour duration. Sorting still works correctly with these intervals mixed in.

What format should time intervals be in?

Use 24-hour time with a separator between start and end. "09:00 - 17:00" is the most common format. You can also write "09:00 -> 17:00" or "09:00 to 17:00". If you need seconds, "09:00:00 - 17:00:00" works too.

Is this time interval sorter free to use?

Completely free. No signup, no limits on how many intervals you sort, and no ads. The tool runs entirely in your browser so there is nothing to pay for on our end either.

Why are some of my intervals being skipped?

The tool skips any line it can't parse as a valid interval. Common causes: using AM/PM instead of 24-hour time, missing the separator between times, or including extra text like labels on the same line. The status bar shows how many entries were skipped so you can fix them.

Share: