Unix Timestamp Converter

Convert Unix (epoch) timestamps to human-readable dates and vice versa. All processing is client-side.

Current Unix Timestamp
UTC
Local Time

Frequently Asked Questions

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC — the Unix epoch. It is a timezone-independent way to represent a point in time and is used extensively in databases, APIs, file systems, and programming languages.

Unix timestamps are traditionally in seconds (10-digit number currently). JavaScript's Date.now() returns milliseconds (13-digit number). This tool auto-detects whether your input is in seconds or milliseconds based on its magnitude.

The Year 2038 problem (Y2K38) occurs because many systems store Unix timestamps as a 32-bit signed integer, which can hold a maximum value of 2,147,483,647 — representing January 19, 2038 at 03:14:07 UTC. After that moment the counter overflows to a large negative number, causing incorrect dates. 64-bit systems and languages that use 64-bit integers are not affected, but legacy embedded systems, older databases using INT(11), and 32-bit PHP builds can be vulnerable.

Yes. Negative Unix timestamps represent dates before the Unix epoch (January 1, 1970). For example, -86400 is December 31, 1969. Most modern languages handle negative timestamps correctly: PHP's date(), Python's datetime.fromtimestamp(), and JavaScript's new Date() all accept negative values. However, some older databases and file systems do not support pre-epoch timestamps, so always check your storage layer's range.

Each language has a built-in way to retrieve the current Unix time: JavaScript: Date.now() (milliseconds) or Math.floor(Date.now()/1000) (seconds); PHP: time() (seconds) or microtime(true) (float seconds with microseconds); Python: import time; time.time() (float seconds) or int(time.time()); SQL: UNIX_TIMESTAMP() in MySQL, EXTRACT(EPOCH FROM NOW()) in PostgreSQL; bash: date +%s.

ISO 8601 is an international standard for representing dates and times unambiguously. The full format looks like 2024-01-15T10:30:00Z — date portion (YYYY-MM-DD), separator T, time portion (HH:MM:SS), and timezone designator (Z for UTC, or offset like +05:30). It sorts lexicographically (alphabetically) in the correct chronological order, making it ideal for databases, APIs, and filenames. JSON APIs should always use ISO 8601 strings for timestamps.

In MySQL, TIMESTAMP stores values as Unix time internally and converts to/from the current session timezone. It has a range of 1970-01-01 to 2038-01-19 (the Y2K38 limit). DATETIME stores the literal date and time string with no timezone conversion and supports a range of 1000-01-01 to 9999-12-31. For modern applications, use DATETIME or store Unix timestamps as BIGINT to avoid the 2038 limit and handle timezones explicitly in application code.

Unix timestamps are always in UTC — they are timezone-independent by definition. Converting a timestamp to a different timezone means applying a UTC offset when formatting the display, not changing the underlying value. In JavaScript: new Date(ts * 1000).toLocaleString('en-US', {timeZone: 'America/New_York'}). In PHP: new DateTime("@$ts"); $dt->setTimezone(new DateTimeZone('America/New_York'));. In Python: datetime.fromtimestamp(ts, tz=ZoneInfo('America/New_York')). Always use IANA timezone names (not offsets) to handle daylight saving time correctly.

The Unix epoch of January 1, 1970, 00:00:00 UTC was chosen by the original Unix developers at Bell Labs primarily for practical convenience — it was a recent, round date when Unix was being developed in the early 1970s. The exact date was somewhat arbitrary; alternative epochs existed (e.g., some systems used January 1, 1900). The choice became the global standard because Unix became so widely adopted. Today virtually every programming language, database, and operating system uses the same 1970 epoch.

UTC (Coordinated Universal Time) is the modern international time standard maintained by atomic clocks. GMT (Greenwich Mean Time) is a historical timezone based on solar time at the Royal Observatory in Greenwich, UK. For practical purposes they are equivalent (both at UTC±0) and many systems use them interchangeably. The key difference: UTC is a standard, not a timezone — it never observes daylight saving time. When logging events or storing timestamps, always use UTC explicitly to avoid ambiguity.

