Unix Time Converter

Convert between Unix timestamps (seconds since 1970-01-01 UTC) and human-readable dates.

Convert Bidirectional Pre-1970 OK
Rate this calculator

Unix time converter

Timestamp ↔ date · UTC · ISO 8601 · ms

Instructions — Unix Time Converter

1

Type a timestamp

Paste a Unix timestamp (seconds since 1970-01-01 UTC). The date and time fields update automatically and the result panel shows UTC, local time, and ISO 8601.

2

Or pick a date

Change the UTC date or time picker to compute the timestamp the other way. Both directions are live — last-edited input wins.

3

Hit "now"

The "now" button fills in the current Unix timestamp. Useful for testing cache TTLs, JWT expirations, or any time-based key.

Seconds vs milliseconds: 10-digit numbers are seconds (Unix). 13-digit numbers are milliseconds (JavaScript Date.now). Both shown in the result panel.
Year 2038: 32-bit signed timestamps overflow at 2038-01-19 03:14:07 UTC. Modern systems use 64-bit and are good for 292 billion years.

Formulas

Unix time counts seconds from a fixed epoch — 1970-01-01 00:00:00 UTC. The math is simple integer arithmetic.

The Unix epoch
$$ T_{epoch} = 1970\text{-}01\text{-}01 \;\; 00{:}00{:}00 \; \text{UTC} $$
Universal reference point. Negative timestamps represent times before 1970.
Timestamp from date
$$ t = \left\lfloor \frac{T_{date} - T_{epoch}}{1\,\text{s}} \right\rfloor $$
Difference in seconds. POSIX dictates every day is 86 400 s, ignoring leap seconds.
Seconds ↔ milliseconds
$$ t_{ms} = t_s \times 1000 \;\;\; t_s = \lfloor t_{ms} / 1000 \rfloor $$
JavaScript Date.now() returns ms. Most languages use seconds. Always know which you have before converting.
Year 2038 bug
$$ t_{max,32} = 2^{31} - 1 = 2\,147\,483\,647 \; \text{s} $$
Reached on 2038-01-19 03:14:07 UTC. After that, 32-bit signed integers overflow to -2¹³¹ ≈ year 1901. Fixed by switching to 64-bit time_t.
64-bit range
$$ t_{max,64} = 2^{63} - 1 \approx 9.22 \times 10^{18} \; \text{s} $$
About 292 billion years either side of 1970. Effectively unlimited for any real application.
Time units shortcut
$$ 1\,\text{day} = 86\,400\,\text{s} \;\;\; 1\,\text{year} \approx 31\,557\,600\,\text{s} $$
Quick mental math: 1 day = 86 400. 1 hour = 3600. 1 year ≈ 31.5 million.

Reference

Notable Unix timestamps
TimestampUTC dateEvent
01970-01-01 00:00:00Epoch start
1 000 000 0002001-09-09 01:46:401 billion seconds
1 234 567 8902009-02-13 23:31:30Internet milestone
1 500 000 0002017-07-14 02:40:00
1 700 000 0002023-11-14 22:13:20
1 760 000 0002025-10-09 09:46:40
2 000 000 0002033-05-18 03:33:20
2 147 483 6472038-01-19 03:14:07Y2K38 overflow (32-bit)
-2 147 483 6481901-12-13 20:45:5232-bit min

Unix time in major languages

Native functions for getting the current Unix timestamp in popular environments.

Seconds
LanguageCall
Pythontime.time()
RubyTime.now.to_i
Gotime.Now().Unix()
PHPtime()
Bashdate +%s
MySQLUNIX_TIMESTAMP()
Milliseconds
LanguageCall
JavaScriptDate.now()
JavaSystem.currentTimeMillis()
KotlinSystem.currentTimeMillis()
SwiftDate().timeIntervalSince1970 × 1000
RustSystemTime::now()

Article — Unix Time Converter

Unix time converter — Unix timestamp to date and back

A Unix time converter turns a Unix timestamp (an integer number of seconds since 1970-01-01 00:00:00 UTC) into a human-readable date and back. The Unix epoch is universal: every modern operating system, programming language, and time-keeping protocol either uses Unix time directly or maps to it. As of mid-2026 the current Unix time is about 1 780 000 000 — roughly 55.7 years past the epoch.

