Unix Timestamp Converter — Seconds to Date, Date to Epoch
A Unix timestamp is the number of seconds since January 1, 1970 00:00:00 UTC — a single integer that represents any moment in time, independent of timezone. Paste a timestamp to see the date, or pick a date to get its timestamp. All conversions run locally in your browser.
What is a Unix timestamp?
A Unix timestamp (also called Epoch time or POSIX time) counts the seconds elapsed since the Unix Epoch — midnight UTC on January 1, 1970. It provides a timezone-independent way to store and compare times across systems. See: POSIX specification.
Why Use This Tool
- Database timestamps — Store event times as integers for fast sorting and comparison.
- JWT expiry claims — The exp claim in JWTs is a Unix timestamp. Decode JWTs →
- API parameters — Many APIs accept timestamps as query parameters. URL encode params →
- Log file analysis — Convert log timestamps to readable dates for debugging.
- Cache headers — HTTP cache expiration often uses Unix time.
- Cron scheduling — Calculate future timestamps for scheduled tasks.
Tips
- Timestamps are always UTC — convert to local time only for display.
- 10 digits = seconds, 13 digits = milliseconds.
- JavaScript Date.now() returns milliseconds; divide by 1000 for seconds.
- Negative timestamps represent dates before 1970.
- 32-bit max is 2147483647 (Jan 2038) — use 64-bit for future dates.
How to Use the Unix Timestamp Converter
Choose conversion direction
Select "→ Date" to convert a Unix timestamp to a human-readable date, or "→ Timestamp" to convert a date to Unix time.
Enter your value
Paste a Unix timestamp (in seconds) into the number field, or use the date/time picker to select a specific moment.
Use "Now" for current time
Click Use Now to instantly populate the current Unix timestamp or current local date — useful for quick checks.
Copy the result
Click Copy Result to copy the converted value to your clipboard, ready for code, APIs, or databases.
Worked Examples
Timestamp to date
1700000000
November 14, 2023 at 10:13:20 PM UTC
Date to timestamp
2024-01-01 00:00:00 UTC
1704067200
Y2K moment
946684800
January 1, 2000 at 12:00:00 AM UTC
The famous Y2K timestamp.
Milliseconds to seconds
1700000000000 (ms)
1700000000 (÷ 1000)
JavaScript Date.now() returns milliseconds — divide by 1000.
Common Errors & How to Fix Them
| Error Message | Cause | Fix |
|---|---|---|
⚠ Enter a valid integer timestamp | Input contains non-numeric characters | Unix timestamps are integers only. Remove any decimals, commas, or letters. |
⚠ Invalid timestamp value | Number is too large or produces an invalid date | Check if your timestamp is in milliseconds (13 digits) instead of seconds (10 digits). |
Date shows wrong timezone | Confusion between local time and UTC | Unix timestamps are always UTC. The displayed time is converted to your local timezone. |
Seconds vs Milliseconds
| Feature | Seconds | Milliseconds |
|---|---|---|
| Digits | 10 digits (2020s) | 13 digits (2020s) |
| Precision | 1 second | 1 millisecond |
| Used by | Unix, Python, PHP, SQL | JavaScript, Java |
| Example (now) | 1699900000 | 1699900000000 |
| Convert | Multiply by 1000 | Divide by 1000 |
Frequently Asked Questions
What is a Unix timestamp?
A Unix timestamp is the number of seconds elapsed since January 1, 1970 00:00:00 UTC (the Unix Epoch). It provides a single integer that represents any moment in time, independent of timezone.
How do I convert Unix timestamp to IST (India Standard Time)?
Unix timestamps are always in UTC. Add 5 hours 30 minutes (19800 seconds) to get IST, or use this converter which displays in your local timezone automatically.
Seconds vs milliseconds — how can I tell?
Count the digits. In the 2020s, timestamps in seconds have 10 digits (like 1700000000), while milliseconds have 13 digits (like 1700000000000). JavaScript Date.now() returns milliseconds.
What is the Y2K38 problem?
32-bit signed integers can only hold timestamps up to 2147483647, which is January 19, 2038. Modern 64-bit systems use larger integers and are not affected.
Are timestamps timezone-aware?
No. A Unix timestamp always represents a moment in UTC. Timezone conversion happens at display time when you format it for users.
How do I get the current Unix timestamp?
Click "Use Now" in this tool. In code: JavaScript: Math.floor(Date.now()/1000), Python: int(time.time()), PHP: time().