About This Timestamp Converter

This free Unix timestamp converter converts between Unix epoch timestamps (seconds or milliseconds since 1970-01-01 00:00:00 UTC) and human-readable dates. Enter a timestamp to see the UTC and local date, or enter a date to get the corresponding Unix timestamp.

Unix timestamps are the standard time representation in databases, APIs, and server logs. They are unambiguous, timezone-independent, and trivially comparable — but not human-readable without conversion.

When to use this tool

  • Converting API response timestamps to readable dates
  • Generating epoch timestamps for database queries
  • Debugging log files that contain Unix timestamps
  • Checking token expiry times from JWT exp fields

How Timestamp Conversion Works

Unix epoch is the universal, timezone-independent way to represent a moment in time. Converting it to a human-readable date is a two-step operation.

Detect & Normalize

The input is checked for magnitude — values over 10¹¹ are treated as milliseconds (JavaScript-style). The value is then wrapped in new Date(ms) for cross-platform handling.

Multi-Timezone Formatting

The Intl.DateTimeFormat API formats the same moment in multiple IANA timezones. The result shows UTC, ISO 8601, RFC 2822, and common regional times from one input.

Reverse Conversion

A datetime-local input provides a local date/time string which is parsed by new Date(string). The getTime() method returns the Unix millisecond value, which is divided by 1000 for seconds.

Common Use Cases

API Response Debugging

APIs often return created_at, updated_at, or expires_at as Unix timestamps. Paste the value to instantly see the human-readable date without writing code.

Database Epoch Columns

MySQL's UNIX_TIMESTAMP(), PostgreSQL's EXTRACT(EPOCH FROM ...), and SQLite's integer dates all return seconds-based timestamps. Convert them here for quick inspection.

Log File Analysis

Server, application, and security logs often stamp events as Unix time. Converting log timestamps reveals whether incidents happened during business hours, maintenance windows, or other relevant periods.

JWT Claim Verification

JWT tokens include exp (expiry) and iat (issued at) as Unix timestamps. Convert them here to understand when a token was issued and when it expires without any library.

Scheduled Job Planning

When writing cron jobs or scheduled tasks, convert the target run time to a Unix timestamp to verify it aligns with your server's UTC clock, especially when deploying across timezones.

Global Team Coordination

The multi-timezone output shows the same moment in New York, London, Berlin, Mumbai, Tokyo, and Sydney simultaneously — invaluable for scheduling meetings or deployments across distributed teams.

Related Articles

View all articles
Y2K, Y2K38, and Excel's 1900 Leap Year Bug: The Dates That Break Software

Y2K, Y2K38, and Excel's 1900 Leap Year Bug: The Dates That Break Software

Y2K cost $300–600 billion to mitigate. The Unix 2038 problem will overflow signed 32-bit timestamps on 19 January 2038. Excel has counted 29 February 1900 as a real date since the 1980s. Here's the structural causes of each date bug and which ones are still ticking.

Jun 16, 2026
ISO 8601 and Date Handling Mistakes: The Bugs That Surface Months Later

ISO 8601 and Date Handling Mistakes: The Bugs That Surface Months Later

"06/07/2024" means different dates in the US and UK. ISO 8601 solves this unambiguously. Here's the standard, common date handling mistakes (adding months with timedelta, DST in date arithmetic), storing UTC in databases, and the MySQL 2038 timestamp problem.

Jun 9, 2026
Unix Timestamps and Timezone Bugs: What Every Developer Should Know

Unix Timestamps and Timezone Bugs: What Every Developer Should Know

Timezone bugs cause more production incidents than most developers realise. Here's how Unix timestamps actually work, why "store UTC, convert at display" solves the problem, and the specific bugs that catch teams off guard.

Jun 8, 2026
Timestamp Converter — Unix Time to Date & Date to Timestamp

Timestamp Converter — Unix Time to Date & Date to Timestamp

Learn what Unix timestamps are, why they're used everywhere in software, how to convert them to human-readable dates, and how to avoid the seconds vs. milliseconds confusion.

Jun 6, 2026