Timestamp Converter

Convert Unix timestamps to human-readable dates — UTC, ISO 8601, local time, and more

Share:

Was this tool helpful?

What is a Unix Timestamp?

A Unix timestamp — sometimes called Unix time, POSIX time, or Epoch time — is a single integer that represents a specific moment in time as the total number of seconds elapsed since January 1, 1970, 00:00:00 UTC. This reference point, known as the Unix epoch, was chosen arbitrarily, but it provides a consistent baseline for calculating and representing time across computing systems. Unlike calendar dates, Unix timestamps are not affected by time zones, daylight saving time, or locale-specific conventions, making them an ideal tool for representing absolute moments.

For example, the Unix timestamp 1700000000 corresponds to Monday, November 14, 2023, at 22:13:20 UTC. The value is universal: the same number always refers to that exact instant, no matter where you are in the world. Local time representations change depending on time zone, but the underlying timestamp remains constant.

Unix timestamps are widely used in software engineering, data processing, and system operations. They appear in databases, API responses, log files, file metadata, JWT tokens, cryptographic certificates, scheduling systems, and event tracking. Their simplicity — a compact 10-digit or 13-digit integer (milliseconds) — makes them fast to store, sort, and compare. Moreover, their timezone neutrality ensures consistent communication between distributed systems and applications.

Converting a Unix timestamp to human-readable formats often requires additional computation, as developers need to map it to a calendar date, local time zone, or formatted string. This tool performs all conversions locally in your browser, displaying the timestamp in multiple formats simultaneously. No server requests are needed, so your data remains private, and the conversion happens instantly.

In short, Unix timestamps provide a universal, unambiguous way to represent time for machines and humans alike, ensuring accuracy, consistency, and simplicity in software systems of all sizes. Whether you're building applications, analyzing logs, or storing event data, understanding Unix time is a fundamental skill for modern developers and IT professionals.

Output Formats Explained

This tool converts a single timestamp into five different representations. Here's what each one means and when to use it:

  • UTC: The timestamp expressed in Coordinated Universal Time — the global time standard. Format: Mon, 14 Nov 2023 22:13:20 GMT. Use this when you need a universally unambiguous human-readable time, especially for server logs, API documentation, and cross-timezone communication.
  • Local: The timestamp converted to your browser's local timezone and locale. The exact format depends on your system settings. Use this to quickly understand what time an event occurred in your own timezone.
  • ISO 8601: The internationally standardized date/time format. Example: 2023-11-14T22:13:20.000Z. The trailing Z means UTC. ISO 8601 is the format used by most REST APIs, JSON payloads, databases, and log aggregation systems. It's machine-readable, human-readable, and unambiguous.
  • Date: Just the date portion in your local locale format (e.g., 11/14/2023 or 14/11/2023 depending on your region). Useful for quick date lookups without the time component.
  • Time: Just the time portion in your local locale format (e.g., 10:13:20 PM). Useful when you only need to know the time of day in your timezone.

Seconds vs. Milliseconds — A Critical Distinction

One of the most common sources of confusion with Unix timestamps is the difference between seconds and milliseconds. Understanding this distinction is critical for accurate time conversion and data handling.

  • 10-digit number = seconds: This is the standard Unix timestamp format. Example: 1700000000. It is widely used by databases, APIs, and server-side languages such as Python (time.time()), PHP (time()), and the Unix shell (date +%s).
  • 13-digit number = milliseconds: Example:1700000000000. JavaScript'sDate.now() and new Date().getTime(), as well as Java'sSystem.currentTimeMillis(), return time in milliseconds. Many browser APIs and JavaScript frameworks also work with milliseconds.

This tool expects seconds. If you have a 13-digit millisecond timestamp, divide it by 1000 before pasting it here. A quick rule: 13 digits = milliseconds, 10 digits = seconds.

