Unix Timestamp Converter
Paste seconds, milliseconds, microseconds or nanoseconds and get a readable date instantly.
1785658820
1785658820571
1785658820
1785658820571
2026-08-02T08:20:20Z
Sunday, August 2, 2026, 8:20 AM
Sunday, August 2, 2026, 8:20 AM
now
Date to timestamp
1785658820
1785658820571
What is a Unix timestamp?
A Unix timestamp counts the seconds since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. At any given moment it is the same number everywhere on Earth, which is why databases, APIs and log files rely on it.
A 10-digit value is seconds: classic Unix time used by Linux, Python, PHP and most databases. A 13-digit value is milliseconds: what Date.now() returns in JavaScript and System.currentTimeMillis() returns on Java and Android. This converter detects both, plus 16-digit microseconds and 19-digit nanoseconds.
Unix time in your language
Snippets update live with the value in the converter above.
// current epoch Math.floor(Date.now() / 1000) // seconds Date.now() // milliseconds // timestamp → date new Date(1785658820 * 1000).toISOString() // date → timestamp Math.floor(new Date('2026-08-02T08:20:20Z').getTime() / 1000)
import time, datetime as dt int(time.time()) # seconds time.time_ns() // 1_000_000 # milliseconds # timestamp → date dt.datetime.fromtimestamp(1785658820, tz=dt.timezone.utc) # date → timestamp int(dt.datetime.fromisoformat("2026-08-02T08:20:20Z").timestamp())
import java.time.Instant; Instant.now().getEpochSecond(); // seconds System.currentTimeMillis(); // milliseconds // timestamp → date Instant.ofEpochSecond(1785658820L); Instant.ofEpochMilli(1785658820571L); // date → timestamp Instant.parse("2026-08-02T08:20:20Z").getEpochSecond();
import java.time.Instant System.currentTimeMillis() // milliseconds (Android) Instant.now().epochSecond // seconds // timestamp → date Instant.ofEpochMilli(1785658820571) // date → timestamp Instant.parse("2026-08-02T08:20:20Z").toEpochMilli()
Int(Date().timeIntervalSince1970) // seconds Int(Date().timeIntervalSince1970 * 1000) // milliseconds // timestamp → date Date(timeIntervalSince1970: 1785658820) // date → timestamp ISO8601DateFormatter().date(from: "2026-08-02T08:20:20Z")!.timeIntervalSince1970
time.Now().Unix() // seconds time.Now().UnixMilli() // milliseconds // timestamp → date time.Unix(1785658820, 0).UTC() time.UnixMilli(1785658820571) // date → timestamp t, _ := time.Parse(time.RFC3339, "2026-08-02T08:20:20Z") t.Unix()
date +%s # seconds (GNU + BSD) date +%s%3N # milliseconds (GNU) # timestamp → date date -u -d @1785658820 # GNU/Linux date -u -r 1785658820 # macOS/BSD # date → timestamp (GNU) date -d '2026-08-02T08:20:20Z' +%s
-- PostgreSQL SELECT to_timestamp(1785658820); SELECT extract(epoch FROM now())::bigint; -- MySQL SELECT FROM_UNIXTIME(1785658820); SELECT UNIX_TIMESTAMP();
The year 2038 problem
Systems that store Unix time in a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038. Modern 64-bit systems have headroom for billions of years; the badge above appears whenever a value no longer fits in 32 bits.
Seconds cheat sheet
| Period | Seconds |
|---|---|
| 1 minute | 60 |
| 1 hour | 3600 |
| 1 day | 86400 |
| 1 week | 604800 |
| 1 month (30.44 days) | 2629743 |
| 1 year (365.24 days) | 31556926 |
Frequently asked questions
Why does my timestamp have 13 digits?
It is in milliseconds. Date.now() in JavaScript and System.currentTimeMillis() in Java and Android count milliseconds since 1970, so divide by 1000 for classic Unix seconds. This page detects the unit automatically.
Is Unix time the same in every timezone?
Yes. The number counts seconds since 1970-01-01 UTC and does not depend on where you are; only its rendering as a calendar date changes with the timezone.
Does Unix time count leap seconds?
No. Unix time treats every day as exactly 86,400 seconds and ignores leap seconds, which keeps date arithmetic simple.
What happens in 2038?
Signed 32-bit counters overflow on 19 January 2038. 64-bit systems, current operating systems and this converter handle dates far beyond that.
How do I convert a timestamp in code?
Use the snippets above: one-liners for JavaScript, Python, Java, Kotlin, Swift, Go, shell and SQL, pre-filled with your value.
More for developers
A real clock for your AI assistant: current time, conversions and DST data over MCP. Public, read-only, no API key.
Ready-made time skills for Claude, installable from the worldclock-mcp repository on GitHub.
The same time tools packaged as OpenClaw skills, on GitHub.