About the Unix Timestamp Converter
Paste a number into the Unix timestamp converter to see its date in any time zone, or turn a date back into epoch time. It tells seconds, milliseconds, microseconds and nanoseconds apart by the size of the number, so a 13-digit value from JavaScript doesn't come out as a date in the year 55840.
A Unix timestamp (also called epoch time or POSIX time) counts the seconds since 00:00:00 UTC on 1 January 1970, not counting leap seconds. Databases, APIs, log files and JWTs store time this way because it's one number with no time zone attached: 1700000000 is the same instant in Lagos, Paris and Tokyo. The conversion runs in your browser. Coding agents can call the same logic as convert_timestamp through toolo's MCP server.
- Current Unix timestamp at the top shows the time now in seconds, with milliseconds and ISO 8601 under it.
- Under Timestamp to date, paste into Unix timestamp or date. Date strings work too, such as
2026-10-07T10:00:00+05:30orWed, 07 Oct 2026 12:00:00 GMT. - Read as shows how your input was understood: Unix seconds, milliseconds, microseconds, nanoseconds or date string.
- Pick a Time zone for the In row, such as In Asia/Tokyo. It starts with your own zone, and the other rows don't depend on it.
- To go the other way, set Date and time under Date to timestamp. Turn on This time is UTC when the time you typed is UTC; leave it off to read it in your browser's time zone.
- Click Copy on the result: seconds on the first line, milliseconds on the second.
Input1700000000
Time zone: Asia/TokyoOutputRead as Unix seconds
In Asia/Tokyo Wednesday, 15 November 2023 at 07:13:20 GMT+9
ISO 8601 (UTC) 2023-11-14T22:13:20.000Z
RFC 2822 Tue, 14 Nov 2023 22:13:20 GMT
Relative 3 years ago
Unix seconds 1700000000
Unix milliseconds 1700000000000It's already 15 November in Tokyo while it's still the 14th in UTC. The Relative rows in these examples were computed on 7 October 2026 at 12:00 UTC.
Input1700000000123
Time zone: America/Sao_PauloOutputRead as Unix milliseconds
In America/Sao_Paulo Tuesday, 14 November 2023 at 19:13:20 GMT-3
ISO 8601 (UTC) 2023-11-14T22:13:20.123Z
Unix seconds 1700000000Thirteen digits means milliseconds. Unix seconds rounds down, so the .123 is dropped.
Input1791378000
Time zone: Asia/KolkataOutputRead as Unix seconds
In Asia/Kolkata Wednesday, 7 October 2026 at 18:30:00 GMT+5:30
ISO 8601 (UTC) 2026-10-07T13:00:00.000Z
Relative in 1 hourJWT times are in seconds. new Date(1791378000) in JavaScript gives 1970-01-21T17:36:18.000Z, because Date expects milliseconds.
Input2026-10-07T10:00:00+05:30OutputRead as date string
ISO 8601 (UTC) 2026-10-07T04:30:00.000Z
Unix seconds 1791347400
Unix milliseconds 1791347400000The +05:30 offset is applied. Without an offset, 2026-10-07 10:00 is read in your browser's time zone, so Karachi and Berlin get different timestamps.
Seconds, milliseconds, microseconds or nanoseconds?
The same moment can be stored with different precision. For a date in recent years, count the digits:
- 10 digits: seconds. Unix tools, PHP
time(), Pythonint(time.time()), JWTexpandiatclaims. - 13 digits: milliseconds. JavaScript
Date.now(), JavaSystem.currentTimeMillis(), many JSON APIs. - 16 digits: microseconds. Python
time.time_ns() // 1000, PostgreSQL internals, some tracing tools. - 19 digits: nanoseconds. Go
time.Now().UnixNano(), InfluxDB line protocol, some log pipelines. - Decimal seconds such as
1700000000.123456, which Python'stime.time()returns, are read as seconds with the fraction kept to the millisecond.
How the unit is detected, and when it's wrong
The converter looks at the size of the number. Below 100,000,000,000 it's seconds (that covers dates up to the year 5138), below 10^14 milliseconds, below 10^17 microseconds, and anything larger is nanoseconds.
The guess fails for small millisecond values: anything before 3 March 1973 is read as seconds, so 86400000 (one day in milliseconds) shows as 1972-09-27. For durations or very old dates, divide by 1000 and paste seconds. Nanosecond input keeps only millisecond precision.
Seconds in common time units
Unix time gives every day exactly 86,400 seconds, so midnight UTC is always a multiple of 86400. 1791331200 is 2026-10-07T00:00:00Z, and adding 86400 gives the next midnight. To get the start or end of a day, month or year, enter it under Date to timestamp with This time is UTC turned on: 2026-12-31 23:59:59 gives 1798761599, and one second later is 1798761600, the start of 2027.
- 1 minute: 60
- 1 hour: 3,600
- 1 day: 86,400
- 1 week: 604,800
- 30 days: 2,592,000
- 365 days: 31,536,000
- Average Gregorian year (365.2425 days): 31,556,952
ISO 8601, RFC 2822 and RFC 3339
ISO 8601 (UTC) is the format of JavaScript's toISOString(): 2023-11-14T22:13:20.000Z. The Z means UTC. It sorts correctly as text, and it's also valid RFC 3339, the profile of ISO 8601 that most JSON APIs and Kubernetes use. RFC 2822 is the older style from email headers, Tue, 14 Nov 2023 22:13:20 GMT, which is also what HTTP headers such as Last-Modified use. Prefer ISO 8601 with an explicit offset when you store or send dates as text.
Leap seconds and the year 2038 problem
Unix time skips leap seconds. When one is added, the clock repeats a second (some cloud providers spread it over a whole day instead), so a difference between two timestamps can be off by a few seconds over the years. For logs and expiry times it doesn't matter, and leap seconds are planned to stop by 2035.
A signed 32-bit integer counts only up to 2147483647, which is 2038-01-19T03:14:07Z. One second later it wraps to 1901-12-13T20:45:52Z. Unsigned 32-bit fields last until 2106-02-07T06:28:15Z. Current systems use 64 bits, but old embedded devices, file formats and MySQL TIMESTAMP columns still stop at 2038.
Get the current Unix timestamp in code
Each snippet returns the current time in whole seconds since the epoch.
Math.floor(Date.now() / 1000)import time
int(time.time())time.Now().Unix()Instant.now().getEpochSecond()DateTimeOffset.UtcNow.ToUnixTimeSeconds()time()Time.now.to_iInt(Date().timeIntervalSince1970)std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)?
.as_secs()date +%s[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()SELECT extract(epoch FROM now())::bigint;SELECT UNIX_TIMESTAMP();SELECT DATEDIFF_BIG(SECOND, '1970-01-01', SYSUTCDATETIME());SELECT unixepoch(); -- SQLite 3.38+
SELECT strftime('%s', 'now');Convert a Unix timestamp to a date in code
Name the time zone every time. Most timestamp bugs come from code that silently uses the server's local zone.
new Date(1700000000 * 1000).toISOString()
// '2023-11-14T22:13:20.000Z'from datetime import datetime, timezone
datetime.fromtimestamp(1700000000, tz=timezone.utc)
# 2023-11-14 22:13:20+00:00time.Unix(1700000000, 0).UTC()Instant.ofEpochSecond(1700000000)
// 2023-11-14T22:13:20ZDateTimeOffset.FromUnixTimeSeconds(1700000000)gmdate('c', 1700000000);
// 2023-11-14T22:13:20+00:00date -u -d @1700000000date -u -r 1700000000SELECT to_timestamp(1700000000);SELECT FROM_UNIXTIME(1700000000); -- in the session time zoneConvert a date to a Unix timestamp in code
Each snippet gives 1767225600, the start of 2026 in UTC.
Date.UTC(2026, 0, 1) / 1000 // months start at 0from datetime import datetime, timezone
int(datetime(2026, 1, 1, tzinfo=timezone.utc).timestamp())time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC).Unix()LocalDate.of(2026, 1, 1).atStartOfDay(ZoneOffset.UTC).toEpochSecond()date -u -d '2026-01-01' +%sdate -j -u -f '%Y-%m-%d %H:%M:%S' '2026-01-01 00:00:00' +%sSELECT extract(epoch FROM timestamptz '2026-01-01 00:00:00+00')::bigint;What is epoch time?
Another name for Unix time: the number of seconds since 1970-01-01 00:00:00 UTC, the "epoch", without leap seconds.
Does a Unix timestamp have a time zone?
No. It's counted from a moment in UTC, so the same number is the same instant everywhere. The time zone matters only when you display it as a date.
Why does my converted date show January 1970?
A seconds value was treated as milliseconds. JavaScript's new Date() expects milliseconds, so multiply by 1000 first. JWT claims and timestamps from PHP or Python backends are the usual cause.
Why is my converted date thousands of years in the future?
The opposite: a millisecond value was read as seconds, so divide by 1000. The converter picks the unit from the size of the number, which avoids this for current dates.
Can a Unix timestamp be negative?
Yes. Negative values are dates before 1970: -86400 is 1969-12-31T00:00:00Z. Most languages handle them, but some older APIs and databases reject them.
What happens on January 19, 2038?
At 03:14:07 UTC, signed 32-bit Unix time reaches its largest value, 2147483647, and the next second wraps to 1901. Systems that store time in 64 bits are not affected.