Convert 12-Hour to 24-Hour
Convert 12-hour time format (AM/PM) to 24-hour military time. Handles all edge cases including noon and midnight. 100% client-side.
Drop in any AM/PM time and get the 24-hour equivalent instantly — one at a time or a whole batch at once. Handles the tricky noon and midnight cases (12 AM = 00:00, 12 PM = 12:00) so you don't have to second-guess yourself. And everything runs in your browser. Nothing gets uploaded.
How It Works
AM hours 1 through 11 stay the same — they just get zero-padded. 12 AM flips to 00 (midnight). For PM, hours 1–11 get 12 added, and 12 PM stays as 12. Minutes and seconds don't change at all. The converter handles the edge cases automatically so you don't have to think about them.
Examples
Morning Meeting at a Global Company
Your colleague in Berlin asks you to join a call at "9:30 AM your time" and you need to enter it into a 24-hour calendar app.
9:30 AM
09:30
The Midnight Trap
A server cron job needs to run at midnight. Is that 00:00 or 12:00? This is the conversion that catches people off guard most often.
12:00 AM
00:00
Batch Converting a Flight Itinerary
You have departure and arrival times from a US airline confirmation email. The hotel booking system abroad needs 24-hour format for all of them.
6:15 AM
11:40 AM
3:55 PM
10:20 PM
06:15
11:40
15:55
22:20
Who Uses This
Formatting timestamps for APIs, databases, and log files that require ISO 8601 or 24-hour notation.
Converting AM/PM flight times into 24-hour format for European train schedules and hotel check-ins.
Standardizing messy time columns in spreadsheets before importing into BI tools.
Learning military time for nursing exams, aviation courses, or military prep programs.
Common Mistakes
12 AM is midnight, which is 00:00 in 24-hour format. Not 12:00. This one mistake has caused countless wrong cron jobs and missed alarms. If you remember nothing else: 12 AM = 00:00.
Works for 1 PM through 11 PM, but breaks on 12 PM. Adding 12 to 12 gives you 24:00, which isn't valid. 12 PM is simply 12:00 — no math needed.
Writing "9:30" instead of "09:30" can break parsers that expect exactly two digits. Most systems need that leading zero. This tool always includes it.
Technical Details
- Processing: 100% client-side JavaScript — nothing sent to a server
- Browser Support: Chrome, Firefox, Safari, Edge
- Input Range: Hours 1–12, Minutes 0–59, Seconds 0–59
- Output Format: HH:MM or HH:MM:SS (24-hour, zero-padded)
- Batch Mode: Accepts formats like "2:30 PM", "11:59:45 AM", "7pm"
Frequently Asked Questions
What is 12 AM in 24-hour time?
12 AM is 00:00. Midnight resets the hour counter to zero. It's the start of a new day in 24-hour notation, not hour 12. This catches a lot of people off guard because "12" feels like it should stay "12."
What is 12 PM in 24-hour time?
12 PM is 12:00. Noon doesn't change. It is the one PM time where you don't add 12 — because 12 plus 12 would give you 24, and that's not a valid hour.
Is military time the same as 24-hour time?
Basically yes. Military time uses the 24-hour clock but often drops the colon (e.g., 1430 instead of 14:30) and may append "hours" or "Zulu" for time zones. The hour values themselves are identical.
Why do hospitals use 24-hour time?
Because mixing up AM and PM in a medical setting can be dangerous. A medication scheduled for 2:00 AM versus 2:00 PM is a 12-hour difference. The 24-hour clock removes that ambiguity entirely — 02:00 and 14:00 can't be confused.
Can I convert 24-hour time back to 12-hour?
Not with this tool — this one only goes from 12-hour to 24-hour. But there is a separate 24-hour to 12-hour converter on this site that does exactly that.