Unix Timestamp Converter

Convert between Unix timestamps (Epoch Time) and human-readable dates. Supports both seconds and milliseconds.

Current Time

Seconds
-
Milliseconds
-

Timestamp to Date

Date to Timestamp

What is Unix Timestamp?

Unix Timestamp (also known as Epoch Time or POSIX Time) is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC (Unix Epoch).

It's a timezone-independent way to represent time, widely used in programming and databases. JavaScript uses milliseconds, while most Unix systems use seconds.

Year 2038 Problem: On 32-bit systems, Unix timestamps will overflow on January 19, 2038 at 03:14:07 UTC. Most modern systems use 64-bit integers to solve this issue.

About This Tool

Unix timestamps are the universal way computers track time, counting seconds since January 1, 1970 (UTC). Converting between timestamps and human-readable dates is one of the most common tasks in backend development.

You Might Also Like

Worth Reading

What is Unix Timestamp Converter?

A Unix Timestamp Converter is a tool that converts between Unix timestamps (also called Epoch time or POSIX time) and human-readable date and time formats. Unix timestamp represents the number of seconds or milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC, known as the Unix Epoch. This numeric format is widely used in programming, databases, and APIs because it is timezone-independent, easy to compare, and simple to perform arithmetic on. Whether you are analyzing server logs, debugging API responses, or working with database records, this converter helps you quickly translate between machine-friendly timestamps and readable dates.

User Guide

  1. Check the real-time Unix timestamp displayed in the "Current Time" section at the top.
  2. To convert a timestamp to a date, enter the numeric value and click "Convert" or press Enter.
  3. Use the unit selector (Auto, Seconds, Milliseconds) to specify the format or let the tool auto-detect.
  4. Use the quick buttons (Now, 0, 1B, 2B) to instantly convert commonly referenced values.
  5. To convert a date to a timestamp, fill in the year, month, day, hour, minute, and second fields, then click "Convert".
  6. Copy any result using the copy buttons next to each output value.

Core Features

  • Bidirectional conversion between timestamps and human-readable dates
  • Auto-detection of seconds (10-digit) and milliseconds (13-digit) formats
  • Real-time display of the current Unix timestamp
  • Quick conversion buttons (Now, 0, 1B, 2B) for commonly used values
  • Multiple output formats: ISO 8601, UTC, local time, and relative time
  • Support for both local timezone and UTC
  • One-click copy for any converted result

When This Comes in Handy

  • Reading timestamps recorded in server logs and error reports
  • Converting created_at and updated_at fields from REST API responses
  • Preparing date values as timestamps for database storage
  • Checking the expiration time (exp claim) of JWT tokens
  • Debugging time synchronization issues between servers in different timezones
  • Verifying scheduled execution times for cron jobs and task schedulers

Classic Timestamp Bugs, With Code

The 1970 bug: seconds fed to a milliseconds API. JavaScript's Date constructor expects milliseconds, so passing a seconds-based value straight from a backend gives new Date(1704067200) — which renders as January 20, 1970 instead of January 1, 2024. The fix is new Date(1704067200 * 1000). The mirror-image bug also exists: sending Date.now() (13 digits) to an API that stores seconds produces dates tens of thousands of years in the future. Whenever a UI shows a date suspiciously close to 1970, check the unit first; this converter's auto-detect (10 vs 13 digits) is a quick way to confirm which unit you are holding.

The silent timezone shift in date-string parsing. In JavaScript, new Date("2024-01-15") is parsed as midnight UTC, while new Date(2024, 0, 15) is midnight local time — two different timestamps for what looks like the same date. For a user in UTC+9 the first form displays as 9:00 AM, and for a user in a negative-offset timezone it can even display as January 14. When a "date only" value drifts by a day in production, compute the expected timestamp here with the timezone selector set to both Local and UTC, and compare against what your code produced.

Mixed units inside one dataset. Migrations and multi-language stacks often leave a table where older rows store seconds (from PHP's time()) and newer rows store milliseconds (from System.currentTimeMillis()). Sorting or comparing across that boundary silently misorders events by a factor of 1000. Spot-checking a few suspect values in this converter — a 10-digit value landing in a sane year while a 13-digit neighbor lands in 55000 AD when read as seconds — is the fastest way to diagnose the mix.

Common Questions

Q: Why does Unix timestamp start from 1970?

When the Unix operating system was developed in the early 1970s, January 1, 1970, 00:00:00 UTC was chosen as a convenient starting point, known as the Unix Epoch. This convention has since been adopted by virtually every operating system and programming language as a universal time reference standard.

Q: How do I tell the difference between seconds and milliseconds timestamps?

A timestamp in seconds is typically a 10-digit number (e.g., 1704067200), while milliseconds is 13 digits (e.g., 1704067200000). The auto-detect mode uses this rule. Unix/Linux, PHP, and Python generally use seconds, while JavaScript (Date.now()) and Java (System.currentTimeMillis()) use milliseconds.

Q: What do negative timestamps represent?

Negative values represent dates before the Unix Epoch (January 1, 1970). For example, -86400 corresponds to December 31, 1969, 00:00:00 UTC. These are used when working with historical dates in databases, though some systems may not support negative timestamps.

Q: What is the Year 2038 problem (Y2K38)?

Systems storing Unix timestamps as signed 32-bit integers will reach their maximum value (2,147,483,647) on January 19, 2038, at 03:14:07 UTC. After this point, the value overflows and wraps to a negative number. Most modern systems have migrated to 64-bit integers, which can represent dates billions of years into the future.

Q: How do timezones affect timestamp conversion?

A Unix timestamp is always in UTC. However, when converting a local date to a timestamp, you need to know the timezone of the input date to get the correct value. For example, 3:00 PM in Seoul (UTC+9) is 6:00 AM UTC, and this timezone offset directly affects the resulting timestamp value.

Q: What is ISO 8601 format?

ISO 8601 is an international standard for date and time notation, formatted as "2024-01-15T09:30:00Z". The T separates the date and time, and Z indicates UTC. It is widely used in API responses and logs because it is easy to parse and can include timezone information, making it ideal for international data exchange.

Q: How do I get the current timestamp in different programming languages?

In JavaScript: Date.now() (milliseconds) or Math.floor(Date.now()/1000) (seconds). In Python: import time; time.time() (seconds with decimals). In PHP: time() (seconds). In Java: System.currentTimeMillis() (milliseconds). Pay close attention to the unit each language returns.

Q: What time does timestamp 0 represent?

Timestamp 0 is the Unix Epoch itself: January 1, 1970, 00:00:00 UTC. In databases, a timestamp field with a value of 0 usually means the value was never set. You can verify this instantly by clicking the "0" quick conversion button in this tool.

Q: Are leap seconds reflected in Unix timestamps?

No, Unix timestamps ignore leap seconds and always treat a day as exactly 86,400 seconds. When a leap second is inserted, the same timestamp value may persist for two seconds or be skipped entirely. This is not an issue for general web development, but applications requiring precise time synchronization should use NTP (Network Time Protocol).

Q: Is this tool free to use?

Yes, it is completely free with no usage limits. All conversions are processed in your browser, so no data is sent to any external server.