Convert 12-hour time into 24-hour time

Please log in or register to do it.

This tool converts 12‑hour time into 24‑hour time. It scans your input text for times expressed in the 12‑hour format (e.g., 02:30 PM) and converts them into the 24‑hour format (e.g., 14:30). You can fine‑tune the conversion using the options below: • Basic Conversion – converts every valid 12‑hour time. • Custom Format – applies a custom output format to each converted time. • Period Filter – converts only times that match specified period indicators (e.g., only PM times). • Pattern Filter – converts only times that contain specified substrings. Simply enter your text, choose the conversion mode and adjust its settings as needed, then click the process button.

Conversion Modes:


Scans the text and converts every valid 12‑hour time (e.g., 02:30 PM) into 24‑hour format (e.g., 14:30).

Converts 12‑hour times to 24‑hour format and then applies a custom format to each converted time. Use {time} as a placeholder for the 24‑hour time.

Converts only those times that include the specified period indicator(s). Enter a comma‑separated list (e.g., PM) to convert only PM times.

Converts only those 12‑hour times that contain the specified substring(s). Enter a comma‑separated list (e.g., :45, 12:) to limit conversion.

Examples:

Basic Conversion

Converts all 12‑hour times to 24‑hour format.

Before:
The meeting is at 02:30 PM and lunch is at 12:00 PM.
After:
The meeting is at 14:30 and lunch is at 12:00.

Conversion with Custom Format

Converts times and then formats each converted time using a custom string.

Before:
Event starts at 09:15 AM.
After (Format "Time: {time}"):
Time: 09:15

Conversion with Period Filter

Converts only times with the specified period indicator. In this example, only PM times are converted.

Before:
Breakfast at 08:00 AM, meeting at 03:00 PM.
After (Filter: "PM"):
Breakfast at 08:00 AM, meeting at 15:00.

Conversion with Pattern Filter

Converts only times that contain specified substring(s). In this example, only times containing ":45" are converted.

Before:
The train departs at 10:45 AM and arrives at 01:30 PM.
After (Filter: ":45"):
The train departs at 10:45 and arrives at 01:30 PM.
Convert single quotes into double quotes in code
Convert text to Title Case

Your email address will not be published. Required fields are marked *