The tool shows the current Unix time in seconds and converts in both directions. Paste a timestamp, integer or decimal, negative values included, to get ISO 8601 in UTC and in the selected zone, RFC 2822, a readable line and a relative time such as “3 days ago”. The unit is detected from the size of the number; a select overrides it. Nanosecond values keep every digit.
In the other direction, enter an ISO 8601 date, an RFC 2822 date or YYYY-MM-DD HH:mm[:ss] and get seconds and milliseconds. The time zone field applies to both directions. It starts as your browser’s zone (UTC if the browser does not report one); type a city such as new york or a full ID such as America/New_York. A date without an offset is read in that zone, and a date without a time means midnight in the selected time zone. JavaScript’s Date.parse reads a date-only ISO string as UTC instead, so new Date("2026-10-14") can differ.
Example
Zone America/New_York, timestamp 1792007400 (detected as seconds):
ISO 8601 (UTC) 2026-10-14T19:50:00Z
ISO 8601 with offset (America/New_York) 2026-10-14T15:50:00-04:00
RFC 2822 Wed, 14 Oct 2026 15:50:00 -0400
The value 1792007400123456789 is detected as nanoseconds and gives 2026-10-14T15:50:00.123456789-04:00.
Date 2026-10-14 15:50 in the same zone gives 1792007400 seconds and 1792007400000 milliseconds. 2026-10-14 alone gives 1791950400, midnight in New York.
Get the current Unix timestamp in code
const seconds = Math.floor(Date.now() / 1000);
const millis = Date.now();
import time
seconds = int(time.time())
nanos = time.time_ns()
seconds := time.Now().Unix()
millis := time.Now().UnixMilli()
long seconds = java.time.Instant.now().getEpochSecond();
long millis = System.currentTimeMillis();
date +%s
-- PostgreSQL
SELECT extract(epoch FROM now())::bigint;
-- MySQL
SELECT UNIX_TIMESTAMP();
Limitations
- Dates must be between 0001-01-01 and 9999-12-31 UTC.
- Unit detection goes by size: below 1e11 is seconds, below 1e14 milliseconds, below 1e17 microseconds, otherwise nanoseconds. So
253402300799(9999-12-31 in seconds) reads as milliseconds until you choose seconds. - Decimal places are capped: 9 for seconds, 6 for milliseconds, 3 for microseconds, none for nanoseconds. No exponents, underscores or commas.
- Date to timestamp truncates to milliseconds.
- Not supported: ISO basic format (
20261012T195000Z), week and ordinal dates, two-digit years,24:00and:60. In RFC 2822 the only zone names are UT, GMT, Z, EST, EDT, CST, CDT, MST, MDT, PST and PDT. - A time skipped when clocks move forward is shifted ahead by the gap; a time that occurs twice resolves to the earlier one. A note says which.
- Relative time uses average month and year lengths. The readable line is English, 24-hour.
- Some old local offsets have seconds. RFC 2822 cannot show them, so that line falls back to UTC with a note.
FAQ
What is Unix time?
The number of seconds since 1970-01-01 00:00:00 UTC, without leap seconds. It names an instant the same way everywhere. Earlier dates are negative.
Seconds, milliseconds or nanoseconds: how do I tell?
For current dates, 10 digits is seconds, 13 milliseconds, 16 microseconds, 19 nanoseconds. Date.now() in JavaScript returns milliseconds. If the result lands in January 1970 or far in the future, the unit is wrong.
Why does Unix time start in 1970?
It is a convention from early Unix: a round date close to when the system was written. POSIX fixes the epoch at 1970-01-01 00:00:00 UTC, and most languages and databases follow it.
What is the 2038 problem?
A signed 32-bit count of seconds ends at 2147483647, which is 2038-01-19 03:14:07 UTC. Software storing time in 32 bits then wraps to 1901. 64-bit timestamps avoid it, and this tool accepts 2147483648 and larger.
Does Unix time count leap seconds?
No. Every day has 86,400 seconds, so at a leap second the counter repeats a value or the clock is slowed slightly over many hours (a “leap smear”).