Entering a millisecond timestamp without conversion will yield an absurdly far future date (roughly the year 55,000), signaling that you need to divide by 1000 first. Always check the digit count before converting for accurate results.

Example Conversions

Example 1 — Standard Timestamp

Input:
1700000000
Output:
UTC:  Mon, 14 Nov 2023 22:13:20 GMT
ISO:  2023-11-14T22:13:20.000Z
Date: 11/14/2023
Time: 10:13:20 PM

Example 2 — Unix Epoch (Zero)

Input:
0
Output:
UTC:  Thu, 01 Jan 1970 00:00:00 GMT
ISO:  1970-01-01T00:00:00.000Z
Date: 1/1/1970
Time: 12:00:00 AM

Example 3 — JWT Token Expiry Field

Input:
1893456000
Output:
UTC:  Wed, 01 Jan 2030 00:00:00 GMT
ISO:  2030-01-01T00:00:00.000Z
Date: 1/1/2030
Time: 12:00:00 AM

Real-World Use Cases

Unix timestamps appear in more places than most developers realize. Here are the most common situations where a converter is essential:

  • Decoding JWT tokens: JSON Web Tokens contain iat (issued at) and exp (expiration) fields as Unix timestamps. Paste the value here to instantly see when a token was issued and when it expires — critical for debugging authentication issues.
  • Reading server and application logs: Most logging systems — Nginx, Apache, syslog, application frameworks — record events as Unix timestamps for compact storage. Converting them to readable dates is the first step in any log-based debugging session.
  • Understanding database values: Columns like created_at, updated_at, and expires_at are often stored as Unix integers in PostgreSQL, MySQL, SQLite, and NoSQL databases. Converting them by hand is tedious — paste the value here for an instant result.
  • Debugging API responses: Many REST APIs and webhooks return Unix timestamps in their JSON payloads. When a payment webhook says "created": 1700000000, you need to know what date that was.
  • SSL/TLS certificate validity: Certificate notBefore and notAfter fields are stored as timestamps. Converting them helps you verify expiration dates during security audits.
  • Cron jobs and scheduled tasks: When verifying that a scheduled event ran at the right time, compare its logged timestamp to the expected schedule by converting both to readable dates.
  • File system metadata: Unix file modification times (mtime, ctime) are stored as Unix timestamps. Convert them to understand when files were last modified.
  • Blockchain and smart contracts: Ethereum and most other blockchains use Unix timestamps for block times and contract deadlines. Solidity's block.timestamp is a Unix integer.

Getting the Current Unix Timestamp

Click the Now button to auto-fill the current Unix timestamp. You can also get the current timestamp programmatically in most languages:

  • JavaScript: Math.floor(Date.now() / 1000)
  • Python: import time; int(time.time())
  • PHP: time()
  • Ruby: Time.now.to_i
  • Go: time.Now().Unix()
  • Bash/Shell: date +%s
  • SQL (PostgreSQL): EXTRACT(EPOCH FROM NOW())

How to Use This Tool

  1. Enter a Unix timestamp: Type or paste a 10-digit timestamp in seconds into the input field. If you want to work with the current time instead, simply click the Now button, and the current Unix timestamp will be populated automatically.
  2. Click Convert: Once your timestamp is entered, press theConvert button. The tool instantly processes the timestamp in your browser—no server requests—ensuring fast, private computation.
  3. Review the results: The tool displays the converted time in multiple human-readable formats side by side. You’ll see:
    • UTC (Coordinated Universal Time)
    • Local time based on your system settings
    • ISO 8601 format
    • Readable date
    • Readable time
    This makes it easy to compare formats and use the one that fits your needs.
  4. Copy results: Use the Copy button to copy all outputs to your clipboard. The results are formatted as key-value pairs, ready to paste into spreadsheets, documents, or code.

Unix Timestamps in Different Programming Languages

Working with Unix timestamps is a fundamental skill for developers. Every major programming language provides built-in methods to get, convert, and manipulate timestamps. Here is how timestamps are handled across popular languages:

