Skip to content

Unix Timestamp Converter

Convert epoch timestamps to dates and back — seconds, milliseconds, UTC and local time.

How the Unix Timestamp Converter Works

Switch between two modes: convert a timestamp to a human-readable date, or convert a date to a Unix timestamp. In timestamp-to-date mode, paste any integer and the converter automatically detects whether it is in seconds or milliseconds — values above 10 billion (1e10) are treated as milliseconds (JavaScript-style), everything else as seconds (Unix-style).

Click "Now" to instantly load the current Unix timestamp in seconds. The relative display shows how far in the past or future the date is — useful for quickly sanity-checking API timestamps without mental arithmetic.

What Is Unix Time?

Unix time (also called Epoch time or POSIX time) is a system for describing points in time as the number of seconds elapsed since January 1, 1970, at 00:00:00 Coordinated Universal Time (UTC). It was developed alongside the Unix operating system in the early 1970s and has since become the universal standard for time representation in computing. Every major programming language — Python, JavaScript, Go, Rust, Java, C — natively handles Unix timestamps.

The key advantage of Unix timestamps is that they are timezone-independent: a timestamp represents the same moment in time everywhere in the world. When you store a Unix timestamp in a database, any client can convert it to local time using their own timezone offset. This is why timestamps are the standard format for API responses, log files, database records, and system events.

Seconds vs Milliseconds — Which One Do You Have?

The ambiguity between seconds and milliseconds is one of the most common sources of timestamp bugs. Unix traditionally uses seconds: the current timestamp is around 1.7 billion. JavaScript's Date.now() returns milliseconds: the current timestamp is around 1.7 trillion. If you accidentally treat a millisecond timestamp as seconds, you will get a date in the year 56,000. If you treat seconds as milliseconds, you will get a date in January 1970.

The rule of thumb: if your timestamp is a 10-digit number, it is in seconds. If it is a 13-digit number, it is in milliseconds. This converter uses exactly that heuristic — values above 10 billion are treated as milliseconds. Quick way to check: paste the timestamp here and see what date comes out. If the year looks reasonable, you have the right unit.

When to Use a Unix Timestamp Converter

Unix timestamps appear everywhere in software: database created_at / updated_at columns, JWT token iat (issued at) and exp (expiry) fields, log files, API responses (Stripe, GitHub, Slack all return Unix timestamps), S3 object metadata, and cache headers. Convert a timestamp to a human-readable date when debugging, auditing logs, or checking if a token has expired.

Related tools: JWT Decoder, Timezone Converter, Date Calculator, Time Duration Calculator.

Unix Epoch and Timestamp Ranges

The Unix epoch is January 1, 1970 00:00:00 UTC, the origin point (timestamp = 0). Timestamps count seconds (or milliseconds in JavaScript's Date.now()) elapsed since then. Key values: the current timestamp is ~1.75 billion seconds.

The "Year 2038 problem": 32-bit signed integers max out at 2,147,483,647 (January 19, 2038 03:14:07 UTC) — systems still using 32-bit timestamps will overflow. 64-bit timestamps won't overflow for ~292 billion years.

Frequently Asked Questions

What is a Unix timestamp?
A Unix timestamp is the number of seconds elapsed since January 1, 1970, at 00:00:00 UTC. It is the universal time representation in computing, used in APIs, databases, log files, and operating systems worldwide.
Why does Unix time start in 1970?
January 1, 1970 was chosen as the epoch when Unix was developed in the early 1970s. It was a recent, clean date that made calculations straightforward. The choice was somewhat arbitrary but has stuck as the universal reference point adopted by virtually every operating system and programming language.
What is the difference between seconds and milliseconds?
Unix timestamps in seconds are 10-digit numbers (e.g. 1714400000). Millisecond timestamps are 13-digit numbers (e.g. 1714400000000). JavaScript's Date.now() returns milliseconds; most Unix/Linux commands and server-side APIs use seconds. This tool auto-detects the unit based on the value magnitude.
What is the Unix epoch?
The Unix epoch is January 1, 1970 at 00:00:00 UTC. Unix timestamps count the number of seconds (or milliseconds) elapsed since this fixed point. It was chosen because it predates most modern software systems and provides a universal time reference.
What is the difference between seconds and milliseconds timestamps?
Standard Unix timestamps count seconds (10 digits, e.g., 1714000000). JavaScript and many APIs use milliseconds (13 digits, e.g., 1714000000000). The calculator auto-detects which format you entered based on digit count.
What is the difference between seconds and milliseconds in Unix timestamps?
Traditional Unix timestamps are in seconds (10 digits, e.g., 1714567890). JavaScript's Date.now() returns milliseconds (13 digits, e.g., 1714567890123). When a timestamp has 13 digits, divide by 1000 to get seconds. Most databases and languages use seconds; JavaScript, Redis, and some APIs use milliseconds. Mixing the two is a common source of bugs — always check the magnitude.
How do I get the current Unix timestamp in different languages?
JavaScript: Math.floor(Date.now() / 1000) (seconds) or Date.now() (ms). Python: import time; int(time.time()). PHP: time(). Bash: date +%s. SQL (PostgreSQL): EXTRACT(EPOCH FROM NOW())::INT. Go: time.Now().Unix(). Rust: SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs().

You might also need

See all tools →

Complementary tools based on what you're doing

By Bam's Thinkery — Updated