Unix Timestamp Converter Online

Convert epoch timestamps to human-readable dates and back. Live clock included.

Current Unix Timestamp

Timestamp → Date

Date → Timestamp

Common Timestamp References

Event Timestamp (s) Date (UTC)

What is a Unix Timestamp?

A Unix timestamp (also called epoch time or POSIX time) is a system for describing a point in time. It is defined as the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC — a moment known as the Unix Epoch.

For example, the timestamp 1700000000 represents November 14, 2023, 22:13:20 UTC. Negative values represent dates before 1970.

Millisecond timestamps (13 digits) are common in JavaScript and modern APIs: they simply multiply the second count by 1,000 for higher precision.

Why Do Developers Use Unix Timestamps?

  • Timezone-agnostic — a single integer represents the exact same moment everywhere on Earth, eliminating DST and timezone confusion.
  • Easy arithmetic — calculating durations is as simple as subtraction. "24 hours from now" is just now + 86400.
  • Compact storage — a 32-bit or 64-bit integer stores any date, far more efficient than string formats.
  • Universal support — every major programming language, database, and OS natively handles Unix time.
  • Sortable — timestamps sort naturally as integers, making database indexing and ordering trivial.

Common Use Cases

API Responses
REST and GraphQL APIs frequently return created_at and updated_at as epoch seconds.
JWT Tokens
JSON Web Tokens use iat (issued at) and exp (expiry) as Unix timestamps.
Database Records
PostgreSQL, MySQL, and SQLite store timestamps as integers for performance and portability.
Log Analysis
Server logs and distributed tracing systems use epoch time to correlate events across machines.
Cache Expiry
HTTP headers like Expires and Redis TTLs use Unix time for cache invalidation.
Cron Scheduling
Task schedulers and queue systems use timestamps to determine when to execute jobs.

Quick Reference: Code Examples

JavaScript
// Get current timestamp
const now = Math.floor(Date.now() / 1000);          // seconds
const nowMs = Date.now();                            // milliseconds

// Convert timestamp to Date
const date = new Date(timestamp * 1000);
console.log(date.toISOString());                     // "2023-11-14T22:13:20.000Z"

// Convert Date to timestamp
const ts = Math.floor(new Date('2023-11-14').getTime() / 1000);
Python
import time
from datetime import datetime, timezone

# Get current timestamp
now = int(time.time())                               # seconds

# Convert timestamp to datetime
dt = datetime.fromtimestamp(1700000000, tz=timezone.utc)
print(dt.isoformat())                                # "2023-11-14T22:13:20+00:00"

# Convert datetime to timestamp
ts = int(datetime(2023, 11, 14, tzinfo=timezone.utc).timestamp())

Frequently Asked Questions

What is the difference between seconds and milliseconds timestamps?
A seconds timestamp (10 digits around year 2024) counts full seconds since epoch. A milliseconds timestamp (13 digits) counts milliseconds, offering 1ms precision. JavaScript's Date.now() returns milliseconds; most Unix system calls return seconds.
What is the Unix Y2K38 problem?
32-bit signed integers can store timestamps up to 2,147,483,647 — which corresponds to January 19, 2038, 03:14:07 UTC. After that second, 32-bit systems will overflow. Modern 64-bit systems are not affected.
Does Unix time handle leap seconds?
No. Unix time ignores leap seconds and assumes every day has exactly 86,400 seconds. This means Unix time is not perfectly aligned with atomic time (TAI), but the difference is typically only a few seconds and rarely matters for application development.
What does timestamp 0 represent?
Timestamp 0 represents the Unix Epoch: January 1, 1970, 00:00:00 UTC. Negative timestamps represent dates before 1970.
How do I get the current Unix timestamp in my browser?
Open your browser's developer console and run Math.floor(Date.now() / 1000) for seconds, or Date.now() for milliseconds.