Home » Developer Tools » Unix Timestamp Converter

Unix Timestamp Converter

Convert both ways between Unix timestamps in seconds and readable dates, in UTC and in your local browser time.

Last updated 13 November 2026

Use the tool
UTC: Not setLocal: Not set
Unix seconds: Not set

Unix timestamps here are in seconds, not milliseconds. If your timestamp has 13 digits, it is probably in milliseconds, so divide it by 1000 first.

A Unix timestamp counts seconds since 1 January 1970 in UTC. Systems use it because it is a single number that avoids time zone text, daylight saving confusion and different date formats.

This tool converts both ways: from a Unix timestamp in seconds to a readable date in UTC and in your local time, and from a date and time you pick to a Unix timestamp in seconds.

How to Use This Tool

  1. Timestamp to date: enter seconds, then click Convert to Date.
  2. Date to timestamp: pick a date and time, then click Convert to Timestamp.
  3. Check seconds versus milliseconds: if your number has 13 digits, it is probably milliseconds, so divide it by 1000 first.

Good Practice Tips

  • Store UTC, show local: store timestamps in UTC, then convert to local time only for display.
  • Watch the unit: mixing seconds and milliseconds is the most common timestamp bug.
  • Test edge dates: daylight saving changes can shift local times, so test dates near a clock change.

What Is a Unix Timestamp

A Unix timestamp is a single number that stands for one moment in time. It counts the seconds since 1 January 1970 at 00:00:00 UTC, a starting point known as the Unix epoch. The number 0 means the epoch itself, 1 means one second past it, and every second after that adds 1 to the count. There are 86,400 seconds in a day, so a timestamp grows by 86,400 each day.

Systems use this number because it avoids the problems of written dates. A written date can appear in many formats, it can leave out the time zone, and it can be read differently in different places. A timestamp has none of those problems: it is one plain number, it always means the same moment everywhere, and two timestamps can be compared or sorted like any other numbers. Databases, log files, file systems, web APIs and login tokens all store moments this way.

Unix time does not count leap seconds. The count is a steady run of nominal seconds since the epoch, and the occasional leap second added to civil time is not part of it. For almost every everyday use that detail does not matter, but it is why a Unix timestamp can differ by a few seconds from a strict count of physical seconds since 1970.

Worked Examples

These four values cover the range most people meet. Paste any of them into the tool above to check the result yourself. All dates below are in UTC; your local time for the same moment depends on your time zone.

Timestamp in secondsDate in UTCWhat it is
01970-01-01 00:00:00The Unix epoch itself
10000000002001-09-09 01:46:40One billion seconds after the epoch
17000000002023-11-14 22:13:20A recent timestamp, checked with the live tool
21474836472038-01-19 03:14:07The largest value a signed 32 bit integer can hold

The last row is also the moment the Year 2038 problem arrives, covered below.

Seconds or Milliseconds

The most common timestamp mistake is mixing up seconds and milliseconds. Right now a Unix timestamp in seconds has 10 digits, while the same moment in milliseconds has 13 digits. This tool takes seconds only. If your number has 13 digits, divide it by 1000 first and paste the result. For example, 1700000000000 milliseconds divided by 1000 is 1700000000 seconds, which is 14 November 2023 at 22:13:20 UTC.

The two units come from different languages. JavaScript Date.now() returns milliseconds, and Java System.currentTimeMillis() does the same, so values copied from browser developer tools or Java code are usually in milliseconds. Python time.time() and PHP time() return seconds, so values from those languages are usually ready to paste as they are. If a date you convert lands tens of thousands of years in the future, a milliseconds value read as seconds is almost always the cause.

The Year 2038 Problem

On 19 January 2038 at 03:14:07 UTC, the largest value a signed 32 bit integer can hold runs out. That value is 2147483647, and one second later a system that still stores timestamps in 32 bit signed integers wraps around to a negative number, which it reads as a date in December 1901.