Unix time was created at Bell Labs in the early 1970s as a compact way for the original Unix operating system to track file timestamps and process schedule. The choice of 1970 was arbitrary; what stuck was the format: a single signed integer counting seconds, with no calendar arithmetic to worry about. That simplicity is why Unix time is now the lingua franca of every API, log file, and database timestamp.

What is a Unix time converter?

A Unix time converter does two things: timestamp → date and date → timestamp. Given a Unix timestamp like 1 760 000 000, the converter outputs the equivalent UTC date and local date (Oct 9, 2025 at 09:46:40 UTC; whatever that is in your local zone). Given a date input, it computes the seconds since the epoch.

The converter on this page also displays ISO 8601 format (the international standard for date-time strings), milliseconds (JavaScript's preferred unit, 1000× the seconds value), day of week, and a relative-time description ("2 days ago" or "in 1 year").

The Unix epoch and Unix time format

The Unix epoch is exactly 1970-01-01 00:00:00 UTC. A Unix timestamp is just the number of seconds elapsed since that moment, ignoring leap seconds. Positive numbers are after the epoch. Negative numbers represent moments before 1970 — useful for historical dates. The minimum 32-bit signed timestamp is -2 147 483 648 (1901-12-13 20:45:52 UTC); 64-bit Unix time spans ±292 billion years, far beyond any practical use.

Did you know

1 234 567 890 was a memorable Unix timestamp — it occurred on 13 February 2009 at 23:31:30 UTC. Programmers worldwide stayed up to watch the digits flip. The 1 000 000 000th second of Unix time came on 9 September 2001 at 01:46:40 UTC.

Unix time conversion formulas

The math is just integer arithmetic. Timestamp → date subtracts and divides; date → timestamp adds.

Unix time converter formulas
t = (date - 1970-01-01 UTC) / 1s date = epoch + t × 1s
t_ms = t_s × 1000 t_s = floor(t_ms / 1000)
1 day = 86 400 s 1 year ≈ 31 557 600 s

Unix time and the Y2K38 problem

If a system stores Unix time as a 32-bit signed integer, the maximum value is 2³¹ - 1 = 2 147 483 647, corresponding to 19 January 2038 at 03:14:07 UTC. After that, the integer overflows to -2³¹ and effectively jumps back to 1901-12-13. This is the Y2K38 problem — the digital descendant of Y2K but with a real overflow point rather than the cosmetic two-digit-year issue.

Modern operating systems (Linux 5.6+, macOS, Windows 10+, recent Android and iOS) use 64-bit time_t and are immune. But many embedded devices, old databases, file systems, and legacy applications still use 32-bit timestamps. The fix is to widen the integer to 64 bits — straightforward in code but expensive to roll out across firmware, on-disk formats, and inter-system protocols.

Unix time Y2K38 risk

If your software stores Unix time as int rather than int64, it will break on 19 January 2038. Audit databases, embedded firmware, and inter-system message formats now. The clock has 12 years left to run — well within most enterprise software lifecycles.

Unix time vs ISO 8601

ISO 8601 is the international standard for date-time strings — e.g. "2025-10-09T09:46:40Z" (the Z means UTC). Unix time and ISO 8601 represent the same instant but in different formats. ISO 8601 is human-readable and sorts correctly as a string; Unix time is more compact and easier for arithmetic.

  • Unix time strengths = compact, arithmetic-friendly, no timezone ambiguity, no parsing needed
  • Unix time weaknesses = not human-readable, ambiguous units (s vs ms), Y2K38 risk if 32-bit
  • ISO 8601 strengths = human-readable, includes timezone, sorts correctly as text
  • ISO 8601 weaknesses = parsing required, longer, less compact in JSON / DB
  • Good practice = store as Unix time, display as ISO 8601
  • Database columns = TIMESTAMP / DATETIME types often convert to ISO 8601 automatically

Unix time in popular languages

Most programming languages have a one-liner to get the current Unix timestamp. Python: time.time() returns seconds as a float. JavaScript: Math.floor(Date.now() / 1000) for seconds, or Date.now() for milliseconds. Go: time.Now().Unix(). PHP: time(). Ruby: Time.now.to_i. Java: System.currentTimeMillis() / 1000. Bash: date +%s. MySQL: SELECT UNIX_TIMESTAMP(). PostgreSQL: SELECT EXTRACT(EPOCH FROM NOW()).

Tip

If a 13-digit number shows up where you expected a 10-digit number, it is milliseconds (JavaScript style). Divide by 1000 to get seconds. The Unix time converter on this page accepts both and shows both in the output.

Common Unix time conversion mistakes

Confusing seconds and milliseconds is the most common bug — a factor of 1000 error puts you 31 700 years off. Always check the digit count: 10 = seconds, 13 = ms.

Treating Unix time as local time. Unix time is always UTC, regardless of the user's timezone. When displaying to a user, convert to local time at presentation time; never store local-time integers.

Forgetting that Unix time excludes leap seconds. UTC has had 27 leap seconds inserted since 1972; Unix time skips them, so Unix time is now about 27 seconds behind TAI (atomic time). For most applications this is irrelevant; for financial time-stamping, GPS, and scientific measurement, special handling is required.

Unix time converter quick rules

Current Unix time is around 1.76 billion (10 digits, seconds) or 1.76 trillion (13 digits, ms). 1 day = 86 400 s. 1 year ≈ 31.56 million s. The Unix epoch is 1970-01-01 00:00:00 UTC. Y2K38 is 2 147 483 647. To convert mentally, remember that 1 720 000 000 was roughly 24 July 2024; every 31.56 million adds a year. The Unix time converter on this page gives precise UTC, local, and ISO 8601 outputs for any timestamp from year 1901 onwards.

FAQ

Unix time (also called epoch time or POSIX time) is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, not counting leap seconds. It is the universal standard for representing a point in time in computer systems — independent of time zones and human calendar quirks. JavaScript's Date.now() returns Unix time in milliseconds; most other languages return it in seconds.
It was chosen by the original Unix developers at Bell Labs in the early 1970s as a convenient reference point. Earlier Unix versions used different epochs (one was 1971-01-01) but settled on 1970 in the mid-70s. The choice was arbitrary, but the resulting standard is now baked into POSIX, networking protocols, and most operating systems.
On 2038-01-19 at 03:14:07 UTC, the Unix timestamp will reach 2³¹ - 1 = 2 147 483 647. Systems still using 32-bit signed integers for time will overflow to -2³¹, effectively jumping to 1901-12-13. Modern OS kernels (Linux, macOS, Windows) use 64-bit time_t and are immune. Old embedded systems, ancient databases, and some firmware are still at risk.
Unix time in seconds is a 10-digit number (e.g. 1 760 000 000 for Oct 2025). Unix time in milliseconds is 1000× larger — a 13-digit number. JavaScript's Date uses milliseconds; most other languages (Python, Go, PHP, Java's Instant.getEpochSecond) use seconds. Always check the column type before storing — mixing seconds and milliseconds gives results that are 31 700 years off.
No. POSIX dictates that every day has exactly 86 400 seconds, regardless of whether UTC inserted a leap second. When a leap second occurs (typically on June 30 or December 31), most Unix systems either repeat the previous second or smear it across a longer interval. This is why Unix time is not strictly equal to UTC — but the gap is at most a few seconds over decades.
Yes. Negative values represent times before 1970-01-01. For example, -86400 is 1969-12-31 00:00:00 UTC. The minimum representable value for a 32-bit signed integer is -2 147 483 648, corresponding to 1901-12-13 20:45:52 UTC. With 64-bit integers, you can represent any historical date including geological time.
Most languages have a one-liner: Python time.time(), JavaScript Math.floor(Date.now() / 1000), Go time.Now().Unix(), PHP time(), Bash date +%s, MySQL UNIX_TIMESTAMP(). In this converter, click the "now" button.
ISO 8601 is the international standard for representing dates and times as text — e.g. 2025-10-09T09:46:40Z. It is human-readable, sortable as a string, and includes the time zone (the trailing "Z" means UTC). Unix time and ISO 8601 are interchangeable: both refer to the same instant. ISO 8601 is best for log files and APIs; Unix time is best for arithmetic (subtracting two timestamps gives a duration in seconds).