Unix timestamp
What is a Unix timestamp?
A Unix timestamp, also called epoch time or POSIX time, is the number of seconds that have passed since midnight UTC on 1 January 1970, not counting leap seconds. Right now it is a 10-digit number around 1.7 billion, shown live at the top of this page.
Computers love timestamps because they are a single number with no time zone, no daylight saving and no formatting ambiguity. They are used in databases, server logs, APIs, JSON Web Tokens, cookies and file systems. The downside is that people cannot read them, which is where an epoch converter comes in.
Seconds or milliseconds
Seconds, milliseconds, microseconds and nanoseconds
Different systems count in different units, which is the most common source of wrong dates. The converter detects the unit from the size of the number:
| Unit | Digits today | Used by |
| Seconds | 10 | Unix, PHP time(), Python time.time(), MySQL UNIX_TIMESTAMP(), JWT |
| Milliseconds | 13 | JavaScript Date.now(), Java, many JSON APIs |
| Microseconds | 16 | PostgreSQL internals, some logging systems |
| Nanoseconds | 19 | Go time.UnixNano(), InfluxDB, Prometheus |
Each result shows which unit was assumed in brackets. If a date comes out in 1970 or in the far future, the value was probably in a different unit than you expected.
Advertisement
Date to timestamp
Convert a date to a Unix timestamp
Switch to Date to timestamp and paste dates, one per line. The converter accepts ISO 8601 (2026-11-05T14:30:00Z or with an offset like +05:30), the common 2026-11-05 14:30 format, RFC 2822 dates from email headers (Thu, 05 Nov 2026 09:00:00 GMT) and most formats your browser understands. Dates without a time zone are read in your local time zone. Choose seconds or milliseconds for the output.
Output formats
- Readable: full weekday, date and time with the zone name.
- ISO 8601:
2026-11-05T14:30:00+05:30, the standard for APIs and JSON.
- SQL:
2026-11-05 14:30:00 for MySQL and PostgreSQL DATETIME columns.
- RFC 2822 / HTTP:
Thu, 05 Nov 2026 09:00:00 GMT for headers and cookies.
- Relative: "3 days ago" or "in 2 hours".
Good to know
Timestamp tips for developers
- Store UTC, display local. Save timestamps or UTC datetimes and convert to the user's time zone only when showing them.
- The year 2038 problem: signed 32-bit timestamps overflow on 19 January 2038 at 03:14:07 UTC. Use 64-bit integers.
- Negative timestamps are dates before 1970 and are supported here.
- Quick code: JavaScript
Math.floor(Date.now()/1000), PHP time(), Python int(time.time()), MySQL UNIX_TIMESTAMP(), Bash date +%s.
Everything runs in your browser using your device clock and its built-in time zone database. To read the exp and iat times inside a token, use the JWT decoder, and to decode time-based UUIDs, use the UUID generator.
Time zones
Time zones and daylight saving
A Unix timestamp marks one exact instant, but the same instant has a different clock time in every time zone. Timestamp 1762335000 is 09:30 in London, 15:00 in Colombo and 04:30 in New York on the same day. The converter uses the IANA time zone database built into your browser, the same data used by phones and operating systems, so historic and future daylight saving changes are applied correctly for every zone.
Some practical points:
- Pick UTC for logs and servers. Most servers log in UTC, so convert in UTC first when matching log lines to events.
- Offsets are not zones.
+05:30 describes one moment's offset; a zone like Asia/Colombo or Europe/London also knows when the offset changes. Store the zone name when you need to schedule future events.
- Ambiguous local times happen when clocks go back: 01:30 can occur twice. When converting a local date to a timestamp, add an explicit offset or
Z to remove any doubt.
- Midnight dates like
2026-11-05 without a time are read by browsers as midnight UTC, while 2026-11-05 00:00 is read as local midnight. Add the time to be precise.
The current timestamp at the top updates four times a second from your device clock, so if it looks wrong, check your computer's date and time settings.
FAQ
Unix Timestamp Converter: frequently asked questions
What is a Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970. It is a time zone independent way for computers to store a moment in time.
How do I convert a Unix timestamp to a date?
Paste the timestamp in Timestamp to date mode. The date appears instantly in the time zone and format you choose.
How do I convert a date to a Unix timestamp?
Switch to Date to timestamp and paste the date, for example 2026-11-05 14:30. Choose seconds or milliseconds for the output.
How do I know if a timestamp is in seconds or milliseconds?
A current timestamp in seconds has 10 digits; in milliseconds it has 13. The converter detects this automatically.
What is the current epoch time?
It is shown live at the top of this page, in both seconds and milliseconds.
Can I convert many timestamps at once?
Yes. Paste one value per line and every line is converted.
Does it handle time zones and daylight saving?
Yes. It uses your browser's time zone database, so daylight saving changes are applied correctly for any zone.
Is a Unix timestamp the same everywhere in the world?
Yes. The number is the same worldwide at any instant. Only the displayed local date and time differ by time zone.