⏱️

Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and vice versa. Free, instant.

💻 Developer Tools Free Browser-based
Tool
Current Unix timestamp (seconds)

Timestamp → Date

Date → Timestamp

How Unix Timestamps Work

Unix time counts the seconds since the Unix epoch: midnight UTC on 1 January 1970. It is timezone-agnostic — a timestamp represents the same absolute moment in time everywhere on earth. Converting to a human-readable date always requires a timezone offset, which is why the same timestamp shows a different clock time in New York vs London vs Tokyo.

Seconds vs Milliseconds

FormatDigitsExampleUsed in
Seconds101713312000Unix shell, Python, MySQL, PostgreSQL
Milliseconds131713312000000JavaScript Date.now(), Java System.currentTimeMillis()
Microseconds161713312000000000Python time.time_ns(), high-precision event logs

Getting Unix Timestamps in Code

LanguageCurrent timestamp (seconds)
JavaScriptMath.floor(Date.now() / 1000)
Pythonimport time; int(time.time())
PHPtime()
SQL (MySQL)UNIX_TIMESTAMP()
SQL (PostgreSQL)EXTRACT(EPOCH FROM NOW())::bigint
Gotime.Now().Unix()
RustSystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()

Why Timestamps Are Better Than Date Strings

Storing dates as Unix timestamps in databases avoids three common bugs: ambiguous date formats (01/02/03 — is that January, February or March?), timezone confusion (storing "2026-05-14 10:00" with no timezone means different things on different servers), and daylight saving time edge cases. Timestamps are an unambiguous integer count. Convert to a human-readable string only at display time, in the user's local timezone.

'Why do some APIs return timestamps in milliseconds?', 'a' => 'JavaScript\'s Date.now() returns milliseconds, so many web APIs follow that convention. The trade-off: millisecond timestamps are 13 digits instead of 10, but they let you represent sub-second precision without a separate field.'], ]" />