What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. Because it is a single integer with no time zone attached, it is the most common way to store and exchange moments in time in databases, APIs, log files, JWT exp claims and cron systems.
Different platforms count in different units. Unix tools, PHP and MySQL use seconds (10 digits today), JavaScript’s Date.now() and Java use milliseconds (13 digits), and some databases, Go and tracing systems use microseconds (16 digits) or nanoseconds (19 digits). Pasting a millisecond value into a seconds field is the classic bug that turns a date in 2026 into a date tens of thousands of years in the future — this converter detects the unit from the number of digits and lets you override it.
Everything is computed in your browser. Nanosecond values are parsed with BigInt, so 19-digit timestamps keep full precision instead of being rounded by JavaScript’s 64-bit floating-point numbers.
How to use the Unix Timestamp Converter
- The panel at the top shows the current Unix time in seconds and milliseconds, updated every second. Click Pause to freeze it and copy a value.
- To decode a timestamp, paste it into Timestamp → date. The unit is detected automatically; choose a unit manually if the guess is wrong.
- Read the result in UTC, your local time zone, ISO 8601, RFC 2822 and relative form (“3 days ago”), and copy any row.
- To go the other way, pick a date and time in Date → timestamp, choose whether it is local time or UTC, and copy the seconds or milliseconds.
Example
The timestamp 1767225600 (seconds) decodes to:
UTC: Thursday, January 1, 2026 at 12:00:00 AM UTC
ISO 8601: 2026-01-01T00:00:00.000Z
RFC 2822: Thu, 01 Jan 2026 00:00:00 +0000
Milliseconds: 1767225600000The year 2038 problem
Systems that store Unix time in a signed 32-bit integer can only count up to 2147483647, which is 03:14:07 UTC on 19 January 2038. One second later the value overflows to a negative number and the date wraps back to December 1901. Modern 64-bit operating systems and languages are unaffected, but 32-bit embedded devices, old file formats and database columns are not.
In MySQL, the TIMESTAMP column type is limited to 2038-01-19 03:14:07 UTC; use DATETIME or a BIGINT holding epoch seconds for dates beyond that. This tool warns you when a value falls outside the 32-bit range.
Timestamps in WordPress
WordPress stores post dates as Y-m-d H:i:s strings in both local time (post_date) and UTC (post_date_gmt). For a real Unix timestamp use PHP’s time() or current_datetime()->getTimestamp(). Since WordPress 5.3 the old current_time( 'timestamp' ) is discouraged because it returns the Unix time shifted by the site’s UTC offset — a value that does not represent the actual moment and causes double-offset bugs when formatted again. To schedule events with wp_schedule_event(), always pass a real UTC timestamp; see the WordPress Cron Generator.
Frequently Asked Questions
How do I know if a timestamp is in seconds or milliseconds?
Count the digits. Current dates are 10 digits in seconds (e.g. 1767225600) and 13 digits in milliseconds (e.g. 1767225600000); 16 digits means microseconds and 19 digits nanoseconds. The converter applies these thresholds automatically and shows which unit it used.
Does a Unix timestamp have a time zone?
No. It counts seconds since a fixed moment in UTC, so the same timestamp represents the same instant everywhere. A time zone only matters when you display it as a calendar date, which is why the tool shows both UTC and your local time.
Are leap seconds included?
No. Unix time assumes every day has exactly 86,400 seconds, so leap seconds are not counted. That makes date arithmetic simple, and the difference from atomic time (currently 27 seconds) almost never matters in application code.
Can Unix timestamps be negative?
Yes. Negative values represent moments before 1 January 1970, e.g. -86400 is 31 December 1969. Most languages handle them, but some older systems and APIs reject them.
How do I convert a date string in another format?
Use the Timestamp Format Converter to parse ISO 8601, RFC 2822 or SQL dates and output them in more than a dozen formats and any IANA time zone. For calendar maths such as adding days, try the Date Converter.