Time/Numbers
Unix Timestamp ↔ Date
Convert Unix time to a date and back, with support for arbitrary (IANA) time zones.
Unix time (epoch time) is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. It's the most common way to store time in databases, APIs, and logs, since it's just a single integer with no tie to a specific timezone or date format.
How to use it
- Timestamp → date: paste a number of seconds (or milliseconds) and the tool shows the date and time in your chosen timezone.
- Date → timestamp: pick a date and time to get the matching Unix timestamp.
- The "now" button fills in the current moment instantly — handy for testing an API or grabbing a fresh value.
Common uses
- Reading a created_at or expires_at field from an API response that arrived as a raw number.
- Checking whether a token or session has expired, given an expiry field in seconds since the epoch.
- Building a timestamp for test data or a date filter in a database query.
Things to keep in mind
Mixing up seconds and milliseconds is the most common mistake: JavaScript's Date.now() returns milliseconds, while most Unix APIs use seconds — a factor of 1000 off.
Unix time itself has no timezone — it's always UTC; a timezone is only applied when displaying the date to a person.
Article about this tool: Unix time: why computers count time from 1970
Frequently asked questions
What is a Unix timestamp?
It's the number of seconds that have passed since January 1, 1970, 00:00:00 UTC (the Unix epoch). This number isn't tied to any timezone — the timezone is only applied when displaying the date to a person.
What's the difference between seconds and milliseconds?
JavaScript and some APIs (like Date.now()) return a timestamp in milliseconds, while the classic Unix time is in seconds. Mixing up the unit gives a date either in 1970 or somewhere in the distant future — pick the right unit in the "Units" field.
What is the Year 2038 problem?
On systems where a timestamp is stored as a signed 32-bit integer, the seconds counter will overflow on January 19, 2038. Modern 64-bit systems don't have this problem.
Does Unix time account for leap seconds?
No, every day in Unix time always equals exactly 86400 seconds, and leap seconds are ignored. Systems that need precise synchronization with astronomical UTC handle leap seconds through a separate mechanism outside the standard Unix timestamp.
Can Unix timestamps be negative?
Yes, negative values correspond to dates before January 1, 1970. Most modern systems handle such values correctly, though some older APIs or libraries may not support them.