Randomly

Unix time converter

Turn a Unix timestamp into a UTC and local date, or a date into epoch seconds. Seconds vs milliseconds is detected from the digit count.

Date

Invalid

Enter a whole-number timestamp.

Awaiting valid input
Direction
Both ways
Units
s · ms

Related tools

Guides

This Unix time converter works in both directions. In Unix → Date mode, paste an epoch timestamp and you get the UTC date and time, with your local time under Details. In Date → Unix mode, pick a date and time and you get the timestamp in seconds, with milliseconds under Details. It opens on the current time, and the Use now button resets it.

How to use the Unix time converter

  1. Choose a direction: Unix → Date or Date → Unix.
  2. Unix → Date: paste a whole-number timestamp. 13 or more digits counts as milliseconds, and anything shorter counts as seconds.
  3. Date → Unix: pick a date and time in the picker. It uses your browser's time zone and works to the minute.
  4. Click the result, or press Copy result, to copy it. Open Details for local time or milliseconds.

What is Unix time?

Unix time, also called epoch time, counts the seconds since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. One number pins down a moment with no time zone attached, which is why databases, logs and APIs like it. JavaScript and many web APIs use milliseconds instead, which gives you a 13-digit number for any date from 2001 to 2286.

When you'd convert a timestamp

  • Reading a created_at or updated_at value from a database row or log line.
  • Checking when a JWT expires by converting its exp or iat claim.
  • Building a query parameter for an API that wants epoch seconds.
  • Making sure a scheduled job really runs at the hour you think it does.

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 1970-01-01 00:00:00 UTC. Some systems store milliseconds instead, which adds three digits.

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

Count the digits. Present-day seconds are 10 digits and milliseconds are 13. The converter treats anything with 13 or more digits as milliseconds, so a seconds value that far out isn't read correctly. You won't hit that before the year 33658.

Does the converter show local time?

Yes. The main result is UTC, and Details shows the same moment in your browser's time zone.

What is the Unix epoch?

1970-01-01 00:00:00 UTC. Timestamps count forward from it, and negative timestamps count backward.

Can I convert a negative Unix timestamp?

Yes. Type it with a leading minus, for example -86400 for 31 December 1969.

Built and maintained by Bipul Kumar. Found a wrong number or a broken result? Tell me and I'll fix it.