Unix Timestamp Converter
Convert between Unix timestamps and human-readable dates. See results in UTC, local time, ISO 8601, and relative time formats.
Current Unix Timestamp
1778002204
Timestamp to Date
Date to Timestamp
How to use
Enter a Unix timestamp (seconds since January 1, 1970) to convert it to a human-readable date, or pick a date and time to get the corresponding Unix timestamp. The current Unix timestamp is displayed at the top and updates every second. Use the Copy buttons to copy any result to your clipboard.
What is a Unix Timestamp?
A Unix timestamp (also known as Epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. It is widely used in programming, databases, and APIs because it provides a simple, timezone-independent way to represent a point in time. Unix timestamps are integers, making them easy to store, compare, and calculate with.
When this tool helps
Developers encounter Unix timestamps daily in database records, API responses, log files, and system events. Reading "1711929600" means nothing at a glance, but converting it to "April 1, 2024 12:00:00 UTC" makes it immediately useful. This tool is useful for debugging time-related bugs, verifying API timestamps, investigating log events, comparing dates across systems, and converting between human-readable dates and epoch values. The live-updating current timestamp display also serves as a quick reference during development.
Examples
Example 1: Debugging a Database Record
A developer finds a database record with created_at value 1698796800. Pasting it into the converter reveals "November 1, 2023 00:00:00 UTC", confirming the record was created at midnight UTC on November 1st. This is faster than writing a quick script or calculating manually.
Example 2: Setting an API Expiration
An engineer needs to set a token expiration to December 31, 2025 at 23:59:59 UTC. They enter this date in the converter and get timestamp 1767225599. This value goes into the API configuration, ensuring the token expires at exactly the right moment regardless of server timezone.
Example 3: Analyzing Server Logs
A DevOps engineer investigating a server outage finds log entries with millisecond timestamps like 1711929600123. Converting reveals the exact moment: April 1, 2024 12:00:00.123 UTC. By converting multiple timestamps, they can establish a precise timeline of events leading to the outage.
Things to watch
- •Check whether your timestamp is in seconds (10 digits) or milliseconds (13 digits), using the wrong unit shifts the date by thousands of years.
- •Unix timestamps are always UTC, when comparing with local times, account for your timezone offset.
- •Negative timestamps represent dates before January 1, 1970, for example, -86400 is December 31, 1969.
- •When storing timestamps in databases, use BIGINT (64-bit) instead of INT (32-bit) to avoid the Year 2038 overflow problem.
- •ISO 8601 format (e.g., 2024-04-01T12:00:00Z) is the best human-readable alternative to timestamps for API design and logging.
Common questions
- What is a Unix timestamp?
- A Unix timestamp (also called Epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC. It provides a simple, timezone-independent way to represent a specific point in time and is widely used in programming, databases, and APIs.
- When did Unix time start?
- Unix time started on January 1, 1970 at midnight UTC, a moment known as the Unix Epoch. This date was chosen as an arbitrary reference point for the Unix operating system. Timestamps before this date are represented as negative numbers.
- What is the Year 2038 problem?
- The Year 2038 problem is a potential issue where 32-bit signed Unix timestamps will overflow on January 19, 2038. Systems using 32-bit integers for timestamps may malfunction or reset at this point. Most modern systems now use 64-bit timestamps, which won't overflow for billions of years.
- What is the difference between seconds and milliseconds timestamps?
- Unix timestamps in seconds are 10 digits long (e.g., 1711929600) while millisecond timestamps are 13 digits (e.g., 1711929600000). JavaScript uses milliseconds internally (Date.now()), while most Unix systems and databases use seconds. To convert: seconds × 1000 = milliseconds, or milliseconds / 1000 = seconds.
- How do I get the current Unix timestamp in code?
- In JavaScript: Math.floor(Date.now() / 1000). In Python: import time; int(time.time()). In PHP: time(). In Bash: date +%s. In Java: System.currentTimeMillis() / 1000. All return the number of seconds since January 1, 1970 UTC. This tool shows the live current timestamp for quick reference.