Sort Clock Times screenshot

Sort Clock Times

Sort a pasted list of clock times ascending or descending by comparing seconds since midnight, not strings.

Privacy First
0 Runs
Updated 2026-11-06
No upload
No signup
Runs in this tab

Sorted as times, not as text

Paste times separated by spaces, commas or new lines and choose ascending or descending. Each token is parsed as 24-hour H:MM, HH:MM or HH:MM:SS, with an optional am or pm suffix attached or spaced, reduced to seconds since midnight and sorted numerically. That is why 09:05 stays before 10:00, which a plain string sort gets wrong.

An hour above 23, a minute or second above 59, a 12-hour hour outside 1–12 or a token that is not a time at all is refused with the token and its position named, rather than silently dropped. Seconds are printed only when at least one input carried them, so a list of HH:MM times comes back as HH:MM.

Parsing and sorting happen in this tab. Nothing is uploaded, no list is stored, and the same text always prints the same order.

Sort a pasted list of clock times ascending or descending by comparing seconds since midnight, with 12-hour suffixes resolved first.

It reads only the text you paste: no clock is read, no list is stored, and a token that is not a time is refused with its position.

How to use Sort Clock Times

Paste the list into the clock times box, in 12-hour or 24-hour form — the two can be mixed in one list.

Set Order to ascending or descending and press Run to get the sorted times.

Read the refusal if one arrives from Run: a token that is not a time is named with its position rather than dropped.

Parse, then sort

Each token becomes seconds since midnight. A 12-hour suffix is resolved first: 12:30am is 00:30 and 3:05pm is 15:05. Only then are the numbers sorted, so 12-hour and 24-hour inputs can be mixed in one list.

Seconds are printed only when at least one input carried them. A list of HH:MM times comes back as HH:MM rather than gaining a trailing :00 that was never there.

What to Expect

Best for

  • Tidying a schedule or a log excerpt pasted from anywhere.
  • Checking a list that a text sort scrambled.

What this tool keeps

  • The parsing and the sort happen in this tab and the list is never posted, so the page works offline and keeps nothing.

Sample input

09:30, 14:05, 07:45

Sample output

3 times, ascending. 07:45 09:30 14:05 Times are compared as seconds since midnight, so 09:05 stays before 10:00.

Frequently asked questions

Which time formats are accepted?

H:MM, HH:MM and HH:MM:SS, each with an optional am or pm suffix attached or spaced. Every token is reduced to seconds since midnight before anything is compared.

Why does it sort differently from a text sort?

Because it compares seconds, not characters. A text sort puts 10:00 before 09:05; this page puts 09:05 first, which is the order a clock has.

What is refused?

An hour above 23, a minute or second above 59, a 12-hour hour outside 1–12, or a token that is not a time at all — each refusal names the token and its position. Nothing is uploaded.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.