Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and back. Supports seconds and milliseconds, ISO 8601, RFC 2822, relative time, and code snippets.

Unix Timestamp Converter

Unix (seconds)
1,777,499,753
Seconds since 1970-01-01 00:00:00 UTC
Unix (milliseconds)
1,777,499,753,000
JavaScript Date.now() format
ISO 8601
2026-04-29T21:55:53Z
International standard datetime
RFC 2822
Wed, 29 Apr 2026 21:55:53 +0000
Email / HTTP header format
Day / Week of Year
Day 119 ยท Week 18
Ordinal day & ISO week number
Relative
0s ago
Relative to current time
Epoch timeline (1970 โ€“ 2038)
Y2038 limit โ†’

Notable Unix Timestamps

TimestampDate / Event
0Unix Epoch (1970-01-01 00:00:00 UTC)
946,684,800Y2K (2000-01-01)
1,000,000,0001 Billionth second (2001-09-09)
1,234,567,8901234567890 (2009-02-13 23:31:30 UTC)
1,500,000,0001.5 Billion (2017-07-14)
2,000,000,0002 Billion (2033-05-18)
2,147,483,647Max signed 32-bit (2038-01-19 03:14:07 UTC) โ€” Y2038 Problem
4,102,444,800Year 2100 (2100-01-01)

Quick Code Snippets

LanguageGet Current Unix Timestamp
JavaScriptMath.floor(Date.now() / 1000)
Pythonimport time; int(time.time())
PHPtime()
JavaSystem.currentTimeMillis() / 1000
C#DateTimeOffset.UtcNow.ToUnixTimeSeconds()
RubyTime.now.to_i
Gotime.Now().Unix()
Bashdate +%s
Planning notes, formulas, and examples

About the Unix Timestamp Converter

Unix time (also called Epoch time or POSIX time) counts the seconds that have elapsed since January 1, 1970 00:00:00 UTC โ€” a date known as the Unix Epoch. Nearly every computer system, database, API, and programming language uses Unix timestamps internally, making this the universal language of time in computing. Log files, JSON Web Tokens, database records, and HTTP cache headers all speak Unix time.

This converter translates between Unix timestamps and human-readable dates, supporting both seconds and milliseconds (JavaScript's Date.now() format). It outputs ISO 8601, RFC 2822, and relative time formats, shows a visual position on the 1970โ€“2038 epoch timeline, and includes a notable-milestones table and code snippets for eight programming languages.

Whether you're debugging an API that returns epoch milliseconds, parsing log timestamps, setting cookie expiration, or preparing for the Y2038 problem (when signed 32-bit timestamps overflow), this converter gives you instant, multi-format conversion with developer context.

When This Page Helps

Unix timestamps show up in APIs, logs, databases, cache headers, and scheduled jobs, and they often disagree on units or display format. This converter makes those differences explicit by converting seconds and milliseconds, showing copy-ready date formats, and giving you a fast sanity check before you ship or debug time-based data.

How to Use the Inputs

  1. Choose the conversion direction: Unix timestamp โ†’ Date, or Date โ†’ Unix timestamp.
  2. If converting from a timestamp, enter the numeric value or click a preset (Epoch, Y2K, Max 32-bit, Live Time).
  3. Select whether your timestamp is in seconds or milliseconds.
  4. If converting from a date, enter an ISO 8601 string (e.g. 2030-03-08T12:00:00).
  5. Read the output: seconds, milliseconds, ISO 8601, RFC 2822, day/week of year, and relative time.
  6. Check the epoch timeline bar to see where your timestamp falls between 1970 and 2038.
  7. Copy code snippets for getting the current timestamp in your programming language.
Formula used
Unix timestamp = number of seconds since 1970-01-01 00:00:00 UTC Milliseconds = Unix seconds ร— 1000 Max 32-bit signed integer = 2,147,483,647 (2038-01-19 03:14:07 UTC) Date โ†’ Unix: Math.floor(Date.parse(dateString) / 1000) Unix โ†’ Date: new Date(unixSeconds * 1000)

Example Calculation

Result: 2030-01-01T00:00:00Z

Timestamp 1,893,456,000 seconds since epoch equals midnight UTC on January 1, 2030 โ€” the start of the year.

Tips & Best Practices

  • If a timestamp is 13 digits (like 1609459200000), it is in milliseconds. Ten digits means seconds.
  • JWT "exp" and "iat" claims use seconds. Always divide JavaScript Date.now() by 1000 before comparing.
  • To store user-facing dates, save UTC timestamps and convert to local time on the client.
  • For timestamps beyond 2038, ensure your system uses 64-bit time_t (all modern 64-bit OS do).
  • When comparing timestamps across systems, check whether they include or exclude leap seconds.

The Y2038 Problem Explained

The signed 32-bit integer maximum is 2,147,483,647, which corresponds to 2038-01-19 03:14:07 UTC. After this moment, 32-bit systems that store time as a signed int32 will overflow โ€” wrapping to โˆ’2,147,483,648, which represents December 13, 1901. This is analogous to the Y2K bug but affects embedded systems, IoT devices, and legacy databases.

Modern Linux kernels (5.6+), macOS, Windows, and 64-bit programming languages already use 64-bit timestamps. The risk is concentrated in embedded firmware, old databases, and file formats with fixed 32-bit fields (like some ext3 filesystems and certain NTP implementations).

Common Timestamp Formats

| Format | Example | Usage | |---|---|---| | Unix seconds | 1609459200 | APIs, databases, JWT | | Unix milliseconds | 1609459200000 | JavaScript, Java | | ISO 8601 | 2030-01-01T00:00:00Z | JSON, XML, logs | | RFC 2822 | Tue, 01 Jan 2030 00:00:00 +0000 | Email, HTTP headers |

Debugging Timestamps

When an API returns a timestamp and you are unsure of the unit: if the number is around 1.7 billion, it is seconds; around 1.7 trillion, milliseconds; around 1.7 quadrillion, microseconds (used by PostgreSQL and some scientific systems). Timestamps near 0 might indicate a bug โ€” many systems default to epoch when parsing fails.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Unix time counts seconds since January 1, 1970 00:00:00 UTC (the Unix Epoch). It ignores leap seconds and provides a simple linear count of time.