Unix timestamp converter

Paste a Unix timestamp to see the date it stands for, in UTC and in your local time, or pick a date to get its timestamp. Seconds, milliseconds, microseconds and nanoseconds are detected.

  • Free
  • No sign-up
  • Runs in your browser
unix-timestamp-converter

Fill in the values above to see the result.

100% private — the calculation is done in your browser and nothing is sent to any server.

Guides: Unix timestamps explained: seconds, milliseconds and the year 2038 · How to read a JWT, and why decoding is not verifying

How it works

Paste a timestamp or pick a date

From a log, a database, an API or your code.

Check the unit

It is detected from the length, or you can set it.

Read the conversions

UTC, ISO 8601, your local time, RFC 2822 and how long ago it was.

What date is 1700000000?

A Unix timestamp is the number of seconds that have passed since midnight UTC on 1 January 1970, known as the epoch. It is how a huge amount of software stores and exchanges moments in time: databases, log files, APIs, tokens, file systems and programming languages. It is compact and unambiguous, but impossible for a person to read. This converter translates it into a date you can understand, and back.

Seconds, milliseconds and beyond

The classic timestamp counts seconds and has 10 digits today, but many systems count in milliseconds, which gives 13 digits, and some in microseconds or nanoseconds, with 16 and 19 digits. JavaScript and Java use milliseconds, while most databases and shell tools use seconds. Getting the unit wrong gives a date in 1970 or thousands of years in the future, so the tool guesses the unit from the number of digits and you can override it. It always shows both the seconds and the milliseconds for the moment.

What you get from a timestamp

  • UTC in ISO 8601, the format used by APIs, such as 2026-09-21T10:30:00Z.
  • Local time in your own time zone, with the zone named.
  • RFC 2822, the format used in email and HTTP headers.
  • A relative description such as "3 days ago" or "in 2 hours".

From a date to a timestamp

Switch the mode, pick a date and time, and say whether it is in your local time zone or in UTC. The tool returns the timestamp in seconds and milliseconds, ready to paste into a query or a test. The distinction between local time and UTC matters: the same wall-clock time is a different timestamp in different zones.

The year 2038 and negative values

Timestamps before 1970 are negative numbers and work fine. Systems that store the value in a 32-bit signed integer will run out on 19 January 2038, the "year 2038 problem". This tool uses 64-bit arithmetic and is not affected, and it can show dates well beyond that.

What it does not do

Timestamps carry no time zone and no leap seconds, and this converter follows the same convention, in which every day has exactly 86,400 seconds. Dates before the adoption of the Gregorian calendar use the same proleptic calendar as your browser. For other date formats, see the ISO 8601 converter.

In Excel and Google Sheets

Excel and Google Sheets count days from 1900, and a Unix timestamp counts seconds from 1970, so the conversion is a division and the date of 1 January 1970. With a timestamp in seconds in A2, one in milliseconds in B2 and a date and time in C2:

Spreadsheet formulas for this calculation
To getFormulaResult
Seconds to date and time (UTC)=A2/86400+DATE(1970,1,1)2023-11-14 22:13:20
Milliseconds to date and time (UTC)=B2/86400000+DATE(1970,1,1)2023-11-14 22:13:20
The same, one hour ahead of UTC=A2/86400+DATE(1970,1,1)+1/242023-11-14 23:13:20
Date and time to a timestamp in seconds=(C2-DATE(1970,1,1))*864001700000000

The formulas use English function names and commas. If your Excel or Google Sheets is set to another language, the function names change, and in many countries the separator between arguments is a semicolon.

  • Format the result cell as a date and time. The numbers are the same in Excel and in Google Sheets; 25569 is the serial number of 1 January 1970.
  • Use 86400 for 10-digit timestamps (seconds) and 86400000 for 13-digit ones (milliseconds). A date in 1970 usually means the unit was wrong.
  • NOW() returns local time, but the formulas above give UTC. Add or subtract the offset divided by 24, as in the third row.

In code

A Unix timestamp counts seconds since 1 January 1970 UTC. Each snippet below was run and the comments show the real output for 1700000000.

Python

from datetime import datetime, timezone

print(datetime.fromtimestamp(1700000000, tz=timezone.utc).isoformat())  # 2023-11-14T22:13:20+00:00

moment = datetime(2023, 11, 14, 22, 13, 20, tzinfo=timezone.utc)
print(int(moment.timestamp()))  # 1700000000

JavaScript (browser and Node.js)

console.log(new Date(1700000000 * 1000).toISOString());  // 2023-11-14T22:13:20.000Z
console.log(Math.floor(new Date("2023-11-14T22:13:20Z").getTime() / 1000));  // 1700000000
console.log(Math.floor(Date.now() / 1000));  // the current timestamp, which changes every second

Command line

date -u -r 1700000000  # macOS and BSD: Tue Nov 14 22:13:20 UTC 2023
date -u -d @1700000000  # Linux (GNU): Tue Nov 14 22:13:20 UTC 2023
date +%s  # the current timestamp, on both
  • JavaScript counts in milliseconds, so multiply seconds by 1000 for new Date() and divide by 1000 for the other way. A date in January 1970 usually means a timestamp in seconds was read as milliseconds.
  • Pass tz=timezone.utc in Python. datetime.utcfromtimestamp() still exists but has been deprecated since Python 3.12 and returns a date with no time zone attached.
  • The macOS and Linux date commands use different options for the same job, which is why both are shown.

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 1 January 1970 at 00:00:00 UTC. It is a compact way for software to represent a moment in time.

How do I convert a Unix timestamp to a date?

Paste it into the box. The tool shows the date in UTC, in your local time and in other standard formats.

How do I know if my timestamp is in seconds or milliseconds?

By its length: 10 digits is seconds, 13 is milliseconds. The tool detects it, and you can set the unit yourself.

How do I get the current timestamp?

Press "Use the current time" and the present moment is loaded.

What is the year 2038 problem?

Systems that keep the timestamp in a 32-bit signed integer overflow on 19 January 2038. This tool is not limited that way.

Is my data sent anywhere?

No. The conversion is done in your browser.

How do I convert a Unix timestamp to a date in Excel?

Divide the timestamp by 86400 and add the date 1 January 1970: =A2/86400+DATE(1970,1,1). Format the cell as a date and time. For millisecond timestamps divide by 86400000 instead.

How do I convert a Unix timestamp to a date in Python?

Use datetime.fromtimestamp(1700000000, tz=timezone.utc) with from datetime import datetime, timezone. Its isoformat() gives 2023-11-14T22:13:20+00:00.