Unix Time to Datetime Converter

Current Unix Time
Advertisement

Unix Time to Datetime Converter

Converting Unix time to a datetime string gives you a human-readable representation of a timestamp. While computers work efficiently with raw integers, users and most display systems need formatted datetime strings. This tool outputs the result in four formats: ISO 8601 (the international standard), UTC string, local time, and a relative description like "2 hours ago."

ISO 8601 is the most useful datetime string format for software because it's unambiguous, sortable as a string, and universally understood. The format 2026-04-17T10:35:00.000Z tells you the date, time, and timezone (Z = UTC) in a single compact string. When you need to store a datetime as text, ISO 8601 is almost always the right choice.

Unix time to datetime in code

JavaScript — ISO string:
new Date(ts * 1000).toISOString() // "2023-11-14T22:13:20.000Z"

Python — formatted string:
datetime.utcfromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')

PHP:
date('c', ts) // ISO 8601
date('r', ts) // RFC 2822

Go:
time.Unix(ts, 0).UTC().Format(time.RFC3339) // ISO 8601

Java:
Instant.ofEpochSecond(ts).toString() // ISO 8601

The converter above handles all datetime output formats automatically. Enter your Unix timestamp and choose a timezone to see all representations at once.

Advertisement
// Epoch → Human-readable date

Auto-detects seconds (10 digits), milliseconds (13), microseconds (16), nanoseconds (19)

Invalid timestamp. Please enter a numeric Unix timestamp.
// Date → Epoch timestamp
Please check the values — year (1970–9999), month (1–12), day (1–31), hour (0–23), min/sec (0–59).

Or paste a date string:

Could not parse that date string.
Advertisement

← Back to all tools

Copied!