Free tool
Unix Timestamp Converter
Convert Unix epoch time to a human date and back, in any time zone. Seconds, milliseconds and microseconds detected automatically.
Current Unix timestamp
1792737844
Milliseconds: 1792737844000
Timestamp → date
Date → timestamp
What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. Because it is the same number everywhere in the world at the same moment, it is the standard way computers store and exchange times – the time zone is only applied when the number is shown to a person.
Many systems use milliseconds (13 digits) instead of seconds (10 digits). This converter detects seconds, milliseconds and microseconds automatically.
The year 2038 problem
Older systems store the timestamp as a signed 32-bit number, which overflows at 2,147,483,647 – 03:14:07 UTC on 19 January 2038. Modern 64-bit systems are not affected.
Get the current timestamp in code
| JavaScript | Math.floor(Date.now() / 1000) |
|---|---|
| Python | import time; int(time.time()) |
| PHP | time() |
| Java | Instant.now().getEpochSecond() |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds() |
| Go | time.Now().Unix() |
| Ruby | Time.now.to_i |
| Rust | SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs() |
| MySQL | SELECT UNIX_TIMESTAMP(); |
| PostgreSQL | SELECT extract(epoch FROM now()); |
| Bash | date +%s |
Frequently asked questions
What is epoch time?
Epoch time is the number of seconds since the Unix epoch, 1 January 1970 at 00:00:00 UTC. It is the same as a Unix timestamp.
Is a Unix timestamp in UTC?
Yes. A Unix timestamp always counts from midnight UTC on 1 January 1970, so it has no time zone. It only becomes a local date and time when you convert it for a specific time zone.
How do I know if a timestamp is in seconds or milliseconds?
Current timestamps in seconds have 10 digits; in milliseconds they have 13 digits and in microseconds 16. The converter detects this automatically.