Unix Epoch Converter

Live Unix time, numeric timestamps in seconds through nanoseconds, ISO and RFC date strings to epoch. Auto unit detection, duration calculator, code examples.

Current Unix time
1,778,058,700
seconds since 1970-01-01 00:00:00 UTC
Milliseconds1,778,058,700,965
Microseconds1,778,058,700,965,000
Nanoseconds1,778,058,700,965,000,000
Converters
Epoch → Human Date
Unix timestamp
Human Date → Epoch
Date / time string
Accepts: ISO 8601, RFC 2822, M/D/Y, natural language
Duration → Seconds
Convert Duration to Seconds
days
hours
minutes
seconds
1 minute60 seconds
1 hour3,600 seconds
1 day86,400 seconds
1 week604,800 seconds
1 month (~30.44d)2,629,743 seconds
1 year (365.25d)31,557,600 seconds
Notable Timestamps
EventEpoch (seconds)Date (UTC)
Unix epoch (time 0)0Thu, 01 Jan 1970 00:00:00 GMT
Y2K946,684,800Sat, 01 Jan 2000 00:00:00 GMT
Year 2038 problem2,147,483,647Tue, 19 Jan 2038 03:14:07 GMT
9/111,000,195,200Tue, 11 Sep 2001 08:00:00 GMT
iPhone announced1,167,624,000Mon, 01 Jan 2007 04:00:00 GMT
1 billion Unix seconds1,000,000,000Sun, 09 Sep 2001 01:46:40 GMT
2 billion Unix seconds2,000,000,000Wed, 18 May 2033 03:33:20 GMT
Start of 2000946,684,800Sat, 01 Jan 2000 00:00:00 GMT
Start of 20241,704,067,200Mon, 01 Jan 2024 00:00:00 GMT
Start of 20251,735,689,600Wed, 01 Jan 2025 00:00:00 GMT
Code Examples
Get current epoch time in…
// Get current epoch (seconds)
const now = Math.floor(Date.now() / 1000);

// Epoch → readable date
const date = new Date(1800000000 * 1000).toLocaleString();
Quick Reference
Seconds in a minute
60
Seconds in an hour
3,600
Seconds in a day
86,400
Days in a year
365.25
Unix epoch origin
1970-01-01 UTC
Max 32-bit signed
2,147,483,647 (~2038)

What is Unix epoch time?

Unix time (also called epoch time or POSIX time) is a way to represent a point in time as a single integer: the number of seconds elapsed since 00:00:00 UTC on 1 January 1970. The POSIX standard defines this as time_t, and it is the universal timestamp format across operating systems, databases, and web APIs. Every major programming language and database engine has a built-in function to read or generate it.

The 1970 origin was chosen pragmatically during Unix development at Bell Labs — recent enough to be useful without wasting integer bits on history. Today a Unix timestamp is typically a 10-digit integer (seconds) or 13-digit integer (milliseconds). The format appears in server log files, JWT tokens (iat and exp claims), REST API responses, database columns, Git commits, and virtually every scheduling or caching system.

One important nuance: POSIX time does not count leap seconds. Every day is exactly 86,400 seconds, and the clock "smears" across inserted leap seconds. This means Unix time and TAI (International Atomic Time) diverge slightly, but for application-level timestamps — scheduling, TTLs, log correlation — the difference is irrelevant.

Seconds, milliseconds, microseconds, nanoseconds

Different languages and systems expose timestamps at different precisions. The digit count of the integer tells you which unit it likely uses:

UnitDigitsExample valueCommon source
Seconds101700000000POSIX time(), PHP time(), Go time.Now().Unix()
Milliseconds131700000000000JavaScript Date.now(), Java currentTimeMillis()
Microseconds161700000000000000Python time.time() (float), PostgreSQL clock_timestamp()
Nanoseconds191700000000000000000Go time.Now().UnixNano(), C clock_gettime()

This converter auto-detects the unit from digit count. Override with the unit tabs when your timestamp is ambiguous — for example, a small millisecond value that looks like a second timestamp.

