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.