This is the Year 2038 problem, the timestamp version of the Year 2000 problem. Most modern systems already store timestamps in 64 bit integers, which will not run out for billions of years, so the risk sits mainly in old embedded devices and old file formats. If you work with old systems, check whether they store time in 32 bit or 64 bit form before you trust a date past 2038.

Get the Current Timestamp in Code

The snippets below show how to get the current Unix timestamp and how to convert the example value 1700000000 in four common languages. Each one gives the same moment: 14 November 2023 at 22:13:20 UTC.

JavaScript:

const now = Math.floor(Date.now() / 1000);
const date = new Date(1700000000 * 1000).toISOString();
// now is the current Unix timestamp in seconds
// date is 2023-11-14T22:13:20.000Z

Python:

import time
from datetime import datetime, timezone
now = int(time.time())
date = datetime.fromtimestamp(1700000000, timezone.utc)
# now is the current Unix timestamp in seconds
# date is 2023-11-14 22:13:20+00:00

PHP:

$now = time();
$date = gmdate('Y-m-d H:i:s', 1700000000);
// $now is the current Unix timestamp in seconds
// $date is 2023-11-14 22:13:20

Bash, on Linux:

date +%s
date -u -d @1700000000 +'%Y-%m-%d %H:%M:%S'
# the first line prints the current Unix timestamp in seconds
# the second line prints 2023-11-14 22:13:20

The Bash lines use GNU date, which is the version on Linux. The macOS version of date takes different options.

Unix Time or ISO 8601

Unix time and ISO 8601 describe the same moment in different ways. Unix time is a number, the count of seconds since the epoch. ISO 8601 is a text format, and the same moment written in it looks like 2023-11-14T22:13:20Z, where the T separates the date from the time and the Z means UTC.

The number is compact, easy to store in a database, and easy to sort. The text is easy for a person to read, and it can carry a time zone offset, like +02:00, which a plain timestamp cannot. Use the number when systems pass a moment between each other, and use the ISO text when a person needs to read it. This tool shows the UTC form of the moment and your local form side by side, so you can check either one against the number you started with.

Frequently Asked Questions

What is a Unix timestamp?

It is the count of seconds since 1 January 1970 in UTC, used by many systems as a single number for a moment in time.

Why does my timestamp look too large?

A 13 digit number is probably in milliseconds, not seconds. Divide it by 1000 before using this tool.

Is the date to timestamp conversion in local time?

Yes. The date you pick is read in your local browser time, then converted to Unix seconds.

Is my input uploaded to a server?

No. Everything runs in your browser on your own device, so your numbers never leave your computer.

Is a Unix timestamp in seconds or milliseconds?

It depends on the system, but this tool uses seconds. A Unix timestamp in seconds has 10 digits right now, while one in milliseconds has 13 digits. JavaScript Date.now() returns milliseconds, while Python time.time() and PHP time() return seconds. If your number has 13 digits, divide it by 1000 before you paste it here.

What happens on 19 January 2038?

At 03:14:07 UTC on 19 January 2038, the largest value a signed 32 bit integer can hold runs out. Systems that still store timestamps that way wrap around to December 1901. Modern 64 bit systems are not affected.

Are timestamps affected by time zones or daylight saving?

No. A Unix timestamp is always counted from UTC, so it means the same moment everywhere. Time zones and daylight saving only change how that moment is shown as a date and time. That is why this tool shows both the UTC time and your local time.

Can I convert a date before 1970?

Yes. Dates before 1 January 1970 give a negative timestamp. For example, 1 January 1960 is -315619200. Pick the date in the tool and it converts the same way as any later date.

What is the difference between Unix time and ISO 8601?

Unix time is a single number, the count of seconds since 1 January 1970 in UTC. ISO 8601 is a text format for the same moment, like 2023-11-14T22:13:20Z. The number is compact and easy to sort, while the text is easy for a person to read.

↑