Automatic unit detection
Paste ten digits, thirteen digits, sixteen or nineteen and the converter works out whether you handed it seconds, milliseconds, microseconds or nanoseconds. You can always override the guess.
Convert a Unix timestamp to a readable date, or turn any date into epoch time. This converter detects seconds, milliseconds, microseconds and nanoseconds on its own, then shows the result in your local time zone, in UTC and in ISO 8601 format.
Detected unit: seconds
Ten digits is usually seconds, thirteen digits is usually milliseconds.
Seconds are supported. Leave them at zero if you do not need them.
Local zone: -
Most timestamp tools give you one line of output and leave you guessing about units and time zones. This one answers the follow up questions in the same view.
Paste ten digits, thirteen digits, sixteen or nineteen and the converter works out whether you handed it seconds, milliseconds, microseconds or nanoseconds. You can always override the guess.
Timestamp bugs usually turn out to be time zone bugs. Both readings appear side by side, along with the IANA zone name your browser reports, so mismatches are obvious right away.
ISO 8601, RFC 2822, plain local formatting, relative time, plus the seconds and milliseconds values. Each row has its own copy button, so nothing has to be retyped.
Go from epoch to a readable date, or pick a date and time and read the epoch value back. The same panel handles both jobs without reloading the page.
All arithmetic runs in JavaScript on your device. No timestamp is uploaded, logged or stored, which matters when the value came out of a production log.
No frameworks, no external fonts and no tracking scripts. Every control has a real label, tab order is sensible and focus states are visible.
Use the first tab to convert a Unix timestamp to a date. Use the second tab when you already have a date and need the epoch value.
Drop the raw number straight from your log or database. The unit is detected as you type, and the shortcut buttons cover common reference points.
Results update instantly. Hit the copy button on any row to put that exact string on your clipboard, ready for a ticket, a query or a test fixture.
Handy constants and reference points that come up when you work with Unix time.
| Interval or moment | Value in seconds | Notes |
|---|---|---|
| One minute | 60 | Base unit for most rate limits |
| One hour | 3600 | Also the size of most time zone offsets |
| One day | 86400 | Ignores daylight saving shifts |
| One week | 604800 | Common cache and token lifetime |
| Thirty days | 2592000 | Often used as a billing month |
| One year (365 days) | 31536000 | A leap year adds another 86400 |
| Epoch zero | 0 | 1 January 1970 at 00:00:00 UTC |
| Year 2000 rollover | 946684800 | 1 January 2000 at 00:00:00 UTC |
| Signed 32 bit limit | 2147483647 | 19 January 2038, the year 2038 problem |
// Seconds
Math.floor(Date.now() / 1000);
// Milliseconds
Date.now();
// Timestamp back to a Date
new Date(1767225600 * 1000).toISOString();
import time
from datetime import datetime, timezone
int(time.time()) # seconds
datetime.now(timezone.utc).timestamp() # float seconds
datetime.fromtimestamp(1767225600, tz=timezone.utc)
<?php
time(); // seconds
(int) (microtime(true) * 1000); // milliseconds
gmdate('c', 1767225600); // ISO 8601 in UTC
-- MySQL
SELECT UNIX_TIMESTAMP();
SELECT FROM_UNIXTIME(1767225600);
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
SELECT TO_TIMESTAMP(1767225600);
import java.time.Instant;
Instant.now().getEpochSecond(); // seconds
Instant.now().toEpochMilli(); // milliseconds
Instant.ofEpochSecond(1767225600L).toString();
# Current epoch seconds
date +%s
# Epoch back to a readable date (GNU coreutils)
date -d @1767225600 -u
# macOS and BSD
date -r 1767225600 -u
A Unix timestamp is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC, a moment known as the Unix epoch. It is a single integer with no time zone attached, which makes it easy to store, sort and compare. Almost every operating system, database and API uses some form of it, which is why it shows up constantly in logs, JSON payloads and database columns.
Paste the number into the timestamp field above. The converter detects the unit, then shows the date in your local time zone, in UTC, and in ISO 8601 and RFC 2822 format. Each row has a copy button so you can take the exact string you need.
In code, multiply seconds by 1000 before handing the value to a JavaScript Date, use datetime.fromtimestamp in Python, or FROM_UNIXTIME in MySQL.
Digit count is the quickest tell. For dates in the current era, a ten digit number is seconds, thirteen digits is milliseconds, sixteen digits is microseconds and nineteen digits is nanoseconds. If you convert milliseconds as though they were seconds you land tens of thousands of years in the future, which is usually the first sign something is wrong. The converter above shows its detected unit so you can check before you trust the result.
None. A Unix timestamp counts seconds from a fixed moment in UTC, so the number itself carries no zone or daylight saving information. A time zone only enters the picture when you format that number for a human. That is why this tool displays local time and UTC together, and names the zone your browser is using, so you can see exactly which interpretation you are looking at.
Systems that store Unix time in a signed 32 bit integer can only count up to 2147483647 seconds, which is reached on 19 January 2038 at 03:14:07 UTC. One second later the value overflows and wraps to a negative number, putting the date back in December 1901. Modern platforms use 64 bit integers and are unaffected, but older embedded devices, legacy file formats and some database columns still need attention.
Yes. Negative values represent moments before 1 January 1970. For example, -86400 is 31 December 1969. Plenty of libraries handle negative epoch values correctly, but some older systems and unsigned integer columns do not, so historical dates are worth testing rather than assuming.
No. Every conversion runs in JavaScript inside your own browser. Nothing you type is transmitted, logged or stored, so it is safe to paste values taken from production logs or customer records.
The date was a practical choice made by the early Unix developers in the early 1970s. They needed a recent, round starting point that would not waste the limited range of the integers available on the hardware of the day. 1 January 1970 was close enough to the present to be useful and far enough back to cover the dates people actually recorded, and it simply stuck.
Epoch values turn up in every API response, cron log and database row. Keep this converter one tab away, and pair it with the other free tools on Deepak Surya.