Unix timestamp converter
Convert a Unix timestamp to a readable date, or convert a date back to seconds or milliseconds. Choose the time zone used to display and interpret dates; the timestamp still represents the same instant.
This converter supports dates in the UTC range 1900–2100. Seconds can include up to three decimal places, while milliseconds must be whole numbers. The current value comes from your device clock; it is not synchronized over the network.
How to convert a Unix timestamp
- Choose the time zone to use for dates: UTC, Taipei, Tokyo or your device's time zone.
- To convert a timestamp to a date, choose seconds or milliseconds, enter the value and select Convert to date.
- To convert a date to a timestamp, enter YYYY-MM-DD HH:mm:ss, optionally followed by up to 3 millisecond digits as .SSS, then select Convert to timestamp.
- The result shows seconds, milliseconds, UTC and the selected time zone. Convert again after changing an input or setting.
Seconds, milliseconds and time zones
Seconds and milliseconds count from the same Unix epoch; only the unit differs. Seconds can include up to 3 decimal places and milliseconds are whole numbers. Check the source documentation instead of guessing from digit count.
A time zone changes the displayed date, not the instant. If a clock change makes an entered local time nonexistent or repeated, correct it or choose the occurrence shown by the tool.
Related tool
To inspect timestamp data in JSON, you can also use:JSON formatter and validator
Read the date behind a Unix timestamp
Back to toolCheck whether the value is seconds or milliseconds
A timestamp field may contain seconds or milliseconds, and the number alone does not tell you which unit the source intended. Check the field documentation or the program that produced it before converting. This tool asks you to choose the unit instead of guessing from the number of digits.
For example, 2024-01-01 00:00:00 UTC is 1,704,067,200 seconds after the Unix epoch. The same instant is 1,704,067,200,000 milliseconds after the epoch. Since one second contains 1,000 milliseconds, the millisecond value is 1,000 times the seconds value.
Seconds can include up to three decimal places here, which preserves millisecond precision. Milliseconds must be entered as a whole number. Negative values represent instants before 1970-01-01 00:00:00 UTC. Do not remove digits just to make a value shorter; they may be part of the timestamp's precision.
| Input unit | Value | Date in UTC |
|---|---|---|
| Seconds | 1704067200 | 2024-01-01 00:00:00 |
| Milliseconds | 1704067200000 | 2024-01-01 00:00:00 |
| Seconds before the epoch | -1 | 1969-12-31 23:59:59 |
The same timestamp can show as a different local time
A Unix timestamp identifies an instant. A time zone supplies the local date, clock time and UTC offset used to display that instant. Changing the selected zone changes the displayed date and time, not the timestamp itself.
Timestamp 0 is 1970-01-01 00:00:00 in UTC. At that same instant, the date is 1970-01-01 08:00 in Taipei and 1970-01-01 09:00 in Tokyo. If two logs show different local times, first check the zones and units before deciding that the records disagree.
When entering a date, select the zone where that wall-clock time is meant to apply. For instance, enter a Tokyo event time with Tokyo selected. The tool uses time-zone rules supplied by the browser, so historical or future dates can be affected by the version of that data.
| Time zone | Local date and time | Unix timestamp |
|---|---|---|
| UTC | 1970-01-01 00:00:00 | 0 seconds |
| Taipei (UTC+08:00) | 1970-01-01 08:00:00 | 0 seconds |
| Tokyo (UTC+09:00) | 1970-01-01 09:00:00 | 0 seconds |
A clock change can skip or repeat a local time
Some time zones move their clocks forward or back. When clocks move forward, some local times do not occur. For example, 2024-03-10 02:30 did not occur in New York. This converter rejects a skipped local time, so choose a time that actually existed in the selected zone.
When clocks move back, the same local time can occur twice. In New York on 2024-11-03, 01:30 occurred once at UTC−04:00 and again at UTC−05:00. The corresponding Unix values are 1,730,611,800 and 1,730,615,400 seconds. Choose the earlier or later occurrence to say which instant you mean.
This ambiguity applies when converting a local date and time into a timestamp. Converting a timestamp into a date has one instant, so the selected zone can display it without asking you to choose.
| Choice | Local time and offset | Unix timestamp in seconds |
|---|---|---|
| Earlier | 2024-11-03 01:30 at UTC−04:00 | 1730611800 |
| Later | 2024-11-03 01:30 at UTC−05:00 | 1730615400 |
Check the supported range and clock source
The supported timestamp range runs from 1900-01-01 00:00:00 UTC through 2100-12-31 23:59:59.999 UTC. Date inputs must also use a calendar year from 1900 through 2100. If a conversion falls outside the supported range, use another date or a tool that supports that range.
This tool works to the nearest millisecond and does not represent leap seconds. Its current timestamp comes from the device clock and is not checked against a network time service. If a log's clock may have been inaccurate, converting its timestamp cannot verify when the event actually happened.
Input and results are processed in the browser, not uploaded or saved automatically. Refreshing the page clears them. The browser supplies time-zone rules, which can change as time-zone data is updated.
Sources
- MDN: Unix timeDefines the Unix epoch, the usual seconds-based timestamp, the web platform's millisecond values, and the treatment of leap seconds.
- MDN: Date.now()Documents that Date.now() returns milliseconds since 1970-01-01 00:00:00 UTC.
- TC39 Temporal: Time zones and resolving ambiguityExplains how time-zone offset changes can create skipped or repeated local times. This page uses the existing browser Date and Intl APIs, not Temporal.
Updated