Convert Unix timestamps to dates and back, with a live current timestamp
Current Timestamp
Unix timestamp (seconds)-
Unix timestamp (milliseconds)-
Timestamp to Date
Local time
UTC time
ISO 8601
Relative time
Date to Timestamp
Seconds
Milliseconds
What Is a Unix Timestamp?
A Unix timestamp is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC (the Unix epoch). It is timezone-independent: the same moment has the same timestamp everywhere in the world, which is why it is widely used to record time in logs, databases and APIs. Beware the Year 2038 problem: systems that store second-level timestamps in signed 32-bit integers will overflow on January 19, 2038 at 03:14:07 UTC — new systems should use 64-bit integers. Timestamps can also be negative, representing moments before 1970.
Seconds vs. Milliseconds
A seconds timestamp is usually 10 digits (e.g. 1700000000), while a milliseconds timestamp is 13 digits (e.g. 1700000000000) — a factor of 1000 apart. Go's time.Now().Unix() and Python's time.time() return seconds; Java's System.currentTimeMillis() and JavaScript's Date.now() return milliseconds. Always check which unit an API expects: mixing them up shifts the date by a factor of 1000.
Get the Current Timestamp in Different Languages
Language
Seconds
Milliseconds
Go
time.Now().Unix()
time.Now().UnixMilli()
Java
Instant.now().getEpochSecond()
Instant.now().toEpochMilli()
Python
int(time.time())
int(time.time() * 1000)
JavaScript
Math.floor(Date.now() / 1000)
Date.now()
Go requires the time package; the Java example uses java.time.Instant (Java 8+); Python requires the time module; JavaScript's Date.now() returns milliseconds directly.
How to Use
The top of the page shows the current Unix timestamp (seconds and milliseconds), refreshed every second — click "Copy" to grab it. Timestamp to date: enter a timestamp, pick its unit (seconds or milliseconds), and get the local time, UTC time, ISO 8601 format and relative time; local time is shown in your device's timezone. Date to timestamp: pick a date and time (local timezone) to get the corresponding seconds and milliseconds timestamps. Negative timestamps represent dates before 1970. All calculations run locally in your browser — nothing is uploaded.