Unix timestamp converter
Runs in your browser; nothing is uploaded
Convert Unix timestamps in seconds, milliseconds, microseconds or nanoseconds to dates in any time zone, and back.
Timestamp or date
Numbers are read as seconds, milliseconds, microseconds or nanoseconds by their size. Date strings can be ISO 8601 or RFC 2822.
Date and time to timestamp
Pick a date
What is a Unix timestamp?
A Unix timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970, the Unix epoch. 0 is the epoch itself, 1700000000 is 14 November 2023, and negative numbers are dates before 1970.
A timestamp has no time zone: 1721234567 is the same instant everywhere, and comparing or sorting times is comparing numbers. A time zone only matters when the instant is shown on a clock, which is why the converter shows UTC and the zone you pick side by side.
Watch the unit. Unix tools and most backends use seconds; JavaScript's Date.now() and many Java APIs use milliseconds; Go, databases and tracing systems often use microseconds or nanoseconds. For current dates that is 10, 13, 16 or 19 digits. Reading one as another gives a date in 1970 or thousands of years from now.
How to use this tool
- 1Paste a timestamp or a date into the Timestamp or date field, or press Now (Alt+N) for the current time.
- 2Numbers are read as seconds, milliseconds, microseconds or nanoseconds from their number of digits; the line under the field says which. If the guess is wrong, pick the unit.
- 3Date strings can be ISO 8601 (
2024-07-17T16:42:47Z, with or without an offset) or RFC 2822 (Wed, 17 Jul 2024 16:42:47 +0000). A date without an offset is read in the selected time zone. - 4Read the result in every unit, as ISO 8601 in UTC and in the selected time zone, as RFC 2822, as a readable date, relative to now and as an ISO week. Each row has a copy button.
- 5To go the other way, pick a date, a time and a time zone under Date and time to timestamp.
Troubleshooting
- The date comes out in January 1970
- The value is probably milliseconds or smaller units read as seconds, or seconds read as milliseconds. Check the unit line under the field and pick the right unit.
- This time doesn't exist in the selected time zone
- When clocks go forward for daylight saving time, an hour is skipped; for example 02:30 on 31 March 2024 never happened in Berlin. Pick a time outside the gap, or use UTC.
- Two timestamps for one date and time
- When clocks go back, an hour happens twice, so a local time in that hour names two instants an hour apart. Both are shown; systems usually take the first unless told otherwise.
- Outside the range dates can represent
- JavaScript dates cover the years −271821 to 275760. A value beyond that is usually in a smaller unit than chosen; try milliseconds or nanoseconds.
Frequently asked questions
How do I tell seconds from milliseconds?
Count the digits. Dates between 2001 and 2286 have 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter uses this rule and says which unit it chose.
Do Unix timestamps have a time zone?
No. A timestamp counts from the epoch in UTC, so it identifies the same instant everywhere. ISO 8601 strings carry an offset such as +05:30, which says what the local clock showed at that instant.
Do timestamps count leap seconds?
No. Unix time treats every day as exactly 86,400 seconds, so a leap second such as 23:59:60 has no timestamp of its own. The converter reads second 60 as 59 and says so.
What is the year 2038 problem?
Systems that store timestamps as signed 32-bit integers can only count to 2147483647, which is 03:14:07 UTC on 19 January 2038; after that the value overflows. 64-bit timestamps avoid it.
Where do the time zone rules come from?
From your browser's built-in time zone database (the IANA database, through Intl), so daylight saving changes are as current as your browser. Nothing is fetched.