Developer tool

Timestamp Converter

Convert between Unix time and readable dates without sending data anywhere.

Runs in your browser. No upload.

Unix timestamp to date

UTC—

Your local time—

Date to Unix timestamp

Seconds—

Milliseconds—

Your dates stay in this browser.

About this tool

Timestamp Converter made simple.

See UTC and local time together, with seconds and milliseconds ready to copy into your code.

Guide

Using Timestamp Converter

The Timestamp Converter turns a Unix timestamp into a readable date, and a date back into a Unix timestamp. Type a number of seconds or milliseconds to see that moment in UTC and in the time zone of your device. Pick a date and time to get both the seconds and the milliseconds. The work is done in your browser, so the local time depends on your own clock and settings.

How to use it

  1. To read a number as a date, type the Unix timestamp into the first box and press Convert to date. The UTC line and your local time line fill in.
  2. To get a number from a date, choose a date and time in the second box. It uses your own time zone. Then press Convert to timestamp.
  3. Read the seconds and milliseconds, then press Copy result to copy the lines that have a value. Clear empties both boxes.

Worked examples

A timestamp in seconds

You enter
Unix timestamp
1710000000
You get
Utc
2024-03-09T16:00:00.000Z

The number is small enough to be read as seconds since 1 January 1970 UTC. The UTC line is the same for everyone. The local line depends on the device, so it is not shown here.

Run through the tool’s own code.

The same moment in milliseconds

You enter
Unix timestamp
1710000000000
You get
Utc
2024-03-09T16:00:00.000Z

With 13 digits the number is read as milliseconds, which gives the same instant. The tool treats any value whose size is 100,000,000,000 or more as milliseconds, and anything smaller as seconds.

Run through the tool’s own code.

A date turned into a timestamp

You enter
Date time
2024-03-09T16:00
Device time zone
UTC
You get
Seconds
1710000000
Milliseconds
1710000000000

The box is read in the time zone of your device. On a device set to UTC the answer is 1710000000. Set to Kuala Lumpur (UTC+8) it gives 1709971200, and set to Madrid (UTC+1 on that date) it gives 1709996400.

Run through the tool’s own code.

Where seconds turn into milliseconds

You enter
First
99999999999
Second
100000000000
You get
First
5138-11-16T09:46:39.000Z
Second
1973-03-03T09:46:40.000Z

The first number is just under the cut-off, so it is read as seconds and lands in the year 5138. The second is on the cut-off, so it is read as milliseconds and lands in 1973.

Run through the tool’s own code.

When it helps

  • Read a raw timestamp from a log line, a database row or an API reply.
  • Make a timestamp for a test case or a query that filters by date.
  • Check which instant a number means before you quote it in a bug report.
  • Compare what a moment looks like in UTC and in your own time zone.

Limits to keep in mind

  • A value of 100,000,000,000 or more is always read as milliseconds. So you cannot enter a seconds value that large, which would be a date after the year 5138.
  • The date and time box picks to the minute in normal use, so the seconds part of the answer is 00. To work to the second, use a number in the first box.
  • Unix time counts every day as 86,400 seconds, so leap seconds are not included. Dates must fall within the range a browser can show, plus or minus 8,640,000,000,000,000 milliseconds.
  • Local time follows your device. If your clock or time zone is wrong, the local line and the date-to-number result are wrong too.

Tips

  • For present-day dates, a number with 10 digits is usually seconds and one with 13 digits is usually milliseconds.
  • Share the UTC line, not the local one, when you write to other people, because the UTC line reads the same in every place.
  • Negative numbers work and count back from 1970. For example -86400 gives 1969-12-31T00:00:00.000Z.

Sources

Common questions

About Timestamp Converter.

How do I convert a Unix timestamp to a date?

Type the number in the first box and press Convert to date. You get the moment in UTC, written as year, month, day, time and a Z, and a second line with the same moment in your local time zone.

What is the difference between seconds and milliseconds?

Both count from 1 January 1970 at 00:00 UTC. A second-based timestamp counts whole seconds. A millisecond-based one counts thousandths of a second, so it has three more digits and is a thousand times larger.

How does the tool know which unit I typed?

It looks at the size. If the number, ignoring its sign, is 100,000,000,000 or more, it is treated as milliseconds. Anything smaller is treated as seconds. Decimals such as 1710000000.5 work too.

What does the Z at the end of the UTC line mean?

Z stands for UTC, the time standard with no offset. A line ending in Z shows the same clock time in every place, which makes it handy for logs and messages shared between time zones.

Why does my local time look different from the UTC line?

The local line applies your device's time zone and its daylight saving rules. If you are one hour ahead of UTC, the local clock time is one hour later than the UTC time.

What happens if I type something that is not a number?

The page says to enter a valid Unix timestamp. The earlier UTC result may stay on screen, so check the status line below the buttons and do not rely on the old line.

Is anything I type sent to a server?

No. The conversions run in your browser and the page keeps nothing. The dates you enter stay on your device, and Clear empties the boxes.