Unix Timestamp Converter
Convert between Unix timestamps and human-readable dates. Seconds and milliseconds, UTC and local.
Enter input above to see the result.
What is this for?
A Unix timestamp is a single integer representing the number of seconds (or milliseconds) since 1970-01-01 00:00:00 UTC. They're the standard for storing and transmitting time in logs, APIs, databases, and protocols because they're unambiguous, timezone-free, and easy to compute with. The problem: they're meaningless to humans. When your application logs 1735689600 or a JWT expires at 1740000000, you need to know what date and time that actually represents. This tool converts between Unix timestamps and human-readable dates in both directions, with automatic detection of seconds vs. milliseconds and output in both UTC and your local timezone.
When to use it
- Decoding timestamps in log files, API responses, or error messages — paste the integer and instantly see the date.
- Checking JWT token validity: the
iat(issued at) andexp(expiration) claims use seconds-since-epoch. - Debugging database records: verify whether a
created_atcolumn is storing seconds, milliseconds, or something else entirely. - Building future timestamps for scheduled jobs, cache TTLs, or
Retry-Afterheaders — convert the date you want into the integer your tool expects. - Interpreting cache headers, HTTP date fields, and other time-sensitive protocol fields.
- Quick timezone conversions: see what a UTC timestamp looks like in your local time without switching tools.
How it works
- Paste or type a Unix timestamp (the number of seconds or milliseconds since January 1, 1970 UTC) into the input field. Negative values are valid and represent dates before 1970.
- The tool auto-detects the unit: timestamps under 10,000,000,000 are assumed to be seconds; anything larger is assumed milliseconds. If you know the correct unit, manually select it to override the heuristic.
- Conversion happens instantly: the output shows the same moment in time as UTC, ISO 8601 format, and your browser's local timezone. The relative time ("5 days ago", "in 2 hours") helps you sanity-check whether the result makes sense.
- Reverse conversion: enter a date and time, and the tool generates the Unix timestamp. Useful for scheduling tasks or understanding what integer your API expects.
Seconds, milliseconds, and beyond
- Seconds — the original Unix convention; typically 10 digits today (e.g.
1735689600). Used in C, Linux, POSIX systems, JWTs, most REST APIs, and databaseintegertimestamp columns. - Milliseconds — JavaScript's
Date.now(), Java'sSystem.currentTimeMillis(), Kafka, Elasticsearch, and many modern JSON APIs. Typically 13 digits. - Microseconds and nanoseconds — Python
time.time_ns(), Gotime.Now().UnixNano(), and some high-resolution metrics systems use 16 or 19 digits. This tool doesn't auto-convert these; divide by 1,000 or 1,000,000 first.
Common gotchas
- The Year 2038 problem — signed 32-bit timestamps overflow at
2147483647, which represents 03:14:07 UTC on 19 January 2038. Older C code, legacy MySQLTIMESTAMPcolumns, and embedded systems may wrap back to 1901. Modern 64-bit systems are safe for thousands of years. - Leap seconds are not counted — Unix time deliberately skips leap seconds, so a "day" is always exactly 86,400 seconds. This keeps arithmetic simple but means you cannot use Unix timestamps for sub-second astronomical or GPS calculations.
- Negative timestamps work but aren't universal — values before 1 January 1970 are valid mathematically, but some languages and libraries reject them. Test your platform's behaviour before relying on it.
- Auto-detection has edge cases — a 10-digit number is technically ambiguous (could be milliseconds from early 1970), but this is so rare in practice that the heuristic works. When you know the unit, select it explicitly.
- Always store and transmit UTC — timestamps themselves are timezone-free. The "Local" output uses your browser's timezone for convenience, but the integer value underneath is always UTC. Never store "local" timestamps.