Timestamp Converter
Convert Unix timestamps to human-readable dates — UTC, ISO 8601, local time, and more
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 trailingZmeans 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/2023or14/11/2023depending 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()andnew 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
1700000000
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)
0
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
1893456000
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) andexp(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, andexpires_atare 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
notBeforeandnotAfterfields 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.timestampis 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
- 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.
- 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.
- 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
- 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?
Does this tool handle millisecond timestamps?
What is the maximum Unix timestamp?
What is ISO 8601 format?
How do I get the current Unix timestamp?
Why does my timestamp convert to a date in the year 55,000?
Can I convert a negative Unix timestamp?
Is my timestamp data sent to a server?
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