TessaCodeTools

Free Unix Timestamp Converter

Paste a timestamp in seconds, milliseconds, microseconds, or nanoseconds and get every format back in any timezone. Convert dates to epoch values too, with real daylight saving handling.

now17892158372026-09-12T12:23:57Z

paste seconds, millis, micros, or nanos

try:

enter a timestamp to see every format

What a Unix timestamp actually is

A Unix timestamp counts the seconds since midnight UTC on 1 January 1970. That is the whole idea. It is one integer, always in UTC, with no notion of timezone, locale, or formatting baked in, which is exactly why it is the format databases and APIs reach for. Two servers on opposite sides of the planet handed the same timestamp agree on the instant it names, even though they would render it as different wall-clock times.

One wrinkle worth knowing: Unix time deliberately ignores leap seconds. A day is always exactly 86,400 seconds, so the count drifts very slightly from astronomical time. For anything short of satellite navigation, that is a feature rather than a bug, because the arithmetic stays simple.

Seconds, milliseconds, or something worse

The single most common timestamp bug is a unit mismatch, and it is easy to spot once you know the trick: count the digits. Ten digits is seconds, the classic Unix value. Thirteen is milliseconds, which is what JavaScript'sDate.now()returns. Sixteen is microseconds, typical of Postgres and Python'stime.time_ns()divided down. Nineteen is nanoseconds, which Go and Prometheus favour.

Feed a seconds value into a function expecting milliseconds and you land in January 1970. Feed milliseconds where seconds are expected and you end up somewhere around the year 57,000. Both are obviously wrong on sight, which is the good news. The converter above detects the unit from the length so you never have to choose.

Timezones are a rendering concern

A timestamp has no timezone. It never did. The timezone only enters when you turn that integer into something a person reads, which is why storing a UTC timestamp and formatting at display time is the only approach that does not eventually corrupt data.

The direction that actually hurts is the reverse: converting a local wall-clock time back into an epoch value. Daylight saving makes that mapping neither total nor unique. On the spring-forward date an hour of local time does not exist at all, so 2:30am in US Central on 8 March 2026 names no instant. On the autumn fall-back date a different hour happens twice, so 1:30am on 1 November 2026 names two. This converter flags the first case instead of silently returning a value an hour off, which is what most naive implementations do.

Doing it in code

// JavaScript — note that Date works in MILLISECONDS
const seconds = Math.floor(Date.now() / 1000);
const date = new Date(seconds * 1000);

// Python
import time, datetime
time.time()                                  // float seconds
datetime.datetime.fromtimestamp(1757601720)

// SQL
SELECT to_timestamp(1757601720);             -- Postgres
SELECT FROM_UNIXTIME(1757601720);            -- MySQL

// Shell
date -r 1757601720                           // macOS
date -d @1757601720                          // Linux

If you are formatting in the browser, skip the date libraries.Intl.DateTimeFormatships the full IANA timezone database and handles DST correctly. This entire tool is built on it, with no dependencies.

Frequently asked questions

What is a Unix timestamp?+

It is the number of seconds elapsed since midnight UTC on 1 January 1970, known as the Unix epoch. Because it is a single integer in UTC, it carries no timezone or formatting ambiguity, which is why almost every API and database uses it internally.

Is my timestamp in seconds or milliseconds?+

Count the digits. Ten digits is seconds, thirteen is milliseconds, sixteen is microseconds, and nineteen is nanoseconds. This converter detects the unit from the length automatically, so you can paste any of them.

Why does the same timestamp show a different time for my colleague?+

It does not. The timestamp is one instant in UTC; what changes is the local wall-clock rendering of it. Pick a timezone above and you will see the same instant expressed in that zone, offset and DST included.

What is the 2038 problem?+

Systems that store timestamps in a signed 32-bit integer overflow at 2147483647 seconds, which is 19 January 2038. Anything still using a 32-bit time_t will wrap to 1901. Modern platforms use 64-bit values and are unaffected for roughly 292 billion years.

Why did it say my time never existed?+

On the day a zone springs forward for daylight saving, an hour of local clock time is skipped entirely. In US Central, 2:30am on 8 March 2026 simply never happens. Rather than silently landing you an hour off, the converter tells you.