How to convert a Unix timestamp to a date

  1. Paste the timestamp — enter your Unix timestamp into the Epoch → Human Date input. The converter accepts integers in seconds, milliseconds, microseconds, or nanoseconds.
  2. Verify the unit — the tool auto-detects from digit count. A 10-digit number is treated as seconds; 13 digits as milliseconds. Select a specific unit tab to override.
  3. Read the result — the converted date appears as UTC, local time, ISO 8601 format, and a relative expression such as 3 days ago. Day of year and week number are also shown.
  4. Copy a value — click any copy button next to a result field to copy it to your clipboard for use in code or documents.

To convert in the other direction, enter a date string or use the Human Date → Epochpanel. It accepts ISO 8601, RFC 2822, and common date formats parsed by the browser's Date.parse().

Common developer use cases

Quick reference: durations in seconds

DurationSecondsNotes
1 minute6060 s
1 hour3,60060 × 60
1 day86,40060 × 60 × 24
1 week604,80086,400 × 7
30 days2,592,000common month approximation
1 month (avg)2,629,743365.25 ÷ 12 × 86,400
1 year (Julian)31,557,600365.25 × 86,400
1 year (common)31,536,000365 × 86,400
10 years315,576,000Julian decade

Privacy and accuracy

All conversions run entirely in your browser using the JavaScript Date API. No timestamps or dates you enter are sent to any server. The live clock reads Date.now(), which reflects your system clock; for millisecond-accurate UTC you should synchronise your OS clock with an NTP server.

Related tools

Frequently asked questions

What is the Unix epoch?

The Unix epoch is the fixed point in time defined as 00:00:00 UTC on 1 January 1970. A Unix timestamp counts elapsed seconds — or finer sub-second units — from that instant. The POSIX standard formalises this as time_t; the same anchor is used by virtually every operating system, database, and web API.

Why does timestamp "auto-detect" guess seconds vs milliseconds?

APIs disagree on precision. POSIX time() returns 10-digit second timestamps; JavaScript Date.now() always returns 13-digit milliseconds. Counting digits is the standard heuristic: up to 10 digits are treated as seconds, up to 13 as milliseconds, up to 16 as microseconds, and 17 or more as nanoseconds. Use the unit tabs to override when your value is ambiguous.

What is the difference between UTC and local time in the output?

UTC (Coordinated Universal Time) is timezone-independent — the same timestamp produces the same UTC string anywhere in the world. Local time applies your browser's timezone offset. Use UTC when logging events or comparing timestamps across distributed systems; show local time when displaying dates to end users.

Why does nanosecond input look rounded in the output?

JavaScript Date stores only whole milliseconds internally. Microsecond and nanosecond values are truncated to the nearest millisecond before display. The converter labels which unit it used so you know how the input was interpreted.

What is the Year 2038 problem?

Signed 32-bit integers reach their maximum value of 2,147,483,647 at 03:14:07 UTC on 19 January 2038. Systems still using int32 to store Unix timestamps will overflow on that date. The fix is migration to 64-bit integers. Most modern Linux kernels and databases already use 64-bit time on 64-bit hardware.

Do Unix timestamps count leap seconds?

No. POSIX time deliberately ignores leap seconds: every day is exactly 86,400 seconds, and the clock "smears" around a leap second event. Unix time is therefore not identical to TAI (International Atomic Time). For most applications — logging, scheduling, TTL calculations — this distinction is irrelevant.

What is a negative Unix timestamp?

A negative timestamp represents a moment before 1 January 1970. For example, −86,400 equals 31 December 1969 00:00:00 UTC. Most modern systems and this converter support negative timestamps back through many decades of history.

How do I get the current Unix timestamp in code?

JavaScript: Math.floor(Date.now() / 1000). Python: import time; int(time.time()). PHP: time(). Go: time.Now().Unix(). Java: System.currentTimeMillis() / 1000. MySQL: UNIX_TIMESTAMP(). PostgreSQL: EXTRACT(EPOCH FROM now()). Linux/macOS terminal: date +%s.