# 12 hour to 24 hour converter

## World's simplest time tool

With this browser-based application, you can convert time from a 12-hour system to a 24-hour system. Given one or more 12-hour clock times in the range 0-12 with the am/pm time-of-the-day indicators, it converts them to the 00-24 format. It can also pad hours, minutes, and seconds with a zero to make them two digits long and in case of missing seconds or minutes, add them back. Created by computer nerds from team Browserling.

Announcement
Check out our new project!

We just launched a new site – Online GIF Tools – a collection of utilities for quickly editing GIFs. Check it out!

A link to this tool, including input, options and all chained tools.

Can't convert.

12 hour to 24 hour converter tool
What is a 12 hour to 24 hour converter?

This is a quick online program for changing the 12-hour time format to the 24-hour time format. It parses all the input time values one-by-one and if a value contains the "am" abbreviation, then it knows that this clock time is from 0-12 (night/morning), but if a value contains the "pm" abbreviation, then this time is from 12-24 (afternoon/evening). If there is no "am" or "pm" symbol, then it's "am" time. If it's "pm" time, then the utility simply adds 12 hours to each clock time and removes the "pm" abbreviation. For example, 2:00pm is converted to 14:00 and 2:00am is converted to 2:00. The program supports full double-digit time format for hours, minutes, and seconds (HH:MM:SS) and non-full time format (H:M:S). In the output, you can preserve the original time format, add zero-padding to single-digit time units, and if the input time doesn't include minutes or seconds, add zero time units in their place. Timeabulous!

12 hour to 24 hour converter examples
Click to use

Hours to 24hr Format

In this example, we load a list of 12-hour time values that only have the hours component. The hour values with the same magnitude but different am/pm indicators are grouped together to show how the time values change when they are converted to the 24-hour format. We pad output times with zeros and add the missing zero minutes and zero seconds to the hours to get the full time format HH:MM:SS.

1am
1pm
2am
2pm
3am
3pm
5am
5pm
6am
6pm

01:00:00
13:00:00
02:00:00
14:00:00
03:00:00
15:00:00
05:00:00
17:00:00
06:00:00
18:00:00

**Required options**

Use full 24hr format and
always display hours,
minutes, and seconds.

Add zero padding to hours,
minutes, and seconds to
make them two digits long.

24 Hour HH:MM Format

This example converts five clock times in "H:M A.M./P.M." format to the "HH:MM" 24-hour format. To convert the P.M. values to 24-hour format, it adds 12 hours to each "H" value. The A.M. values are not changed as on both 12-hour and 24-hour clocks the hours are equal. To output the time in "HH:MM" format, the padding option is activated.

4:50 P.M.
9:1 A.M.
9:1 P.M.
10:50 A.M.
11:59 P.M.

16:50
09:01
21:01
10:50
23:59

**Required options**

Use full 24hr format and
always display hours,
minutes, and seconds.

Add zero padding to hours,
minutes, and seconds to
make them two digits long.

Preserve Time Format

In this example, we enter multiple clock times in H:M:S, H:M, and H formats with different am/pm indicators. As we have disabled both options, the conversion algorithm preserves the input time format and doesn't change it in the output. Hours stay hours, hours:minutes stay hours:minutes, and hours:minutes:seconds stay hours:minutes:seconds.

1am
1pm
1:1am
1:1pm
1:1:1am
1:1:1pm

1
13
1:1
13:1
1:1:1
13:1:1

**Required options**

Use full 24hr format and
always display hours,
minutes, and seconds.

Add zero padding to hours,
minutes, and seconds to
make them two digits long.

Pro tips
Master online time tools

You can pass input to this tool via

__?input__query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!
https://onlinetimetools.com/convert-12hr-to-24hr

__?input__=1am%0A1pm%0A%0A2am%0A2pm%0A%0A3am%0A3pm%0A%0A5am%0A5pm%0A%0A6am%0A6pm&full-time=true&padding=true
All time tools

Quickly convert clock time in H:M:S format to seconds.

Quickly convert seconds to clock time in H:M:S format.

Quickly convert time in 24 hour format to 12 hour format.

Quickly convert time in 12 hour format to 24 hour format.

Quickly find how many hours are in the given days.

Quickly find how many days are in the given hours.

Quickly find how many seconds have passed since midnight.

Quickly find how many seconds are left till midnight.

Quickly find the difference between two clock times.

Quickly find the difference between two calendar dates.

Quickly add hours, minutes, and seconds to the given time.

Quickly subtract hours, minutes, and seconds from the given time.

Quickly add days, months, and years to the given date.

Coming soon
These time tools are on the way

Draw a Clock

Draw an analog or digital clock.

Draw a Calendar

Draw a daily, monthly, or yearly calendar.

Create an Animated Timer

Draw an animation that counts down (or up) time.

Swap Clock Hands

Swap a clock's hour hand with minute hand.

Reverse Clock Time

Find the reverse of the given clock time.

Invert Clock Time

Find the inverse of the given clock time.

Truncate Clock Time

Drop seconds, minutes or hours from the given clock time.

Round Clock Time

Round the given clock time up or down.

