Free tool

Unix timestamp converter

A Unix timestamp is the number of seconds since 1 January 1970 00:00:00 UTC. Paste one to get the date in UTC and any time zone, or type a date to get its epoch time. Seconds, milliseconds, microseconds and nanoseconds are detected from the number of digits.

Free · no sign-up · runs in your browser, nothing is uploaded

Current Unix time
··········
Timestamp or date

Showing the current time. Paste a timestamp or a date to convert it.

Result

Loading the current time…

Same moment in other zones
    Start and end of (UTC)
    Add or subtract time
    to now

    Days and up follow the calendar in UTC, so +1 day across a DST change keeps the clock time. Use a negative number to subtract.

    In code
    Batch convert

    Each line is converted with the unit and zone above. Copy or download the result as CSV.

    What a Unix timestamp is

    Unix time (also called epoch time or POSIX time) counts the seconds that have passed since the Unix epoch, 1970-01-01T00:00:00Z. It is one number with no time zone, so it is easy to store, sort, compare and subtract: two timestamps an hour apart always differ by 3600.

    POSIX defines the count so that every day has exactly 86,400 seconds. Leap seconds are not counted, which keeps date math simple: the timestamp of midnight UTC is always a multiple of 86,400. Times before 1970 are negative numbers, so -86400 is 1969-12-31T00:00:00Z.

    TimestampDate (UTC)Why it is known
    01970-01-01T00:00:00ZThe Unix epoch
    9466848002000-01-01T00:00:00ZY2K
    10000000002001-09-09T01:46:40ZFirst 10-digit timestamp
    17356896002025-01-01T00:00:00ZSample in the converter
    20000000002033-05-18T03:33:20ZNext round number
    21474836472038-01-19T03:14:07ZLargest signed 32-bit value

    Seconds, milliseconds, microseconds or nanoseconds?

    Different systems count in different units. The number of digits tells you which one you have: for dates between 2001 and 2286, seconds have 10 digits. The converter uses the size of the number to decide, and you can force a unit with the s / ms / µs / ns switch.

    UnitDigits todayExampleTypical sources
    Seconds101735689600Unix tools (date +%s), PHP time(), JWT exp/iat, MySQL UNIX_TIMESTAMP()
    Milliseconds131735689600000JavaScript Date.now(), Java System.currentTimeMillis(), many JSON APIs
    Microseconds161735689600000000Python time.time() × 10⁶, some databases and tracing tools
    Nanoseconds191735689600000000000Go time.UnixNano(), Python time.time_ns(), OpenTelemetry

    The auto-detect rule: below 1011 it is seconds (that covers dates up to the year 5138), below 1014 milliseconds, below 1017 microseconds, and nanoseconds above that. Nanosecond timestamps are larger than JavaScript can hold exactly in a Number (253 − 1), so this tool does the math with BigInt and keeps all nine fractional digits.

    Convert epoch time in code

    Pick a language under the result to get these snippets filled in with your timestamp and time zone. The short versions:

    LanguageCurrent timestampTimestamp to date
    JavaScriptMath.floor(Date.now() / 1000)new Date(ts * 1000).toISOString()
    Pythonint(time.time())datetime.fromtimestamp(ts, tz=timezone.utc)
    Gotime.Now().Unix()time.Unix(ts, 0).UTC()
    JavaInstant.now().getEpochSecond()Instant.ofEpochSecond(ts)
    PHPtime()gmdate('c', $ts)
    C#DateTimeOffset.UtcNow.ToUnixTimeSeconds()DateTimeOffset.FromUnixTimeSeconds(ts)
    PostgreSQLextract(epoch FROM now())to_timestamp(ts)
    MySQLUNIX_TIMESTAMP()FROM_UNIXTIME(ts)
    SQLiteunixepoch()datetime(ts, 'unixepoch')
    Bash (GNU)date +%sdate -u -d @ts
    Bash (macOS)date +%sdate -u -r ts

    The most common bug is a unit mix-up: JavaScript's Date takes milliseconds, so new Date(1735689600) gives a date in January 1970. Multiply seconds by 1000 first. The reverse mistake, passing milliseconds to a function that expects seconds, lands tens of thousands of years in the future.

    Spreadsheets. In Google Sheets, =EPOCHTODATE(A1) converts seconds to a UTC date; pass 2 as the second argument for milliseconds or 3 for microseconds. Excel has no built-in function, but its dates are day counts where 1970-01-01 is day 25569, so =A1/86400+25569 gives the UTC date (format the cell as a date). The converter shows that serial number for you.

    Date formats and time zones

    One instant, written in the formats you are most likely to need:

    FormatExampleWhere it is used
    ISO 8601 / RFC 33392025-01-01T09:30:00+01:00JSON APIs, databases, logs. Z means UTC
    RFC 2822 / RFC 5322Wed, 01 Jan 2025 09:30:00 +0100Email Date headers, RSS
    HTTP date (RFC 9110)Wed, 01 Jan 2025 08:30:00 GMTLast-Modified, Expires, cookies. Always GMT
    SQL DATETIME2025-01-01 08:30:00MySQL and SQLite text dates. No zone, so agree on UTC

    Time zones use IANA names like Europe/Berlin or America/New_York, not fixed offsets. A name carries the daylight saving rules, so the offset is right for each date: New York is UTC−5 in January and UTC−4 in July. When you type a date without an offset, the converter reads it as wall-clock time in the zone you picked, or in the zone you name at the end, as in 2025-01-01 09:30 Europe/Berlin. Numeric dates like 05/01/2025 are read month first (US order) unless the first number is above 12; dotted dates like 05.01.2025 are read day first.

    DST edge cases. On the night clocks jump forward, times like 02:30 in New York do not exist; the converter moves them forward by the length of the jump (02:30 becomes 03:30 EDT) and says so. When clocks go back, 01:30 happens twice; it takes the first one and tells you. This matches the "compatible" rule of JavaScript's Temporal API.

    The Year 2038 problem and other limits

    Older C code stores time_t as a signed 32-bit integer. Its largest value, 2147483647, is 2038-01-19T03:14:07Z; one second later it overflows to -2147483648, which reads as 1901-12-13T20:45:52Z. 64-bit time_t is standard on current Linux, macOS and Windows builds, but 32-bit fields in databases, file formats and embedded devices can still break. The result table says whether a timestamp fits in 32 bits.

    JavaScript dates cover ±8.64 × 1015 milliseconds around the epoch, from April 271,821 BC to September 275,760 AD, which is the range this tool accepts. Years past 9999 are written in the extended ISO form, such as +010000-01-01T00:00:00Z.

    Timestamps also show up inside other formats. JWT claims exp, iat and nbf are seconds, which the JWT decoder converts for you. UUID v7 and ULID start with a millisecond timestamp (see the UUID generator). To schedule jobs rather than convert times, use the cron expression generator. Storing timestamps in a database? Browse database tools on DevHunt.

    FAQ

    Is a Unix timestamp always UTC?+

    Yes. A Unix timestamp counts seconds since 1970-01-01 00:00:00 UTC, so the same number means the same moment everywhere. Time zones only matter when you turn it into a calendar date and clock time for display. If a timestamp seems off by a few hours, the bug is in how it was created or displayed, not in the number.

    How do I convert a Unix timestamp to a human-readable date?+

    Paste it in the converter above: it detects the unit and shows the date in UTC, in your time zone and in any other zone. In code, multiply seconds by 1000 for JavaScript (new Date(ts * 1000)), use datetime.fromtimestamp(ts, tz=timezone.utc) in Python, time.Unix(ts, 0) in Go, or date -u -d @ts in a Linux shell.

    What does a Unix timestamp look like?+

    A plain integer. Today it is a 10-digit number of seconds, such as 1735689600 for 2025-01-01 00:00:00 UTC. Milliseconds add three digits (1735689600000, 13 digits), microseconds six (16 digits) and nanoseconds nine (19 digits). Dates before 1970 are negative.

    How do I convert a Unix timestamp to a date in SQL?+

    PostgreSQL: to_timestamp(1735689600). MySQL: FROM_UNIXTIME(1735689600), which uses the session time zone. SQLite: datetime(1735689600, 'unixepoch'). Going the other way: extract(epoch FROM ts) in PostgreSQL, UNIX_TIMESTAMP('2025-01-01 00:00:00') in MySQL and unixepoch('2025-01-01') in SQLite 3.38 or newer.

    How do I get the current Unix timestamp?+

    In a terminal, date +%s. In JavaScript, Math.floor(Date.now() / 1000) for seconds or Date.now() for milliseconds. In Python, int(time.time()). In Go, time.Now().Unix(). In PHP, time(). The live clock at the top of the converter shows it too, with a copy button.

    Does Unix time count leap seconds?+

    No. POSIX defines every day as exactly 86,400 seconds, so leap seconds are left out and a Unix timestamp is not a true count of elapsed SI seconds. During a leap second the clock repeats or smears a second, depending on the system. That is why 23:59:60 has no timestamp of its own.

    Is Unix time still used?+

    Yes, everywhere: file systems, databases, logs, HTTP APIs, JWT claims (exp, iat, nbf), cookies and most programming languages store or exchange time as a count since the Unix epoch. What changed is the size: modern systems use a 64-bit count, which avoids the Year 2038 overflow of 32-bit seconds.

    What is the Year 2038 problem?+

    A signed 32-bit integer holds at most 2,147,483,647 seconds, which is 2038-01-19 03:14:07 UTC. One second later it wraps to a negative number, which reads as December 1901. Systems that still store time_t or timestamps in 32-bit fields need to move to 64-bit. The converter flags timestamps that do not fit.

    Sources: POSIX: Seconds Since the Epoch · RFC 3339 (timestamps) · RFC 5322 §3.3 (email date) · RFC 9110 §5.6.7 (HTTP date) · MDN: Date · MDN: Intl.DateTimeFormat · IANA time zone database · Python datetime · Go time · Java Instant · PostgreSQL date/time functions · MySQL date and time functions · SQLite date and time functions · GNU date · Google Sheets EPOCHTODATE. Checked 2026-10-30.