Unix Timestamp Converter
Paste a timestamp or a date and see it in UTC, your time zone or any other, converted as you type.
- Runs in your browser
- Seconds to nanoseconds
- Any IANA time zone
Timestamp → date
Date → timestamp
Seconds → duration
How the unit is detected
Up to 11 digits is read as seconds, 12–14 as milliseconds, 15–17 as microseconds and 18–19 as nanoseconds. That covers dates from 1970 to beyond the year 5000 in seconds and the usual outputs of JavaScript, Python, Go and databases.
Dates without a time zone
A date-only value such as 2026-01-01 is read as midnight UTC. A date and time without an offset, such as 2026-01-01T09:00, is read in your local time zone. Add Z or an offset like +09:00 to be exact.
What Unix time is
Unix time counts seconds since 1970-01-01 00:00:00 UTC, ignoring leap seconds. It is the same everywhere in the world at a given moment; only how it is displayed depends on the time zone.
The year 2038
Systems that store seconds in a signed 32-bit integer overflow after 2147483647 (2038-01-19 03:14:07 UTC). Paste that value to see it.
Unix time in code
Get the current time in seconds, and convert 1767225600 (2026-01-01 00:00:00 UTC) to a date.
| Language | Current Unix time | Timestamp → date |
|---|---|---|
| JavaScript | Math.floor(Date.now() / 1000) | new Date(1767225600 * 1000).toISOString() |
| Python | import time; int(time.time()) | datetime.fromtimestamp(1767225600, tz=timezone.utc) |
| Go | time.Now().Unix() | time.Unix(1767225600, 0).UTC() |
| Java | Instant.now().getEpochSecond() | Instant.ofEpochSecond(1767225600) |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds() | DateTimeOffset.FromUnixTimeSeconds(1767225600) |
| PHP | time() | gmdate('c', 1767225600) |
| Ruby | Time.now.to_i | Time.at(1767225600).utc |
| Rust | SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs() | UNIX_EPOCH + Duration::from_secs(1767225600) |
| PostgreSQL | SELECT extract(epoch FROM now())::bigint; | SELECT to_timestamp(1767225600); |
| MySQL | SELECT UNIX_TIMESTAMP(); | SELECT FROM_UNIXTIME(1767225600); |
| SQLite | SELECT unixepoch(); | SELECT datetime(1767225600, 'unixepoch'); |
| Shell (Linux) | date +%s | date -u -d @1767225600 |
| Shell (macOS) | date +%s | date -u -r 1767225600 |
Features
- Converts as you type; detects seconds to nanoseconds from the digits, or set the unit
- Shows the result in any IANA time zone with its UTC offset
- ISO 8601, RFC 2822, relative time, ISO week and day of year
- Date and time in any zone → Unix seconds and milliseconds, DST-aware
- Seconds → readable duration
- Live clock with pause and one-click copy
- Code examples for 13 languages and databases
Frequently asked questions
What is a Unix timestamp?
It is the number of seconds since 1970-01-01 00:00:00 UTC, not counting leap seconds. The same moment has the same Unix time everywhere in the world.
Is my timestamp in seconds or milliseconds?
Count the digits. A current date has 10 digits in seconds and 13 in milliseconds. JavaScript’s Date.now() returns milliseconds; most Unix tools and databases use seconds.
How do I get the current Unix time?
The page shows it live. In code: Math.floor(Date.now() / 1000) in JavaScript, time.time() in Python, date +%s in a shell.
What is the year 2038 problem?
Systems that store seconds in a signed 32-bit integer overflow after 2147483647, which is 2038-01-19 03:14:07 UTC.