Decrement Calendar Dates

Subtract days, months, and years from the given date.

Split Time Into Intervals

Split the given time into multiple intervals.

Generate Time Intervals

Generate a list of equal or unequal time intervals.

Generate Valid Clock Times

Generate a list of random valid clock times.

Generate Invalid Clock Times

Generate a list of random invalid clock times.

Generate Valid Calendar Dates

Generate a list of random valid calendar dates.

Generate Invalid Calendar Dates

Generate a list of random invalid calendar dates.

Convert Seconds To Minutes

Find how many minutes are in the given seconds.

Convert Seconds To Hours

Find how many hours are in the given seconds.

Convert Seconds to Days

Find how many days are in the given seconds.

Convert Seconds to Weeks

Find how many weeks are in the given seconds.

Convert Seconds to Months

Find how many months are in the given seconds.

Convert Seconds to Years

Find how many years are in the given seconds.

Convert Minutes to Seconds

Find how many seconds are in the given minutes.

Convert Minutes To Hours

Find how many hours are in the given minutes.

Convert Minutes to Days

Find how many days are in the given minutes.

Convert Minutes to Weeks

Find how many weeks are in the given minutes.

Convert Minutes to Months

Find how many months are in the given minutes.

Convert Minutes to Years

Find how many years are in the given minutes.

Convert Hours To Seconds

Find how many seconds are in the given hours.

Convert Hours to Minutes

Find how many minutes are in the given hours.

Convert Hours to Weeks

Find how many weeks are in the given hours.

Convert Hours to Months

Find how many months are in the given hours.

Convert Hours to Years

Find how many years are in the given hours.

Convert Days to Seconds

Find how many seconds are in the given days.

Convert Days to Minutes

Find how many minutes are in the given days.

Convert Days to Weeks

Find how many weeks are in the given days.

Convert Days to Months

Find how many months are in the given days.

Convert Days to Years

Find how many years are in the given days.

Convert Weeks to Seconds

Find how many seconds are in the given weeks.

Convert Weeks To Minutes

Find how many minutes are in the given weeks.

Convert Weeks To Hours

Find how many hours are in the given weeks.

Convert Weeks to Days

Find how many days are in the given weeks.

Convert Weeks to Months

Find how many months are in the given weeks.

Convert Weeks to Years

Find how many years are in the given weeks.

Convert Months to Seconds

Find how many seconds are in the given months.

Convert Months To Minutes

Find how many minutes are in the given months.

Convert Months To Hours

Find how many hours are in the given months.

Convert Months to Days

Find how many days are in the given months.

Convert Months to Weeks

Find how many weeks are in the given months.

Convert Months to Years

Find how many years are in the given months.

Convert Years to Seconds

Find how many seconds are in the given years.

Convert Years To Minutes

Find how many minutes are in the given years.

Convert Years To Hours

Find how many hours are in the given years.

Convert Years to Days

Find how many days are in the given years.

Convert Years to Weeks

Find how many weeks are in the given years.

Convert Years to Months

Find how many months are in the given years.

Find Week of the Year

Given a calendar date, find which week of the year it is.

Find Day of the Year

Given a calendar date, find which day of the year it is.

Find Day of the Week

Given a calendar date, find which day of the week it is.

Find Leap Years

Print a list of all leap years.

Find Common Years

Print a list of all common years.

Find Age Difference

Find the age difference between two or more people.

Convert a Cat's Age to Human Years

Find how old a human would be if he/she was a cat.

Convert a Human's Age to Cat Years

Find how old a cat would be if it was a human.

Convert a Dog's Age to Human Years

Find how old a human would be if he/she was a dog.

Convert a Human's Age to Dog Years

Find how old a dog would be if it was a human.

Convert a Bird's Age to Human Years

Find how old a human would be if he/she was a bird.

Convert a Human's Age to Bird Years

Find how old a bird would be if it was a human.

Convert Earth Time to Mars Time

Convert clock time on Earth to clock time on Mars.

Convert Mars Time to Earth Time

Convert clock time on Mars to clock time on Earth.

Generate Palindromic Times

Print a list of palindromic clock times.

Generate Palindromic Dates

Print a list of palindromic calendar dates.

Generate Equal H:M:S Times

Print a list of clock times with hrs equal mins equal secs.

Generate Equal Y-M-D Dates

Print a list of calendar dates with yr equal mon equal day.

Calculate Clock Hand Angle

Find the angle between hour hand and minute hand.

Set Clock Hand Angle

Print a list of all clock times with a specific hand angle.

Format a Clock Time

Given a clock times in any formats, convert it to another format.

Format a Calendar Date

Given a calendar date in any formats, convert it to another format.

Normalize Clock Times

Given clock times in various formats, convert them to one format.

Normalize Calendar Dates

Given calendar dates in various formats, make them the same format.

Spell Clock Times

Write out clock times in full text format.

Spell Calendar Dates

Write out calendar dates in full text format.

Create Zalgo Time

Generate date and time that only Zalgo can understand.

Subscribe!
Never miss an update

Cool!

Notifications
We'll let you know when we add this tool

Cool!