Unix Timestamp Converter
Paste the number you copied out of a log. We work out the unit for you.
Timestamp → Date
Paste a timestamp above — the date shows up here as you type.
Date → Timestamp
Pick a date and time above to get its Unix timestamp.
Copying failed. Select the value and copy it manually.
What a Unix timestamp is, and why logs use it
A Unix timestamp (also called epoch or POSIX time) is a single number: the count of seconds since 1970-01-01 00:00:00 UTC, the moment known as the epoch. Because it is one plain integer, it is trivial to store, sort, and subtract — which is why databases, log files, JWT tokens, and API responses record time this way instead of as a written-out date. The catch is that the same instant can appear in different units and always without a time zone, so reading one correctly takes a couple of rules. This converter handles both directions: a number to a readable date, and a date back to a number.
Seconds, milliseconds, or microseconds?
The unit is usually clear from the digit count for any timestamp in the current era. Panel A counts the digits, tells you which unit it detected, and lets you override the guess:
| Digits | Unit | Example | Common source |
|---|---|---|---|
| 10 | Seconds | 1700000000 | Python time(), PHP time(), date +%s |
| 13 | Milliseconds | 1700000000000 | JavaScript Date.now(), Java currentTimeMillis() |
| 16 | Microseconds | 1700000000000000 | PostgreSQL, Python time_ns() ÷ 1000 |
Example 1 — a number to a date. The 10-digit value 1700000000 is detected as seconds and converts to 2023-11-14 22:13:20 UTC. It also shows your own local time beside the UTC reading and a relative phrase such as "N years ago."
Example 2 — the 1000× trap. The 13-digit value 1700000000000 is the exact same instant, but in milliseconds. Feed it to code that expects seconds and you get a date roughly in the year 55,891 — the classic off-by-1000 bug. The digit count is what saves you here.
Example 3 — a date to a number. In Panel B, pick 2024-01-01 00:00:00 and read it as UTC. The result is 1704067200 seconds (and 1704067200000 milliseconds). Switch the basis to "Local time" and the number shifts by your UTC offset.
A timestamp carries no time zone
The number counts from the UTC epoch, so it means the same instant everywhere on Earth; a time zone only appears when you display it. That is why 1700000000 reads as 22:13 in London and 07:13 the next morning in Tokyo, yet it is one moment. If a converted date looks a few hours off, the number is almost certainly right and you are comparing a UTC reading against a local one.
Common mistakes and limits
- Seconds vs. milliseconds: the single most common error. Check the digit count before trusting a date, and use the Unit selector if your data is unusual.
- Reading local as UTC: when converting a date back to a timestamp, set the "Read this time as" basis to match how the value was originally recorded.
- Leap seconds: POSIX time deliberately ignores them, so it is a smooth count and not a perfect astronomical clock.
- The year 2038: systems that store the value in a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038. This tool is not affected — the browser holds the value as a 64-bit number and flags anything genuinely out of range instead of showing a wrong date.
Sources & further reading
Frequently asked questions
What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is simply the number of seconds that have passed since 1970-01-01 00:00:00 UTC, the moment known as the epoch. Because it is one plain number, it is easy to store, sort and subtract, which is why logs, databases and API responses use it instead of a written-out date. The number 1720512345, for example, is roughly 54 years' worth of seconds after the epoch. Times before 1970 are written as negative numbers, and this Unix timestamp converter handles those too.
What is the difference between a 10-digit and a 13-digit timestamp?
A 10-digit timestamp counts seconds; a 13-digit one counts milliseconds and is exactly 1000 times bigger. That is why the same instant is 1720512345 in Python or PHP but 1720512345678 in JavaScript's Date.now() or Java's System.currentTimeMillis(). A 16-digit number is usually microseconds, common in Postgres and Python's time_ns()/1000. The quick rule: 10 digits = seconds, 13 = milliseconds, 16 = microseconds. This epoch converter counts the digits for you, shows which unit it detected, and lets you override the guess with the Unit selector if your data is unusual.
Does a Unix timestamp contain a time zone?
No. A timestamp is a single moment counted from the UTC epoch, so it carries no time zone at all — the same number means the same instant everywhere on Earth. A time zone only appears when you display it: 1720512345 is 09:25 in Seoul and 00:25 in London on the same day. That is why this converter always shows your local time and UTC side by side. If a converted date looks a few hours off, the timestamp is not wrong; you are most likely comparing a UTC reading with a local one.
What is the year 2038 problem, and does it limit this converter?
Systems that store Unix time in a signed 32-bit integer run out of room at 03:14:07 UTC on 19 January 2038 (timestamp 2147483647), and the counter can wrap around to 1901 — the reason it is called the Y2K38 problem. It affects old C programs and embedded devices, not this tool: your browser keeps the value as a 64-bit floating point number, so this converter works from about 275,760 BC to AD 275,760 (±8.64e15 milliseconds). Anything beyond that range gets an explicit out-of-range message rather than a wrong date.
Is the timestamp I paste sent to a server?
No. Every conversion runs inside your browser with the built-in Date and Intl features — there is no API call, no analytics on your input, and nothing is uploaded or logged. The page also stores nothing about your conversions: the timestamp and unit you choose live only in the open tab and disappear when you close it. That means production log data or customer timestamps are safe to paste here, and the converter keeps working offline once the page has loaded.