One direction · timestamp in, date out
Timestamp to Date
Paste a unix timestamp and read the date. Seconds, milliseconds, microseconds and nanoseconds are all accepted — the unit is detected from the value, then converted to UTC, your local time, ISO 8601 and a full written-out date.
Built for the one job, with every output ready to copy. Nothing is sent anywhere: the conversion happens in your browser.
Unix timestamp
waiting for a value
Try one
Paste a Unix timestamp to convert it. Seconds, milliseconds, microseconds and nanoseconds all work — the unit is detected from the digit count.
Date
Need to go the other way?Convert a date to a timestamp →
What is a Unix timestamp?
A Unix timestamp — epoch time — is the number of seconds since 00:00:00 UTC on 1 January 1970. It carries no timezone, locale or formatting, which is why logs, APIs and databases store instants that way and only format them for people at the edge.
The unit is the thing to watch. Most Unix tooling, Python, Go and PostgreSQL count seconds, so a current value is 10 digits; JavaScript, Java and many log pipelines count milliseconds, so the same instant is 13. Mix them up and your date lands either in 1970 or tens of thousands of years out. This page checks the digit count and tells you which unit it read.
If a converted date looks a few hours off, that is a timezone difference rather than a bad timestamp — compare the UTC row against the local row above to confirm. For the full background, see the unix timestamp converter homepage.
How to convert a timestamp to a date
- Paste the timestamp. Paste your Unix timestamp into the field. Seconds, milliseconds, microseconds and nanoseconds are all accepted, and commas and spaces are stripped automatically.
- Check the detected unit. The line under the field reports which unit the value was read as and how many digits it had, so you can catch a misread before you trust the date.
- Read or copy the date. The instant is shown as UTC, your local time, ISO 8601 and a full written-out date. Use the copy button beside any row to put that format on your clipboard.
Converting a timestamp to a date in code
Every runtime has a one-line equivalent of this page. All of these take epoch seconds; if your value is in milliseconds, divide by 1000 first.
- JavaScript
new Date(ts * 1000).toISOString()- Python
datetime.fromtimestamp(ts, tz=timezone.utc)from datetime import datetime, timezone- PHP
gmdate('Y-m-d H:i:s', $ts)- Go
time.Unix(ts, 0).UTC()- Java
Instant.ofEpochSecond(ts)- C#
DateTimeOffset.FromUnixTimeSeconds(ts).UtcDateTime- Ruby
Time.at(ts).utc- Bash (GNU)
date -u -d @1789551330macOS and BSD use date -u -r 1789551330- PostgreSQL
SELECT to_timestamp(1789551330);- MySQL
SELECT FROM_UNIXTIME(1789551330);- Excel / Sheets
=(A1/86400)+DATE(1970,1,1)
Watch the zone in each of these: several default to the machine’s local time rather than UTC, which is the usual reason a converted date is a few hours out. The current unix timestamp page has the matching one-liners for reading the clock.
Frequently asked questions
How do I convert a Unix timestamp to a date?
Paste the timestamp into the field above. The unit is detected from the digit count, and the same instant is shown as UTC, your local time, ISO 8601 and a written-out date, each with a copy button.
My timestamp converts to a date in 1970. What went wrong?
A value in milliseconds was read as seconds. A 13-digit millisecond value divided down to seconds lands within a few hours of the epoch, so the date reads as January 1970. Divide by 1000, or paste the full value here and let the digit count sort it out.
Can I convert a timestamp from before 1970?
Yes. Timestamps before the epoch are negative — -86400 is 31 December 1969 — and this converter accepts the minus sign and converts them normally.
Does this handle microsecond and nanosecond timestamps?
Yes. A present-day timestamp is 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds, and the converter reads all four from the digit count. The unit it chose is always shown under the field.
Why is the converted time a few hours off?
That is almost always a timezone difference rather than a wrong timestamp. The UTC row and the local row above describe the same instant read in two zones; if the gap matches your UTC offset, the timestamp is correct.
Other tools
Dedicated pages when you need one direction, one answer, or one format.
- 00Unix Timestamp ConverterBoth directions on one page, with the current epoch time ticking above them.
- 02Date to TimestampTurn a calendar date and time into epoch seconds or milliseconds, in UTC or your own zone.
- 03Unix Timestamp NowThe current epoch time, ticking, in seconds and milliseconds — one click to copy.
- 04Discord Timestamp GeneratorBuild <t:0000000000:F> tags that render in every reader's own time zone.