Unix Timestamp Converter
Convert Unix (epoch) timestamps to human-readable dates and vice versa. All processing is client-side.
Frequently Asked Questions
Date.now() returns milliseconds (13-digit number). This tool auto-detects whether your input is in seconds or milliseconds based on its magnitude.INT(11), and 32-bit PHP builds can be vulnerable.-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.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.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.DATETIME or store Unix timestamps as BIGINT to avoid the 2038 limit and handle timezones explicitly in application code.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.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
Standards & References
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 Developer Tools
Related Articles
View all articles
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.
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.
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.
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.