Unix timestamp converter
Convert a Unix timestamp to a date, or a date to a timestamp. Paste seconds, milliseconds, microseconds or nanoseconds, or a date such as 2026-10-11T09:00:00Z, and see it in UTC, in your time zone and in any other.
What a Unix timestamp is
The number of seconds since 1 January 1970 at 00:00 UTC, the Unix epoch. The same moment has the same timestamp everywhere, which is why systems store time this way and turn it into a time zone only to show it. Moments before 1970 have negative timestamps.
Seconds, milliseconds or more?
The converter tells the unit from the number of digits:
- Up to 11 digits: seconds, as in Unix tools, PHP's time() and most databases
- 12 to 14: milliseconds, as in JavaScript's Date.now() and Java's System.currentTimeMillis()
- 15 to 17: microseconds
- 18 or more: nanoseconds, as in Go's time.Now().UnixNano()
Dates in, timestamps out
Dates can be ISO 8601 (2026-10-11, 2026-10-11 09:00, 2026-10-11T09:00:00+07:00), RFC 2822 as in email and HTTP headers (Sun, 11 Oct 2026 09:00:00 GMT), and most other forms browsers read. A date without a time zone, even a date alone, is read as your local time, and the converter says so.
The year 2038 problem
Systems that keep the timestamp in a signed 32-bit number run out on 19 January 2038 at 03:14:07 UTC, timestamp 2147483647. Paste 2147483648 to see the second after.
Questions
How do I get the current Unix timestamp in code?
JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). Go: time.Now().Unix(). Shell: date +%s. PostgreSQL: extract(epoch from now()).
Why is my timestamp off by some hours?
A timestamp itself has no time zone, so the difference comes from how a date was written or read: usually a date without a zone, read as local time on one side and as UTC on the other. Check the UTC line against what you expect.
Are leap seconds counted?
No. Unix time counts every day as 86,400 seconds, so leap seconds leave it unchanged, and this converter too.