Unix Timestamp Converter
Convert between Unix timestamps and human-readable dates. Supports seconds and milliseconds, with live clock display.
Timestamp → Date
Date → Timestamp
About the Unix Timestamp Converter
A Unix timestamp (also called Epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC — a moment known as the Unix epoch. This simple integer representation of time is the de facto standard for storing and transmitting time information in computers, databases, APIs, and programming languages. This tool lets you convert Unix timestamps to human-readable dates and vice versa, supporting both second-precision and millisecond-precision timestamps.
The live clock at the top of the page displays the current Unix timestamp, updating in real time. This is useful when you need to quickly grab the current epoch time for logging, debugging, or setting expiry values in authentication tokens and caches.
How to Use This Tool
To convert a timestamp to a date, enter the Unix timestamp (in seconds or milliseconds) in the left panel and click Convert. The tool auto-detects whether your input is in seconds or milliseconds based on its magnitude. You'll see the result in ISO 8601, UTC, local time, relative time (e.g., "3 hours ago"), and both timestamp formats. Use the Now button to quickly populate the current timestamp.
To convert a date to a timestamp, use the date/time picker in the right panel and click Convert. The selected date will be converted to both seconds and milliseconds Unix timestamps, plus ISO 8601 format. Click Set to Now to populate the picker with the current date and time.
Common Use Cases
- API development: Most REST APIs use Unix timestamps for
created_at,updated_at, and expiry fields. - JWT tokens: The
exp(expiration) andiat(issued at) claims in JSON Web Tokens are Unix timestamps in seconds. - Log analysis: Server logs often record timestamps in epoch format; converting them makes debugging significantly easier.
- Database queries: Many databases store dates as integers; converting to readable formats helps verify data correctness.
- Cron and scheduling: Calculating future timestamps for scheduled tasks, TTLs, and cache expiration.
Seconds vs. Milliseconds
Unix timestamps traditionally use seconds, but many modern languages and APIs (including JavaScript's Date.now() and Java's System.currentTimeMillis()) use milliseconds. A seconds timestamp is typically 10 digits (e.g., 1700000000), while a milliseconds timestamp is 13 digits (e.g., 1700000000000). This tool detects the format automatically: any number with 13 or more digits is treated as milliseconds. All conversions run entirely in your browser using JavaScript's built-in Date object — no data is sent to any server.