Timestamp Converter
Convert Unix timestamps (seconds or milliseconds, auto-detected) to dates and back, with time zones, ISO 8601, RFC 2822 and relative time.
Current Unix time
Seconds
Milliseconds
Epoch → date
Date → epoch
Enter a date and time.
Convert Unix timestamps (seconds or milliseconds, auto-detected) to dates and back, with time zones, ISO 8601, RFC 2822 and relative time.
Seconds
Milliseconds
Enter a date and time.
Converts between Unix timestamps (seconds and milliseconds) and human-readable dates and times.
Enter a timestamp or a date.
Choose a time zone.
Copy the converted value.
Auto-detect judges by the size of the number. Around 10 digits (below 1e11) is read as seconds, around 13 digits as milliseconds, and longer values as microseconds or nanoseconds. If the result looks wrong, choose the unit yourself and check again.
Enter a date and time in the Date → Epoch box and you get Unix seconds and milliseconds plus an ISO 8601 value in UTC. The value changes for the same date depending on whether you interpret it in your own time zone, a selected time zone or UTC.
If you store seconds in a 32-bit integer, the limit is 2147483647 (January 19, 2038, 03:14:07 UTC), and values overflow after that. You can click that value in the example buttons above to see the date right away. Systems that use 64 bits are not affected.
It is a number counting the seconds elapsed since 00:00:00 UTC on January 1, 1970. For example, 1700000000 is 2023-11-14 22:13:20 (UTC), which is 2023-11-15 07:13:20 in Korean time. A single number points to the same moment regardless of time zone, so it is widely used in servers and databases.
In seconds it is mostly 10 digits, and in milliseconds 13 digits. JavaScript's Date.now() returns milliseconds, so you get 13 digits. This tool tells seconds from milliseconds automatically by the number of digits.
In 2023-11-14T22:13:20Z, the Z at the end means UTC. Korean time is written with the difference from UTC, as in 2023-11-15T07:13:20+09:00. The two are different ways of writing the same moment.
If you leave out the time zone and write only the date and time (2023-11-15 07:13:20), nobody can tell which country it refers to, and a server and a client may read it differently. It is safer to include the time zone in values you exchange.
If a timestamp in seconds is stored as a signed 32-bit integer, the maximum is 2,147,483,647, which is 2038-01-19 03:14:07 (UTC). Past that moment the value overflows and wraps back to a past date, so older systems need to move to 64 bits.
When checking the format of old equipment or database columns, entering a date after 2038 will show whether this problem exists.
The number of digits usually tells you. For values from the present era, 10 digits means seconds and 13 digits means milliseconds.
This tool detects seconds, milliseconds, microseconds and nanoseconds automatically from the size of the value, and you can also pick the unit yourself.
10 digits
13 digits
16 digits
19 digits
1700000000 is November 14, 2023, 22:13:20 in Coordinated Universal Time, which is 7:13:20 a.m. on November 15 in Korean time.
Korea Standard Time is 9 hours ahead of UTC, so you just add 9 hours.
0
1000000000
1234567890
2000000000
2147483647
If the date comes out near 1970, it is a sign you entered the wrong unit.
Reading the seconds value 1700000000 as milliseconds gives about 19.7 days, which lands around January 20, 1970.
In the opposite case, reading a milliseconds value as seconds puts the year tens of thousands of years ahead. That is why automatic unit detection is useful.
It is because the reference moment changes depending on which time zone you use to interpret the date-and-time string.
Reading 2023-11-15 00:00:00 as Korean time gives 1699974000, while reading it as UTC gives 1700006400, a difference of 32,400 seconds (9 hours).
In this tool you can choose the interpretation basis from your own time zone, a selected time zone or UTC.
The unit is seconds or milliseconds depending on the language and function, so check the return unit first.
JavaScript
Java
Python
PHP
MySQL
No. Unix time always treats a day as 86,400 seconds and does not account for leap seconds separately.
That keeps date arithmetic simple, but at the moment a leap second is inserted, systems handle it in slightly different ways.
Time values in a JWT such as exp and iat are Unix time in seconds.
Enter the exp value from a decoded token into this tool and you can see right away, as a human-readable date, when it expires.
If you mistake it for milliseconds when comparing, the expiry check will go wrong, so make sure the units match.
Most of the time the time zone notation differs or daylight saving time is in effect.
A negative value is a moment before January 1, 1970.
For example, -86400 points to midnight on December 31, 1969.
Some systems do not support negative values, though, so check that it fits your environment.
From one value you can check several notations at once and copy each one.
It shows the current Unix time in real time, and all calculations happen inside your browser.
Dividing a seconds value by 86,400 gives the number of days elapsed since January 1, 1970.
Dividing 1700000000 by 86,400 gives about 19,675 days, and the remainder is the time elapsed within that day. Calculating by hand is tedious, so a converter is more accurate.
1 minute
1 hour
1 day
1 week
365 days
At the top of this tool the current Unix time is shown in real time in seconds and milliseconds, and you can grab it with the copy button.
If the constantly changing value is inconvenient, pause it before copying, or use the Use this value button to put it in the conversion box below and check it as a date.
A timestamp is a single moment independent of time zone, while a date string is ambiguous without time zone information.
Unix timestamp (number)
ISO 8601 + offset
Date string without offset
For a service with users in many countries, a common approach is to store in UTC and apply a time zone only when displaying.
Enter the year, month, day and time in the date box and choose the time zone to interpret it in, and the seconds and milliseconds values appear.
For time zones, regional names such as Asia/Seoul are safer than offsets such as +09:00 because they also handle daylight saving changes.
Korea Standard Time is UTC+9 with no daylight saving, but when comparing with US or European times, use regional names so seasonal changes are reflected.
Korea
Japan
United Kingdom
US East
RFC 2822 is the email header format, written in the order day of week, day, month, year, time and time zone.
For example it looks like Tue, 14 Nov 2023 22:13:20 +0000, and this tool also shows this format in the conversion result.
ISO 8601 puts the year, month and day first, like 2023-11-14T22:13:20Z, which makes it good for sorting and parsing.
A 32-bit signed integer can represent only up to January 19, 2038, while 64 bits can hold values out to hundreds of billions of years.
Old systems and some database columns are still 32-bit, so storing a far-future expiry date can cause errors.
32-bit signed integer
32-bit unsigned integer
64-bit signed integer
You can check 2147483647 right away with this tool's popular-value button.
Subtracting two timestamps gives the difference in seconds, and dividing that by 60, 3,600 or 86,400 gives minutes, hours or days.
For example, 1700086400 minus 1700000000 is 86,400 seconds, which is exactly one day.
If the units differ the calculation goes wrong, so convert both values to seconds or both to milliseconds before subtracting.
Most mistakes come from three things: units, time zones and data types.
Divide the seconds value by 86,400, add January 1, 1970, and change the cell format to a date.
In Excel you can write it as =A1/86400+DATE(1970,1,1), and if you need a time zone adjustment, add 9/24 to match Korean time.
For a milliseconds value, first divide by 1,000 to get seconds, then calculate.
To get the order of events right, you need to unify every log's times to the same unit and time zone.
In a distributed system, even a few seconds of clock drift can make the order of events look swapped.
Korea Standard Time is 9 hours ahead of UTC, so adding 9 hours to a UTC time gives the Korean time.
3 p.m. UTC is midnight the next day in Korean time, and conversely 9 a.m. Korean time is 0:00 UTC.
Around the hours when the date rolls over, a one-day difference is easy to get, so when you aggregate by day, decide which time zone's day you mean.