How to use the Unix timestamp converter
- To read a timestamp, paste it into the first tab. The tool works out whether it is in seconds, milliseconds, microseconds or nanoseconds, and shows the date in UTC, in your local time and as ISO 8601.
- To make a timestamp, switch to Date → timestamp, pick a date and time, and say whether it is UTC or your local time zone.
- The box at the top shows the current Unix time, ticking every second, with buttons to copy it in seconds or milliseconds.
Every row in the results table has its own Copy button, which is useful for pasting into code, a database query or a log search.
What a Unix timestamp is
A Unix timestamp counts the seconds that have passed since 00:00:00 UTC on 1 January 1970, a moment called the Unix epoch. Because it is a single number that is the same everywhere in the world, programmers use it to store and compare moments in time without worrying about time zones, calendars or daylight saving. Converting it to a readable date is only needed when a person has to look at it.
days since 1970-01-01 = timestamp ÷ 86,400 the time of day is the remainder, as hours, minutes and seconds
Unix time ignores leap seconds: every day is exactly 86,400 seconds, so the number is a clean count that is easy to do arithmetic on. Adding 86,400 always moves forward by one UTC day, and subtracting two timestamps always gives an elapsed time in seconds.
Seconds, milliseconds and beyond
| Unit | Typical digits (year 2025) | Where you see it |
|---|---|---|
| Seconds | 10 | Unix tools, databases, JWT expiry (exp), most APIs |
| Milliseconds | 13 | JavaScript Date.now(), Java, many JSON APIs |
| Microseconds | 16 | Python datetime on some systems, PostgreSQL internals |
| Nanoseconds | 19 | Go time.UnixNano(), high-resolution logs |
The converter picks the unit from the size of the number: below 10¹¹ it is read as seconds (which covers dates until the year 5138), below 10¹⁴ as milliseconds, below 10¹⁷ as microseconds, and larger values as nanoseconds. A 13-digit number pasted by mistake into a seconds field would point to the year 55000, which is the usual sign of a milliseconds mix-up.
Worked examples
| Timestamp (seconds) | UTC date and time | Why it matters |
|---|---|---|
| 0 | Thu, 1 Jan 1970 00:00:00 | The epoch |
| 1000000000 | Sun, 9 Sep 2001 01:46:40 | The “billennium” |
| 1700000000 | Tue, 14 Nov 2023 22:13:20 | A round number often used in examples |
| 1735689600 | Wed, 1 Jan 2025 00:00:00 | Start of 2025 in UTC |
| 2147483647 | Tue, 19 Jan 2038 03:14:07 | Largest value in a signed 32-bit integer |
To check one by hand: 1,735,689,600 ÷ 86,400 = 20,089 days after 1 January 1970, and 20,089 days is exactly 55 years (20,089 = 55 × 365 + 14 leap days), which lands on 1 January 2025 with no time left over.
The year 2038 problem
Older systems store Unix time in a signed 32-bit integer, which runs out at 03:14:07 UTC on 19 January 2038. One second later the value wraps to a large negative number, which software reads as December 1901. Modern systems use 64-bit integers, which will not overflow for about 292 billion years, but embedded devices, old databases and file formats with 32-bit fields still need checking. If you maintain such a system, test it with the timestamp 2147483648 using this converter to see what a correct reading should be.
Using timestamps in code
| Language | Current time in seconds | Convert to date |
|---|---|---|
| JavaScript | Math.floor(Date.now() / 1000) | new Date(ts * 1000).toISOString() |
| Python | int(time.time()) | datetime.fromtimestamp(ts, timezone.utc) |
| PHP | time() | gmdate('c', $ts) |
| Java | Instant.now().getEpochSecond() | Instant.ofEpochSecond(ts) |
| SQL (PostgreSQL) | EXTRACT(EPOCH FROM now()) | to_timestamp(ts) |
| Shell (Linux) | date +%s | date -u -d @$ts |
The most common bug is mixing units. JavaScript counts in milliseconds, so passing a seconds timestamp straight to new Date() gives a date in January 1970. Multiply by 1000 first. The reverse mistake, treating a millisecond value as seconds, gives a date tens of thousands of years in the future.
Accuracy and limits
Conversions are exact to the millisecond. Local time uses the time zone setting of your device. The tool shows dates between the years 1 and 9999 that a browser can represent; values beyond that show an error. Because Unix time ignores leap seconds, the real elapsed time between two timestamps that span a leap second is one second longer than the difference suggests.
Frequently asked questions
What is the current Unix timestamp?
It is shown at the top of the tool and updates every second. In 2025 it is a 10-digit number beginning with 17.
How do I convert a Unix timestamp to a date?
Paste it into the first tab. The tool reads the unit automatically and shows the UTC date, your local date and the ISO 8601 form.
How can I tell whether a timestamp is in seconds or milliseconds?
Count the digits. Ten digits is seconds, thirteen is milliseconds, sixteen is microseconds. The tool applies this rule for you and tells you which one it used.
Does a Unix timestamp depend on the time zone?
No. It is the same moment everywhere. Only the display of that moment as a date and clock time depends on the time zone.
What happens on 19 January 2038?
Systems that store Unix time as a signed 32-bit integer overflow at that moment. Systems using 64-bit values are not affected.