Timestamp Converter
Convert Unix timestamps to human-readable dates (ISO 8601, UTC, local, relative) and convert dates back to Unix epoch time instantly in your browser.
Unix Timestamp → Human-Readable Date
Date / Time → Unix Timestamp
What is a Unix Timestamp?
A Unix timestamp is an integer representing the number of seconds elapsed since the Unix epoch — January 1, 1970 at 00:00:00 Coordinated Universal Time (UTC). It is also commonly called epoch time or POSIX time. Because it is timezone-agnostic, Unix timestamps are the universal currency of time in computing: databases store them, APIs return them, and log files record them.
How to Use This Tool
- Timestamp to date: Enter a Unix timestamp (seconds or milliseconds) and the tool instantly shows the ISO 8601, UTC, local, and relative representations.
- Date to timestamp: Type any human-readable date string (e.g.
2024-03-29T00:00:00ZorMarch 29 2024) to get the Unix timestamp in both seconds and milliseconds. - Now: Click the "Now" button to load the current timestamp.
- s / ms toggle: Switch between seconds (10-digit) and milliseconds (13-digit) input.
Output Formats Explained
- ISO 8601 — The international standard format:
2024-03-29T00:00:00.000Z. Used in APIs, JSON payloads, and HTML datetime attributes. - UTC — The long-form UTC date string:
Fri, 29 Mar 2024 00:00:00 GMT. Used in HTTP headers (Date,Last-Modified). - Local — The timestamp converted to your browser's local timezone.
- Relative — A human-friendly relative description: "2 hours ago", "in 3 days".
Unix Time in Programming
Every major language has built-in support for Unix timestamps.
- JavaScript:
Date.now()returns milliseconds;Math.floor(Date.now() / 1000)gives seconds. Convert back withnew Date(ts * 1000). - Python:
import time; time.time()returns a float in seconds. Usedatetime.fromtimestamp(ts)to convert. - SQL:
UNIX_TIMESTAMP()in MySQL,EXTRACT(EPOCH FROM NOW())in PostgreSQL.
Related Guides
- Unix Timestamps & Epoch Time Guide — everything about epoch time, Y2038, and timezone pitfalls
- Epoch to Date Conversion in 6 Languages — code snippets for JS, Python, Go, Java, PHP, and Rust
- Cron Syntax: Fields, Examples & Tips — schedule tasks using Unix time
Related Articles
Epoch to Date: Convert Unix Timestamps in JS, Python, Go, Java, PHP & Rust
Convert epoch to date in JavaScript, Python, Go, Java, PHP, and Rust. Copy-paste code snippets with timezone-aware examples and common pitfalls.
Unix Timestamps & Epoch Time Guide
What epoch time is and how to convert Unix timestamps in JavaScript, Python, and Go. Covers the Y2038 problem, timezone pitfalls, and millisecond precision.