How to Convert Unix Timestamps
Unix timestamps are how computers store and communicate time — a single number representing seconds since January 1, 1970. They appear in API responses, database records, log files, and JWT tokens. When you need to know what date 1711824000 actually is, you need a converter.
What a Unix timestamp looks like
| Timestamp | Type | Human-readable |
|---|---|---|
| 0 | Seconds | Jan 1, 1970 00:00:00 UTC |
| 1000000000 | Seconds | Sep 9, 2001 01:46:40 UTC |
| 1711824000 | Seconds | Mar 31, 2024 00:00:00 UTC |
| 1711824000000 | Milliseconds | Mar 31, 2024 00:00:00 UTC |
The difference between seconds and milliseconds is three extra zeros. A 10-digit number is in seconds; 13 digits is milliseconds.
How to convert timestamps
- Enter a timestamp or date — paste a Unix timestamp to convert to a readable date, or enter a date to get the timestamp.
- Check the format — the converter auto-detects seconds vs milliseconds based on the number length.
- Read the result — see the date in your local timezone, UTC, and ISO 8601 format.
Where you encounter timestamps
- API responses — most REST APIs return dates as Unix timestamps:
"created_at": 1711824000 - JWT tokens — the
iat(issued at) andexp(expiration) claims are Unix timestamps - Database records — many databases store timestamps as integers for efficient sorting and comparison
- Log files — server logs often prefix entries with epoch timestamps
- Cron jobs — scheduling systems reference time in Unix format
Timestamps in code
Quick conversion in common languages:
JavaScript: new Date(1711824000 * 1000) (JS uses milliseconds)
Python: datetime.fromtimestamp(1711824000)
Current time: Date.now() (JS), time.time() (Python)
Tips
- Multiply by 1000 for JavaScript — JS
Dateexpects milliseconds, but most APIs return seconds. Forgetting to multiply is the most common timestamp bug. - Always specify UTC — when converting, be explicit about timezone. "March 31 at midnight" is a different timestamp depending on whether you mean UTC, EST, or PST.
- Use ISO 8601 for display — once converted, format dates as
2024-03-31T00:00:00Zfor unambiguous communication across timezones. - Bookmark the converter — if you work with APIs or databases, you will convert timestamps often enough to want it one click away.
Frequently Asked Questions
What is Unix epoch time?
Unix epoch time (also called POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC. It is the standard way computers represent time internally.
What is the difference between seconds and milliseconds timestamps?
Unix timestamps in seconds are 10 digits (e.g., 1711824000). Millisecond timestamps are 13 digits (e.g., 1711824000000). JavaScript uses milliseconds, most APIs and databases use seconds. The converter auto-detects based on length.
Why is my converted time off by several hours?
Timestamps are always in UTC. The converter shows both UTC and your local time. If the result does not match your expectation, you are probably comparing UTC output to local time, or vice versa.
What happens in 2038?
Systems that store Unix timestamps as 32-bit signed integers will overflow on January 19, 2038. Most modern systems use 64-bit integers, which extends the range far beyond any practical concern.