How to convert a Unix timestamp
- 1.
Paste the timestamp
Enter a value such as 1767225600 or 1767225600000. The unit (s, ms, µs, ns) is detected from the number of digits.
- 2.
Read the date
You get local time with your time zone, UTC, ISO 8601, the HTTP date format and a relative description such as “3 months ago”.
- 3.
Convert a date back
In “Date → timestamp”, pick a date and time, choose local time or UTC, and copy the result in seconds or milliseconds.
What a Unix timestamp is
A Unix timestamp (epoch time, POSIX time) is the number of seconds elapsed since 1 January 1970, 00:00:00 UTC, ignoring leap seconds. The same moment has the same timestamp everywhere in the world - the time zone only matters when you display it as a date.
| Timestamp (s) | Date (UTC) |
|---|---|
| 0 | 1 January 1970, 00:00:00 |
| 1,000,000,000 | 9 September 2001, 01:46:40 |
| 1,700,000,000 | 14 November 2023, 22:13:20 |
| 1,767,225,600 | 1 January 2026, 00:00:00 |
| 2,147,483,647 | 19 January 2038, 03:14:07 |
Example: 1,767,225,600 is midnight UTC on 1 January 2026, which is 19:00 on 31 December 2025 in New York (EST, UTC-5) and 09:00 on 1 January in Tokyo (UTC+9).
Seconds or milliseconds?
Unix systems, PHP (time()), Python (int(time.time())) and most databases use seconds - 10 digits for current dates. JavaScript (Date.now()) and Java (System.currentTimeMillis()) return milliseconds - 13 digits. Go and some logging systems use nanoseconds. The converter guesses the unit from the magnitude: below 1011 it is seconds, below 1014 milliseconds, below 1017 microseconds, above that nanoseconds. You can also pick the unit manually.
- JavaScript:
Math.floor(Date.now() / 1000) - Bash:
date +%s, and back withdate -d @1767225600(GNU) ordate -r 1767225600(macOS) - PostgreSQL:
SELECT extract(epoch FROM now())andto_timestamp(1767225600) - MySQL:
UNIX_TIMESTAMP()andFROM_UNIXTIME(1767225600)
ISO 8601, HTTP dates and time zones
For APIs and JSON, use ISO 8601 in UTC: 2026-01-01T00:00:00.000Z, where “Z” means UTC. It is unambiguous, sorts correctly as text and is parsed by every language. HTTP headers such as Expires and Last-Modified use the RFC 7231 format: Thu, 01 Jan 2026 00:00:00 GMT. Both are shown with a copy button.
When converting a date to a timestamp, decide whether the date you typed is local time or UTC - the difference is your UTC offset, and daylight saving time changes it twice a year in most of Europe and North America.
The year 2038 problem
When a timestamp is stored as a signed 32-bit integer, its maximum value is 2,147,483,647 - 19 January 2038, 03:14:07 UTC. One second later the counter overflows to a negative number and the date jumps back to 13 December 1901. Modern operating systems and languages use 64-bit timestamps, which last for billions of years, but the problem still affects older embedded devices, some file formats and database columns declared as 32-bit INT. Need date arithmetic rather than raw timestamps? Try the days between dates calculator.
Frequently asked questions
What is the current Unix timestamp?
+
Does a Unix timestamp depend on the time zone?
+
How do I tell seconds from milliseconds?
+
Can a timestamp be negative?
+
What is ISO 8601?
+
Are leap seconds counted?
+
Updated: