Time Format Converter
Convert between 12-hour (AM/PM) and 24-hour time formats — batch, one per line.
Mode
12-hour vs 24-hour time formats
The 12-hour format uses AM (ante meridiem) and PM (post meridiem). Noon is 12:00 PM and midnight is 12:00 AM — a common source of confusion. The 24-hour format (used in aviation, healthcare, military) runs 00:00–23:59: noon is 12:00, midnight is 00:00. This tool converts either direction and handles optional seconds (HH:MM:SS).
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Converting a batch of 12-hour times from a schedule into the 24-hour form a system expects.
- Reading a 24-hour timetable for an audience that uses AM and PM.
- Normalising times pasted from several sources into one format before importing them.
- Checking that a midnight or noon value is being interpreted correctly.
- Converting shift times for a rota that spans midnight.
Frequently Asked Questions
- How do 12- and 24-hour formats map at the boundaries?
- Midnight is 00:00 and 12:00 AM; noon is 12:00 and 12:00 PM. That 12 AM/PM inversion is the single most error-prone point in the conversion, and it is why schedules often say "12 noon" explicitly.
- Should AM and PM be capitalised?
- Style guides differ — Chicago prefers lowercase with periods (a.m.), AP prefers lowercase, many technical contexts use capitals. It is a house-style choice, not a correctness one.
- Why is ISO 8601 preferred for storage?
- Because it is unambiguous, sorts lexicographically, and has no locale variants. 2024-03-15T14:30:00Z means one instant everywhere, where "3/15/24 2:30" means two different days depending on the reader.
- Is 24:00 a valid time?
- Yes, in ISO 8601 — it denotes end-of-day and equals 00:00 of the next day. Many parsers reject it, which is why it appears in specifications and rarely in practice.
- How do I display duration versus time of day?
- Differently. A time of day wraps at 24 hours; a duration does not, so a 30-hour task is legitimately "30:00" and formatting it as a clock time silently turns it into 6:00.
- What does 12:00 AM actually mean?
- Midnight, at the start of the day — which is why it is genuinely confusing and why timetables prefer 00:00 or say "midnight". 12:00 PM is noon, and the two are the most misread values in the format.
- Does the format vary by locale?
- Considerably. Most of the world writes 24-hour time by default, and the separator differs — a period in several European locales rather than a colon. Formatting through the locale rather than by hand is what gets this right.
Common errors and gotchas
- Getting midnight wrong. 12 AM is 00:00 and 12 PM is noon, which is the single most common error here.
- Assuming a leading zero is optional, when many systems require a fixed two-digit hour.
- Losing the date when a time crosses midnight, so 00:30 belongs to the following day.
- Mixing 24:00 and 00:00, which some standards allow as an end-of-day marker and others reject.
- Converting without the time zone, which makes the result ambiguous the moment it is shared.
Related Converters tools
JSON to YAML
Convert JSON into clean, readable YAML instantly.
YAML to JSON
Convert YAML configuration into valid JSON.
JSON to XML
Convert JSON structures into nested XML markup.
HWB to HEX Converter
Convert an HWB color to HEX.
JSON to SQL
Turn a JSON array of objects into SQL INSERT statements.
CSV to XML
Convert CSV rows into structured XML records.
XML to CSV
Flatten repeated XML records into CSV rows.
INI to JSON
Parse INI config sections and keys into JSON.