Unix Timestamp Converter

Convert a Unix timestamp to a readable date and back. This Unix timestamp converter detects seconds, milliseconds, microseconds and nanoseconds, and shows UTC, your local time, any time zone, ISO 8601, RFC 2822 and relative time.

Current Unix timestamp
In milliseconds
Timestamp to date

Examples
UTC
Selected time zone
Your local time
ISO 8601 (UTC)
ISO 8601 with offset
RFC 2822
HTTP date
Relative
Day of week
Unix seconds
Milliseconds
Microseconds
Nanoseconds
Day of year
ISO week
Date to timestamp

ISO 8601 (2024-03-15T14:30:00Z), RFC 2822 (Fri, 15 Mar 2024 14:30:00 +0000) or 2024-03-15 14:30:00. Without an offset, the time is read in the time zone below.

Unix seconds
Milliseconds
Microseconds
Nanoseconds
ISO 8601 (UTC)
ISO 8601 with offset
RFC 2822
Relative
secondsmillisecondsmicrosecondsnanosecondsdigits

Convert Epoch Time to a Readable Date

Logs, databases, JWT tokens and APIs store moments in time as a plain number: the seconds (or milliseconds) since 1 January 1970 UTC. Paste that number into this Unix timestamp converter and it shows the exact date and time, in UTC, in your own time zone and in any other zone, with a live clock of the current timestamp at the top.

It also works the other way round: type a date, pick the time zone it belongs to and copy the timestamp in seconds, milliseconds, microseconds or nanoseconds. Large values are handled with exact integer math, and everything runs in your browser.

Unix timestamp converted to a calendar date17000000002023-11-14Unix Timeto Date

How to convert a Unix timestamp

  1. Paste the timestamp into the Unix timestamp box, or click Now. The unit is detected from the number of digits; choose it yourself if the guess is wrong.
  2. Pick a time zone to see the date in that zone next to UTC and your local time.
  3. Copy the format you need: ISO 8601 for APIs and JSON, RFC 2822 for email headers, the HTTP date for Expires and Last-Modified headers.
  4. For the reverse, type a date in the right-hand panel, choose the zone it is in and copy the timestamp.

How Unix time works

Unix time counts the seconds since the Unix epoch, 1970-01-01 00:00:00 UTC. Every day is exactly 86,400 seconds, because leap seconds are ignored, so converting is simple arithmetic: divide by 86,400 to get the day number and use the remainder for the time of day.

For example, 1700000000 ÷ 86400 = 19675 with a remainder of 80,000 seconds. Day 19,675 after the epoch is 14 November 2023, and 80,000 seconds is 22 hours, 13 minutes and 20 seconds, so the timestamp is 2023-11-14T22:13:20Z.

A timestamp has no time zone: it marks the same instant everywhere. The zone only matters when you display it, which is why the same number reads 22:13 in London and 17:13 in New York. Negative numbers are dates before 1970.

Seconds, milliseconds, microseconds or nanoseconds?

UnitDigits todaySame instantTypical sources
Seconds101700000000Unix date +%s, PHP time(), JWT exp and iat
Milliseconds131700000000000JavaScript Date.now(), Java System.currentTimeMillis()
Microseconds161700000000000000Go UnixMicro(), many tracing systems
Nanoseconds191700000000000000000Go UnixNano(), Python time.time_ns()

Auto-detect treats values below 1011 as seconds, below 1014 as milliseconds, below 1017 as microseconds and anything larger as nanoseconds. That is right for any date between 1973 and 5138; for older dates, set the unit by hand.

Notable Unix timestamps

TimestampDate and time (UTC)Why it matters
01970-01-01 00:00:00The Unix epoch
10000000002001-09-09 01:46:40First 10-digit timestamp
12345678902009-02-13 23:31:30A popular test value
17000000002023-11-14 22:13:20Example used on this page
20000000002033-05-18 03:33:20Two billion seconds
21474836472038-01-19 03:14:07Largest signed 32-bit value (Year 2038 problem)
-21474836481901-12-13 20:45:52Smallest signed 32-bit value
42949672952106-02-07 06:28:15Largest unsigned 32-bit value
99999999992286-11-20 17:46:39Last 10-digit timestamp

Get the current timestamp in code

LanguageCurrent timestamp (seconds)Timestamp to date
JavaScriptMath.floor(Date.now() / 1000)new Date(ts * 1000)
Pythonint(time.time())datetime.fromtimestamp(ts, timezone.utc)
PHPtime()date(DATE_ATOM, $ts)
Gotime.Now().Unix()time.Unix(ts, 0)
JavaInstant.now().getEpochSecond()Instant.ofEpochSecond(ts)
PostgreSQLextract(epoch from now())to_timestamp(ts)
MySQLUNIX_TIMESTAMP()FROM_UNIXTIME(ts)
Shelldate +%sdate -d @ts (GNU), date -r ts (macOS)

Tips for working with timestamps

  • A date in January 1970 usually means milliseconds were read as seconds, or the other way round. Check the digit count.
  • Store UTC, display local. Keep timestamps or UTC ISO strings in your database and convert to the user's zone only when you show them.
  • Mind the Year 2038 problem. Signed 32-bit integers overflow after 2147483647. Use 64-bit columns and types for new code.
  • Date-only strings are tricky. JavaScript reads 2024-03-15 as UTC midnight but 2024-03-15T00:00 as local midnight. This tool reads both in the zone you choose.
  • Scheduling a job? Check its run times with the cron expression parser. Debugging a request? Inspect timing data in the HAR viewer and the expiry of cookies with the cookie parser.

Frequently Asked Questions

Common questions about Unix timestamps and epoch time.

It is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC, not counting leap seconds. It is also called epoch time or POSIX time.

Count the digits. Current dates have 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter detects this automatically.

No. A timestamp marks one instant that is the same everywhere. Only the displayed date and time change with the time zone.

On 19 January 2038 at 03:14:07 UTC, the timestamp passes 2,147,483,647, the largest value of a signed 32-bit integer. Systems that store it in 32 bits overflow to 1901; 64-bit systems are not affected.

Yes. Negative values count backwards from the epoch, so -86400 is 31 December 1969 at 00:00 UTC.

POSIX defines every day as exactly 86,400 seconds, which keeps date arithmetic simple. During a leap second the clock repeats or smears a second instead.

ISO 8601 looks like 2023-11-14T22:13:20Z and is used in JSON and APIs. RFC 2822 looks like Tue, 14 Nov 2023 22:13:20 +0000 and is used in email headers.

No. All conversions run in your browser with JavaScript, using exact integer math for large values.