Unix Timestamp Converter
Convert between Unix timestamps and human-readable dates. Supports seconds and milliseconds.
Enter a Unix timestamp to convert to a readable date, or enter a date to get its Unix timestamp.
0What Is a Unix Timestamp?
A Unix timestamp is the number of seconds since January 1, 1970 00:00:00 UTC, a moment known as the "Unix epoch." Right now, the timestamp is somewhere around 1.78 billion. It's how computers have tracked time for over 50 years: one single number, no time zones, no formatting ambiguity.
Think of it as a universal clock. While humans argue about whether "01/02/2025" means January 2nd or February 1st (it depends which country you're in), computers just store 1735776000 and convert to whatever format the user needs. Every database, every API, every log file understands Unix timestamps.
This converter lets you go both ways: paste a Unix timestamp to see the human-readable date, or pick a date to get the timestamp. It handles seconds (10 digits) and milliseconds (13 digits, what JavaScript uses). All conversions run in your browser.
Notable Unix Timestamps
| Timestamp | Date (UTC) | Significance |
|---|---|---|
| 0 | 1 Jan 1970 00:00:00 | The Unix epoch, where it all began |
| 1000000000 | 9 Sep 2001 01:46:40 | One billion seconds, celebrated with "billion second" parties |
| 1234567890 | 13 Feb 2009 23:31:30 | Sequential digits. Developers threw "Unix time parties" |
| 1700000000 | 14 Nov 2023 22:13:20 | 1.7 billion seconds milestone |
| 2000000000 | 18 May 2033 03:33:20 | Two billion seconds, Y2K38 approaches |
| 2147483647 | 19 Jan 2038 03:14:07 | Y2K38, 32-bit signed integer overflow. Systems using int32 will break |
| 4102444800 | 1 Jan 2100 00:00:00 | Turn of the next century. 64-bit timestamps handle this easily |
Y2K38 matters today. If your system stores timestamps as 32-bit signed integers, it will overflow on 19 January 2038. Embedded systems, IoT devices, and legacy databases are most at risk. Most modern systems use 64-bit integers, which last until the year 292 billion. Check your database column types, INT(10) in MySQL is 32-bit.
Time Zone Reference
Unix timestamps are always UTC. When you convert to a human-readable date, you need to know the target time zone. Search below to find the offset and DST rules for any zone.
| Abbreviation | UTC Offset | Region |
|---|---|---|
| UTC | +00:00 | Global |
| GMT | +00:00 | UK, Iceland, West Africa |
| BST | +01:00 | UK |
| CET | +01:00 | France, Germany, Spain, Italy |
| CEST | +02:00 | France, Germany, Spain, Italy |
| EET | +02:00 | Finland, Greece, Romania, Turkey |
| MSK | +03:00 | Russia (Moscow, St Petersburg) |
| GST | +04:00 | UAE, Oman, Bahrain |
| IST | +05:30 | India |
| ICT | +07:00 | Thailand, Vietnam, Cambodia |
| CST/SGT | +08:00 | China, Singapore, Hong Kong, Taiwan |
| JST | +09:00 | Japan |
| KST | +09:00 | South Korea |
| AEST | +10:00 | Sydney, Melbourne, Brisbane |
| NZST | +12:00 | New Zealand |
| EST | −05:00 | New York, Toronto, Miami |
| EDT | −04:00 | New York, Toronto, Miami |
| CST | −06:00 | Chicago, Dallas, Mexico City |
| MST | −07:00 | Denver, Phoenix, Calgary |
| PST | −08:00 | Los Angeles, San Francisco, Seattle |
| AKST | −09:00 | Alaska |
| HST | −10:00 | Hawaii |
| BRT | −03:00 | São Paulo, Rio, Brasília |
| ART | −03:00 | Argentina |
| WAT | +01:00 | Nigeria, Cameroon, Angola |
| EAT | +03:00 | Kenya, Ethiopia, Tanzania |
| SAST | +02:00 | South Africa |
Showing 27 of 27 time zones.
Timestamps in Every Language
Every programming language has a different way to get, create, and convert timestamps. Some return seconds, some return milliseconds, mixing them up is the #1 timestamp bug.
| Language | Get Current | Unit |
|---|---|---|
| JavaScript | Date.now() | Milliseconds (ms) |
| Python | import time; time.time() | Seconds (float) |
| PHP | time() | Seconds |
| Java | System.currentTimeMillis() | Milliseconds |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds() | Seconds |
| Ruby | Time.now.to_i | Seconds |
| Go | time.Now().Unix() | Seconds |
| Rust | SystemTime::now().duration_since(UNIX_EPOCH) | Duration |
| SQL (MySQL) | UNIX_TIMESTAMP() | Seconds |
| SQL (PostgreSQL) | EXTRACT(EPOCH FROM NOW()) | Seconds (float) |
| Bash | date +%s | Seconds |
| Swift | Date().timeIntervalSince1970 | Seconds (Double) |
| Kotlin | System.currentTimeMillis() | Milliseconds |
ISO 8601 vs Unix Timestamps
Unix Timestamp
1713052800
Compact, unambiguous, easy to sort and compare mathematically. No time zone confusion, always UTC. But completely unreadable to humans. You need a converter to know what date it represents.
Best for: Database storage, computation, compact APIs, log ordering
ISO 8601
2024-04-14T00:00:00Z
Human-readable, self-documenting, includes time zone info. Standard for REST APIs and JSON. Slightly larger payload but anyone can read it without tooling.
Best for: APIs, logs, user-facing data, JSON responses, debugging
Rule of thumb: Use Unix timestamps for internal storage and computation. Use ISO 8601 for APIs, logs, and anything humans might read. Most frameworks convert between them with a single function call.
Worked Example: Debugging JWT Expiration
The situation: A user reports they're getting logged out after 5 minutes instead of the expected 24 hours. The auth system uses JWTs with an `exp` (expiration) claim stored as a Unix timestamp.
Step 1: Decode the JWT
Using the JWT Decoder, the payload shows: "exp": 1713053100, "iat": 1713052800. The iat (issued at) and exp are both Unix timestamps in seconds.
Step 2: Convert the timestamps
Paste 1713052800 (iat) into this converter: April 14, 2024 00:00:00 UTC. Paste 1713053100 (exp): April 14, 2024 00:05:00 UTC. The token expires 5 minutes after creation, not 24 hours.
Step 3: Find the bug
The backend code: `exp: Math.floor(Date.now() / 1000) + 300`. 300 seconds = 5 minutes. The developer meant to write 86400 (24 hours in seconds) but used 300 instead. A simple arithmetic error caught by converting the actual timestamp.
Fix
Change `+ 300` to `+ 86400`. Better yet, use a named constant: `const TOKEN_LIFETIME_SECONDS = 24 * 60 * 60`. Self-documenting and harder to get wrong.
Common Mistakes
Seconds vs milliseconds
JavaScript's Date.now() returns milliseconds (13 digits: 1713052800000). Most other languages return seconds (10 digits: 1713052800). Mixing them gives you dates in the year 56,000 or in January 1970. Always check the digit count.
Ignoring time zones when displaying
Unix timestamps are always UTC. If you display the raw converted date to a user in New York (UTC−5), their events will show 5 hours ahead. Always convert to the user's local time zone for display.
Storing local time as timestamp
Converting a local time (e.g., "3pm London time") to a timestamp without specifying the time zone. During BST (UTC+1), 3pm London is 2pm UTC. During GMT, 3pm London is 3pm UTC. Always specify the zone.
Using 32-bit integers
A 32-bit signed int maxes out at 2,147,483,647, January 19, 2038. If your database column is INT (not BIGINT), timestamps after 2038 will overflow. Migrate to 64-bit now, not in 2037.
Assuming all days are 86400 seconds
Days with DST transitions are 23 or 25 hours. If you add 86400 seconds to "2am Sunday" when clocks spring forward, you get "3am Monday" instead of "2am Monday." Use date libraries that handle DST.
Clock drift in distributed systems
Different servers may have slightly different clocks. A JWT issued by Server A at timestamp T may be rejected as "not yet valid" by Server B whose clock is 2 seconds behind. Use NTP sync and add clock skew tolerance.
Related Tools
Date Difference Calculator
Calculate days, hours, minutes between dates
Countdown Calculator
Count down to a future date or event
JWT Decoder
Decode exp/iat/nbf timestamp claims
JSON Formatter
Format API responses containing timestamps
Number Base Converter
Convert between decimal, hex, binary
Cron Expression Generator
Schedule time-based tasks with cron syntax
How to use this tool
Enter a Unix timestamp to convert to a readable date, or select a date to convert
The tool auto-detects seconds (10 digits) vs milliseconds (13 digits)
Copy any output format, local time, UTC, ISO 8601, or raw timestamp
Common uses
- Converting API timestamps to readable dates
- Debugging JWT token expiration times
- Converting log file timestamps for analysis
- Comparing timestamps across different systems
Share this tool
Frequently Asked Questions
What is a Unix timestamp?
Does this handle milliseconds?
What time zone is the output in?
Why does JavaScript use milliseconds instead of seconds?
What is the Year 2038 problem?
Can timestamps be negative?
How do I get the current timestamp in different languages?
What's the difference between Unix time and ISO 8601?
Does Unix time account for leap seconds?
Is my data sent to a server?
How accurate are Unix timestamps?
What's epoch time vs Unix time?
Results are for general informational purposes only and should be checked before use. They are not professional advice. See our Disclaimer and Terms of Service.