Unix Timestamp Converter
Unix Timestamp Converter
This is a date and time tool that allows you to convert between Unix timestamps and dates/times. It features automatic detection of seconds and milliseconds, automatic visitor time zone detection, time zone selection for input dates and times, ISO 8601, RFC 2822, relative time, and a simple collection of frequently used date and time buttons.
Results
What is a Unix Timestamp Converter?
The Unix Timestamp Converter is an online tool for converting between Unix timestamps (epoch seconds) and human-readable dates and times.A Unix timestamp is a format that represents a date and time as the number of seconds elapsed since January 1, 1970, 00:00:00 UTC, and is used in many development environments, including API responses, logs, databases, JavaScript, PHP, and Python.However, looking at a number like 1717046400 alone does not intuitively reveal what date and time it represents. With this tool, you can simply enter a timestamp to view it in multiple formats at once, including UTC, the viewer’s time zone, ISO 8601, and RFC 2822.
In JavaScript, `Date.now()` returns a value in milliseconds, so you often deal with 13-digit timestamps like 1717046400000. On the other hand, PHP’s `time()` and many Unix-based tools use values in seconds, typically around 10 digits long.If this difference is misunderstood, dates and times may be significantly off or treated as unnatural dates in the future or past. This tool automatically detects seconds and milliseconds and displays both values simultaneously, making it easier to prevent mix-ups in API specifications and log investigations.
When converting a date and time to a timestamp, it is important to determine which time zone the entered date and time should be interpreted as. Even for the same "2026-06-13 12:00:00," the resulting Unix timestamp will differ depending on whether it is treated as UTC, Europe/London, or America/New_York.This tool allows you to select the time zone for the input date and time. The default is the time zone detected from the user’s browser, making it easy for users worldwide to use the tool based on their local time.
The time zone options display as many IANA time zones supported by the browser as possible. To make it easy to select from a large list of options, we’ve used a search-based input field where you can type text to narrow down the choices, rather than a standard dropdown menu.Users can select a time zone by entering city names, region names, or time zone IDs such as America/New_York, Europe/London, or Asia/Singapore, reducing the burden of searching through a long list. This makes it easier to identify misunderstandings caused by time zone differences when integrating with overseas services, checking server logs, or verifying reservation times.
Additionally, even if the results are displayed off-screen, the page automatically scrolls to the results area after the conversion. This prevents users from missing changes to the results at the bottom of the page after performing an action near the input field.Furthermore, we provide presets such as "Current Time," "Today at 0:00," "Tomorrow at 0:00," and "The 1st of this month," allowing you to enter frequently used dates and times with a single click. Sample code for development is also displayed, so you can not only verify the conversion results but also use it as a reference when handling the same values in JavaScript, PHP, or Python.
- You can convert Unix timestamps to dates and times.
- You can convert dates and times to Unix timestamps.
- Automatically detects timestamps in seconds and milliseconds.
- Automatically sets the viewer's browser time zone as the default.
- You can specify which time zone to use when interpreting date and time strings.
- The search-based time zone input allows you to select from a wide range of IANA time zones.
- You can view both UTC and the visitor's time zone at the same time.
- Displays ISO 8601, RFC 2822, relative time, and elapsed time.
- You can enter frequently used dates and times, such as the current time or the first day of the month, with a single click.
How to use
To convert a timestamp to a date and time, enter a Unix timestamp in seconds (e.g., 1717046400) or a timestamp in milliseconds (e.g., 1717046400000) in the input field. The conversion mode can usually be left set to "Auto-detect."The tool will determine whether the value is in seconds or milliseconds based on the number of digits and format, and convert it to formats such as UTC, the viewer’s time zone, or ISO 8601. If you want to explicitly treat the value as a timestamp, select “Timestamp → Date.”
To convert a date and time to a Unix timestamp, enter a date and time string such as 2026-06-13 12:34:56, 2026-06-13T12:34:56, or 2026/06/13 12:34.If the date/time string does not include a time zone specification such as "Z" or "+09:00," it will be interpreted as the date and time for the region selected in "Time Zone for Input Date/Time." The default value is the time zone detected from the viewer's browser. If your server or API specifications are based on UTC, select UTC; if you are handling reservation times for a specific region, select that region's IANA time zone.
The conversion results display Unix Timestamp (seconds), Unix Timestamp (milliseconds), UTC, the viewer’s time zone, ISO8601, RFC2822, relative time, and elapsed time. Each value can be copied individually, and you can also copy them all at once or download them as a text file.If the results area is off-screen, the page automatically scrolls after conversion, making it difficult to lose track of the results even on a smartphone.
- Enter a timestamp or date/time string.
- Select the conversion mode as needed.
- When entering a date and time, verify the time zone for the date and time being entered.
- Click "Convert" to view the results.
- Verify the required formats, such as seconds, milliseconds, UTC, visitor time zones, and ISO 8601.
- Copy or download this for use in log analysis or development work.
Important notes when using
- Unix timestamps are generally based on UTC. The date and time displayed will vary depending on the time zone.
- JavaScript's `Date.now()` returns milliseconds, while PHP's `time()` returns seconds. Please be aware of the difference in precision.
- If a date and time string does not include a time zone, it will be interpreted based on the region selected as the time zone for the input date and time.
- The viewer's time zone depends on their browser or device settings. If the device settings are incorrect, the default value will also be affected.
- In regions with daylight saving time, the difference from UTC may vary depending on the date, even within the same region. Selecting an IANA time zone makes it easier to perform conversions that account for daylight saving time.
Frequently Asked Questions
What is a Unix timestamp?
A Unix timestamp is a numerical value representing a date and time as the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. It is widely used in APIs, logs, databases, and for managing dates and times within programs.
Does this mean the same thing as "Epoch time"?
In many cases, "Unix time," "Unix timestamp," and "Epoch time" are used almost interchangeably. All three terms refer to a format that represents the elapsed time since the Unix epoch.
What is the difference between seconds and milliseconds?
Timestamps in seconds are typically around 10 digits long, while those in milliseconds are typically around 13 digits long. JavaScript's `Date.now()` returns milliseconds, while PHP's `time()` returns seconds.
How is the visitor's time zone determined?
It automatically detects the time zone using the browser's time zone information. This is typically based on the regional settings of the device or operating system you are using.
What is the time zone for the entry date and time?
This setting determines which region's time should be used to interpret a date and time string if it does not include a time zone specification.
Why do the results differ between UTC and the viewer's time zone?
Although Unix timestamps are based on UTC, the displayed time varies depending on the time zone. This is because the time zone’s difference from UTC and daylight saving time are taken into account.
What should I enter in the search-based time zone input field?
Please enter part of an IANA time zone name (such as America/New_York, Europe/London, or Asia/Singapore) or a city name and select from the suggestions.
What is ISO 8601?
ISO 8601 is a standard format for representing dates and times. For example, it is written as 2026-06-13T12:34:56Z and is commonly used in APIs and configuration files.
What is RFC 2822?
The RFC 2822 format is commonly used in email headers and HTTP-related date and time notations. For example, it is displayed as Sat, 13 Jun 2026 12:34:56 GMT.
What can relative time be used for?
Relative time can be used to determine how many days before or after the present the entered date and time falls. It is useful for checking deadlines, log timestamps, and reservation times.
What if the entered date and time cannot be converted?
Please check date separators, time formats, non-existent dates, and invalid time zone specifications. It’s easiest to start by testing with sample input or the YYYY-MM-DD HH:mm:ss format.
Does this tool send input values to the server?
The conversion process is intended to be performed using JavaScript in the browser. However, please exercise extreme caution when handling URLs or strings that contain highly sensitive logs, personal information, or authentication credentials.
What should be entered in the "Current Time" button?
The "Current Time" button enters the current time obtained from your browser. This is useful when you want to quickly check the current Unix timestamp or ISO 8601 format.
Can you also check how to retrieve the current Unix timestamp in the program?
Yes. We will display simple code examples in JavaScript, PHP, and Python in the results section. You can use these, along with the translation results, as a reference when implementing the code.