Tools/Converters

Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and vice versa. See the current Unix time live. Essential for blockchain developers working with block times.

Spark TeamInvalid Date
Current Unix Timestamp
Live
1771612809
UTCFri, 20 Feb 2026 18:40:09 UTC
UTCFriday, February 20, 2026 at 06:40:09 PM UTC
Milliseconds1771612809000
Timestamp to Date
SEC
Date to Timestamp

All conversions run locally in your browser. Dates use your local timezone for display.

What Is a Unix Timestamp?

A Unix timestamp (also called Unix time, POSIX time, or epoch time) is a way of tracking time as a running total of seconds. Specifically, it counts the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC: a moment known as the Unix epoch.

For example, the timestamp 1700000000 represents November 14, 2023 at 22:13:20 UTC. The timestamp 0 represents the epoch itself: midnight on January 1, 1970. Negative timestamps represent dates before the epoch, so -86400 corresponds to December 31, 1969.

Unix timestamps are integers with no time zone information baked in. They always refer to a single, unambiguous moment in time. This makes them ideal for storing and transmitting time data across systems that may operate in different time zones or with different locale settings.

Why Blockchains Use Unix Timestamps

Blockchains are distributed systems where thousands of nodes around the world must agree on the same data. Time zones, daylight saving changes, and locale-specific date formats would introduce unnecessary complexity. Unix timestamps solve this by providing a single integer that every node interprets identically.

Bitcoin stores time as a Unix timestamp in every block header. The nTime field is a 32-bit unsigned integer representing the approximate time the block was mined. Miners set this value, and network rules enforce that it must be greater than the median of the previous 11 blocks and no more than two hours ahead of the node's local time.

Ethereum uses Unix timestamps in a similar way. The block.timestamp value is set by the block proposer and must be greater than the parent block's timestamp. Smart contracts frequently reference block.timestamp to enforce time-based logic: vesting schedules, auction deadlines, and lock-up periods all rely on this value.

Beyond block headers, Unix timestamps appear throughout blockchain infrastructure. Transaction timelocks (nLockTime values above 500,000,000) are interpreted as Unix timestamps. Lightning Network invoices encode expiry times as timestamps. Token vesting contracts, DAO governance proposals, and oracle price feeds all use epoch-based time.

Key Timestamps in Bitcoin History

Several pivotal moments in Bitcoin's history are permanently recorded as Unix timestamps in the blockchain:

EventUnix TimestampDate (UTC)
Genesis Block1231006505January 3, 2009
First Halving1354116278November 28, 2012
Second Halving1468082773July 9, 2016
Third Halving1589225023May 11, 2020
Fourth Halving1713571767April 19, 2024

You can paste any of these timestamps into the converter above to verify the dates. The genesis block timestamp 1231006505 is particularly notable: it was embedded by Satoshi Nakamoto in the very first Bitcoin block and can never be changed.

The Year 2038 Problem

Unix timestamps were originally stored as a signed 32-bit integer. A signed 32-bit integer can hold values up to 2,147,483,647. That number of seconds after the epoch corresponds to January 19, 2038 at 03:14:07 UTC. One second later, the counter overflows and wraps around to a large negative number, which systems would interpret as a date in December 1901.

This is known as the Year 2038 problem (sometimes called the "Y2K38 bug" or "Epochalypse"). Any system still using 32-bit timestamps at that point would experience severe errors: files could appear to have been created over a century ago, scheduled tasks would fire at the wrong time, and time comparisons would produce incorrect results.

Most modern operating systems and programming languages have already migrated to 64-bit timestamps, which can represent dates billions of years into the future. Bitcoin's block header uses an unsigned 32-bit integer for the nTime field, which extends the range to the year 2106. However, some embedded systems, legacy databases, and older software remain vulnerable.

If you work with systems that store timestamps as 32-bit integers, testing with values near 2147483647 is a good way to identify potential issues before they become critical.

How to Use This Converter

The tool above provides two main features:

  • The live clock section shows the current Unix timestamp, updating every second. Click the copy button to copy it to your clipboard for use in code, API calls, or documentation.
  • The conversion section lets you convert in either direction. Enter a Unix timestamp (in seconds) to see the corresponding date in both UTC and your local time zone. Or enter a date and time to get the Unix timestamp.

All conversions are performed locally in your browser using JavaScript's built-in Date object. No data is sent to any server.

Timestamps are shown in both seconds and milliseconds. Most blockchain systems (including Bitcoin and Ethereum) use second-precision timestamps, while JavaScript and many web APIs use millisecond-precision timestamps. The converter displays both so you can quickly grab whichever format your application requires.

Frequently Asked Questions

What is the current Unix timestamp?

The current Unix timestamp is shown at the top of the converter, updating in real time. It represents the number of seconds since January 1, 1970 at 00:00:00 UTC. You can also get it programmatically in most languages: Math.floor(Date.now() / 1000) in JavaScript, time.time() in Python, or time(NULL) in C.

What is epoch time?

Epoch time is another name for Unix time. The "epoch" refers to the reference point: January 1, 1970 at 00:00:00 UTC. Every Unix timestamp is measured relative to this epoch. The terms "Unix time," "epoch time," "POSIX time," and "Unix timestamp" all refer to the same thing.

Why do developers use Unix timestamps?

Unix timestamps have several advantages over human-readable date formats. They are compact (a single integer), unambiguous (no time zone confusion), easy to compare (simple integer comparison), and trivial to do arithmetic with (adding 86,400 gives you exactly one day later). They are also language-agnostic: every programming language can work with integers.

What is the Year 2038 problem?

Systems that store Unix timestamps as a signed 32-bit integer will overflow on January 19, 2038 at 03:14:07 UTC. At that moment, the timestamp value exceeds the maximum 32-bit signed integer (2,147,483,647), causing the value to wrap to a negative number. Modern systems use 64-bit timestamps to avoid this issue.

How do I convert a Unix timestamp in JavaScript?

To convert a Unix timestamp to a date: new Date(timestamp * 1000) (JavaScript expects milliseconds, so multiply seconds by 1,000). To get the current timestamp: Math.floor(Date.now() / 1000). To convert a date to a timestamp: Math.floor(new Date('2025-01-01').getTime() / 1000).

What timestamp format does Bitcoin use?

Bitcoin block headers store time as a 32-bit unsigned integer representing Unix time in seconds. Transaction timelocks (nLockTime) also use Unix timestamps when the value is 500,000,000 or greater; values below that threshold are interpreted as block heights instead.

Are Unix timestamps affected by time zones?

No. A Unix timestamp always represents a specific moment in UTC. The same timestamp maps to different local times depending on your time zone, but the timestamp itself is time-zone-independent. This is one of the primary reasons blockchains and distributed systems prefer Unix timestamps over localized date strings.

What is the difference between seconds and milliseconds timestamps?

A Unix timestamp in seconds has 10 digits (as of 2001) and counts whole seconds since the epoch. A millisecond timestamp has 13 digits and counts thousandths of a second. JavaScript's Date.now() returns milliseconds, while most server-side languages and blockchain systems use seconds. If a timestamp looks unusually large, it is likely in milliseconds: divide by 1,000 to get seconds.

Build with Spark

Integrate bitcoin, Lightning, and stablecoins into your app with a few lines of code.

Read the docs →