JavaScript: Use Date.now() to get the current timestamp in milliseconds. Divide by 1000 for seconds. To convert a timestamp to a date: new Date(timestamp * 1000). The Date object provides methods like toISOString(), toLocaleDateString(), and toUTCString() for formatting.

Python: The time module provides time.time() for the current timestamp. Use datetime.fromtimestamp(ts) to convert to a datetime object. The datetime.strftime() method formats dates into any string pattern.

PHP: Use time() for the current timestamp and date('Y-m-d H:i:s', $timestamp) to format it. The strtotime() function converts human-readable date strings back to timestamps.

Java: Use System.currentTimeMillis() for milliseconds or Instant.now().getEpochSecond() for seconds. The java.time package provides comprehensive timestamp handling with timezone support.

SQL: In PostgreSQL use EXTRACT(EPOCH FROM now()). In MySQL use UNIX_TIMESTAMP(). To convert back: FROM_UNIXTIME(timestamp) in MySQL or to_timestamp(epoch) in PostgreSQL.

Command Line (Linux/Mac): Run date +%s for the current Unix timestamp. To convert a timestamp to a readable date: date -d @1609459200 on Linux or date -r 1609459200 on Mac.

Frequently Asked Questions

What is the Unix epoch?
The Unix epoch is January 1, 1970, 00:00:00 UTC — the arbitrary reference point from which all Unix timestamps are counted. The choice of 1970 was made by the early Unix developers at Bell Labs. Every Unix timestamp is simply the number of seconds that have elapsed since that moment.
Does this tool handle millisecond timestamps?
This tool expects second-precision timestamps (10 digits). If you have a millisecond timestamp (13 digits) — as produced by JavaScript's Date.now(), Java's System.currentTimeMillis(), or many browser APIs — divide it by 1000 to convert to seconds before pasting it here. A quick rule: 10 digits = seconds, 13 digits = milliseconds.
What is the maximum Unix timestamp?
On 32-bit systems, the Unix timestamp is stored as a signed 32-bit integer, which overflows on January 19, 2038 at 03:14:07 UTC — this is known as the Year 2038 problem (Y2K38). Modern 64-bit systems use 64-bit integers for timestamps, which won't overflow for approximately 292 billion years. Most current databases and operating systems have already migrated to 64-bit timestamps.
What is ISO 8601 format?
ISO 8601 is the international standard for representing dates and times, published by the International Organization for Standardization. The format looks like: 2023-11-14T22:13:20.000Z. The T separates the date from the time, and the trailing Z means UTC (from the word 'Zulu', NATO's phonetic word for UTC). ISO 8601 is the format used by most REST APIs, JSON specifications (RFC 3339), database standards, and log aggregation systems.
How do I get the current Unix timestamp?
Click the 'Now' button to auto-fill the current Unix timestamp. In code: JavaScript uses Math.floor(Date.now() / 1000), Python uses int(time.time()), PHP uses time(), Ruby uses Time.now.to_i, Go uses time.Now().Unix(), and shell uses date +%s.
Why does my timestamp convert to a date in the year 55,000?
You almost certainly have a millisecond timestamp (13 digits) instead of a second timestamp (10 digits). Divide your number by 1000 and try again. JavaScript's Date.now() returns milliseconds, which is one of the most common sources of this confusion.
Can I convert a negative Unix timestamp?
Yes. Negative Unix timestamps represent dates before January 1, 1970. For example, -1 represents December 31, 1969 at 23:59:59 UTC. This is valid and supported — just enter the negative number and click Convert.
Is my timestamp data sent to a server?
No. All conversion happens entirely in your browser using JavaScript's built-in Date object. No data is transmitted, logged, or stored anywhere. The conversion is instantaneous and completely private.

Related Tools

📖 Learn More

Want to understand how this works under the hood? Read our in-depth guide:

Unix Timestamps Explained — What They Are & How to Convert