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.
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.
t = (date - 1970-01-01 UTC) / 1s date = epoch + t × 1st_ms = t_s × 1000 t_s = floor(t_ms / 1000)1 day = 86 400 s 1 year ≈ 31 557 600 sUnix 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.
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()).
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.