Unix Timestamp Converter
Real-time Unix timestamp display. Convert epoch time to date, date to timestamp, seconds to milliseconds — all in your browser.
Timestamp → Date
Enter a timestamp to convert.
Date → Timestamp
Based on your browser's local timezone.
Select a date and time above.
Did this tool solve your problem?
What is a Unix timestamp
A Unix timestamp (also called Epoch time) is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. It's an integer without timezone information, making it extremely reliable for passing time data between systems in different time zones. Nearly every programming language and database supports timestamps — it's the universal way computers represent time.
Common uses of timestamps
Timestamps are widely used in logging, database storage, APIs, cache expiration, and file modification times. For example, MySQL's UNIX_TIMESTAMP() function, Redis TTL expiration, and HTTP's Last-Modified header all use timestamps. For internationalized applications spanning multiple timezones, storing timestamps and converting to local time on display is the best practice.
Seconds vs milliseconds timestamps
Second-precision timestamps are 10-digit integers (e.g. 1700000000), while millisecond-precision are 13 digits (e.g. 1700000000000). JavaScript's Date.now() returns milliseconds, while Python's time.time() and PHP's time() return seconds. Our tool auto-detects the format — 10 digits are treated as seconds, 13 as milliseconds — eliminating manual conversion errors.
Notable Timestamps
Get Timestamp in Your Language
Date.now() // milliseconds Math.floor(Date.now() / 1000) // seconds
import time int(time.time()) # seconds
time.Now().Unix() // seconds time.Now().UnixMilli() // milliseconds
time() // seconds
SELECT UNIX_TIMESTAMP() -- seconds SELECT UNIX_TIMESTAMP() * 1000 -- milliseconds
use std::time::SystemTime; SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs()
Frequently Asked Questions
- What is a Unix timestamp?
- A Unix timestamp (or epoch time) is the number of seconds elapsed since January 1, 1970, at 00:00:00 UTC. It is a timezone-independent way to represent time, used universally in programming, databases, and APIs.
- Is a timestamp in seconds or milliseconds?
- Unix timestamps are typically in seconds (10 digits), but JavaScript and many modern APIs use milliseconds (13 digits). This tool auto-detects the unit based on input length.
- How do I get the current timestamp in code?
- JavaScript: Date.now() (ms) or Math.floor(Date.now()/1000) (s); Python: import time; int(time.time()); PHP: time(); MySQL: UNIX_TIMESTAMP().
- What is the Year 2038 problem?
- 32-bit systems store timestamps as signed integers, which overflow at 2147483647 (January 19, 2038). This can cause older systems to malfunction. Modern 64-bit systems are not affected.
- Why does the Unix epoch start on January 1, 1970?
- The Unix operating system was being developed around that time, and designers chose a convenient round date as the starting point. The choice was largely arbitrary but has since become a universal standard.