Developer tool
Unix Timestamp Converter
Convert Unix timestamps in seconds or milliseconds to readable dates in any time zone, and dates back to timestamps, with ISO 8601 and relative time.
Free, no sign-up. Runs in your browser; nothing is uploaded.
Current time
Timestamp or date to readable time
Seconds, milliseconds, microseconds, nanoseconds or any date such as 2024-05-01T12:00:00Z.
Read as seconds.
Date and time to timestamp
How to use the unix timestamp converter
Read and write epoch time without guessing
Logs, databases, JWTs and APIs love Unix timestamps because they are compact and unambiguous. They are also unreadable. This converter turns them into dates you can read, and turns dates back into numbers, in whatever time zone you need.
Convert a timestamp
Paste a number into the first panel. The tool detects whether it is seconds, milliseconds, microseconds or nanoseconds by its length and tells you what it assumed. You get:
- Seconds and milliseconds as plain numbers, ready to copy.
- ISO 8601 in UTC, the format APIs and databases prefer, for example 2024-05-01T12:00:00.000Z.
- The date in your chosen time zone, including the weekday and the UTC offset, which is the quickest way to answer "what time was that for the customer in Sydney".
- RFC 2822 text, as used in email and HTTP headers.
- Relative time, such as "3 days ago" or "in 2 hours", to sanity check that a log entry or expiry is when you expect.
You can also paste a date string such as 2024-05-01T12:00:00Z and read it back as a timestamp.
Convert a date to a timestamp
In the second panel pick a date and time and the zone that time belongs to. The offset for that exact date is applied, so a summer time in New York and a winter time in New York convert differently, as they should. Use "Show in converter" to send the result to the first panel.
Common pitfalls
- Seconds versus milliseconds. JavaScript Date.now() returns milliseconds; many Unix tools and JWT claims use seconds. A 13-digit number is almost certainly milliseconds.
- Local versus UTC. Always store and transmit UTC, and convert to local time only for display.
- Daylight saving. Do not add 86400 seconds to move one day in a zone with daylight saving; add a calendar day in that zone instead.
- Leap seconds. Unix time ignores them, so it is not exact astronomical time, which is fine for nearly all software.
Handy values
The "Use now" button fills in the current time in seconds, and the live clock at the top shows the current seconds and milliseconds. Copy buttons sit next to every result so you can paste straight into a query, a test or a bug report.
Frequently asked questions
What is a Unix timestamp?
It is the number of seconds since 1 January 1970 00:00:00 UTC, not counting leap seconds. Because it is one plain number it is easy to store, sort and compare, and it means the same instant in every time zone.
How does the tool tell seconds from milliseconds?
By length. Up to 11 digits is read as seconds, 12 to 14 as milliseconds, 15 to 17 as microseconds and longer as nanoseconds. You can force seconds or milliseconds with the Unit switch if your value is unusual.
Why is my result a day off?
Almost always a time zone difference. The timestamp itself is always UTC; the readable date changes with the zone you view it in. Pick the zone you care about in the selector.
What is the year 2038 problem?
Systems that store seconds in a signed 32-bit integer overflow on 19 January 2038 at 03:14:07 UTC. JavaScript and most modern systems use 64-bit values and are not affected.
Can I convert a local date to a timestamp?
Yes. Use the second panel, choose the date, time and the zone the time is in, and you get seconds, milliseconds and ISO output. Daylight saving offsets are applied for the chosen date.
Is anything uploaded?
No. All conversion uses your browser built-in date and Intl functions. Nothing is sent to a server.