How to convert a Unix timestamp
Paste a timestamp into Timestamp → date. The converter detects whether it's in seconds (10 digits) or milliseconds (13 digits) and shows the moment in Indian Standard Time, UTC and ISO 8601 format. To go the other way, pick a date and time in Date → timestamp. The live clock at the top shows the current epoch time.
Unix time explained
Unix time counts the seconds since the Unix epoch: 1 January 1970, 00:00:00 UTC. Because it's a single number with no time zone, it's ideal for storing and comparing moments across servers, databases and APIs. Converting to a local time is only needed when displaying it to people.
| Timestamp (s) | Moment (UTC) |
|---|---|
0 | 1 Jan 1970, 00:00:00 |
1000000000 | 9 Sep 2001, 01:46:40 |
1700000000 | 14 Nov 2023, 22:13:20 |
2000000000 | 18 May 2033, 03:33:20 |
2147483647 | 19 Jan 2038, 03:14:07 (32-bit limit) |
Getting the current timestamp in code
- JavaScript:
Math.floor(Date.now() / 1000)—Date.now()returns milliseconds - PHP:
time(), ornow()->timestampin Laravel - Python:
int(time.time()) - MySQL:
UNIX_TIMESTAMP()andFROM_UNIXTIME(ts) - Linux shell:
date +%s
Common pitfalls
- Seconds vs. milliseconds. JavaScript and Java use milliseconds; most Unix tools, PHP and JWTs use seconds. Passing seconds to
new Date()gives a date in January 1970. - Time zones. Store UTC, convert at display time. IST is UTC+05:30 all year — India has no daylight saving time.
- MySQL
TIMESTAMPcolumns are limited to 2038; useDATETIMEor aBIGINTfor dates beyond that.
Checking token expiry? The JWT decoder converts exp and iat automatically.
Frequently asked questions
What is a Unix timestamp?
A Unix timestamp (epoch time) is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. It's a time-zone-independent way for computers to store a moment in time.
How do I tell seconds from milliseconds?
Current timestamps in seconds have 10 digits (e.g. 1758500000), while milliseconds have 13 digits (e.g. 1758500000000). This converter detects the unit automatically.
How do I convert a timestamp to IST?
IST is UTC+5:30 with no daylight saving. Convert the timestamp to UTC and add 5 hours 30 minutes, or just paste it above to see the IST time directly.
What is the Year 2038 problem?
Systems storing Unix time as a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038. Modern systems use 64-bit integers, which won't overflow for billions of years.
Last updated: 22 September 2026Suggest an improvement · Report a problem
