Unix timestamp converter
Epoch seconds and milliseconds to dates, and back.
Current Unix timestamp, in seconds
Thu, 2026-11-26 11:39:29 UTC
Timestamp to date
Date to timestamp
Pick a valid date and time.
About Unix timestamps
Unix time describes a moment as a single number: how many seconds have gone by since the Unix epoch, which is midnight UTC at the start of 1 January 1970. Leap seconds are not counted. Because the number carries no time zone, the same value means the same instant on every machine, which is why APIs, databases, log files and JWT claims use it.
Two sizes are common. Classic Unix time counts seconds and is currently ten digits long, for example 1700000000. JavaScript, Java and many web APIs count milliseconds, which gives thirteen digits, for example 1700000000000. This converter accepts exactly those two forms and works out the unit from the length.
The result is shown in UTC, in your browser's time zone, and in any zone you pick from the list. Everything is calculated in your browser, and what you type is never uploaded.
Code examples
Get the current Unix timestamp, and turn a timestamp back into a date:
JavaScript
Math.floor(Date.now() / 1000)
new Date(1700000000 * 1000).toISOString() // 2023-11-14T22:13:20.000ZPython
import time
from datetime import datetime, timezone
int(time.time())
datetime.fromtimestamp(1700000000, tz=timezone.utc).isoformat() # 2023-11-14T22:13:20+00:00Java
import java.time.Instant;
long now = Instant.now().getEpochSecond();
Instant.ofEpochSecond(1700000000L); // 2023-11-14T22:13:20ZBash
date +%s
date -u -d @1700000000 # GNU/Linux
date -u -r 1700000000 # macOSPostgreSQL
SELECT floor(EXTRACT(EPOCH FROM now()))::bigint;
SELECT to_timestamp(1700000000) AT TIME ZONE 'UTC'; -- 2023-11-14 22:13:20MySQL
SELECT UNIX_TIMESTAMP();
SELECT FROM_UNIXTIME(1700000000); -- shown in the session time zoneExcel / Google Sheets (timestamp in A1, format the cell as date and time)
=A1/86400+DATE(1970,1,1)FAQ
What is a Unix timestamp?
A count of seconds since the Unix epoch, 1 January 1970 at 00:00:00 UTC. Multiply by 1000 to get milliseconds, the unit JavaScript's Date uses.
How do I tell seconds from milliseconds?
Count the digits. A 10-digit number is seconds and a 13-digit number is milliseconds; between 2001 and 2286 that is unambiguous. A value that looks 1000 times too big for a date is almost certainly milliseconds.
Are Unix timestamps affected by time zones?
No. A timestamp is the same instant everywhere. Time zones only change how that instant is written as a date and time.
How do I convert a Unix timestamp in Excel?
Divide by 86400 and add the epoch date: =A1/86400+DATE(1970,1,1), then format the cell as date and time. For milliseconds divide by 86400000 instead.
How do I use a timestamp in Discord?
Write <t:TIMESTAMP:STYLE> with the timestamp in seconds, not milliseconds, for example <t:1700000000:R>. Discord shows it in each reader's own time zone and language. Styles: t short time, T medium time, d short date, D long date, f long date with short time (the default), F full date with short time, R relative time such as "3 years ago".
Can Unix time represent dates before 1970?
Yes, as negative numbers: -86400 is 31 December 1969, 00:00:00 UTC. This converter currently accepts only 10- and 13-digit timestamps, so negative values and dates before September 2001 are not supported yet.
What is the year 2038 problem?
Systems that store Unix time in a signed 32-bit integer overflow after 2147483647, which is 19 January 2038 at 03:14:07 UTC. Systems that use 64-bit time values are not affected.
Does this converter send my data anywhere?
No. The conversion runs in your browser and what you type is never uploaded.