Unix Timestamp Converter
Convert epoch timestamps to dates and dates to timestamps, with automatic seconds / milliseconds / microseconds detection, time zones, a line-by-line batch mode and a live current-time clock. All done locally.
Current Unix time
Timestamp to date
Date to timestamp
Batch convert
Note: a timestamp has no time zone of its own β the same number reads as a different clock time in London and New York. If two systems disagree, check seconds vs milliseconds and which zone each one displays.
How to use
- Current time: the top of the page shows the current Unix time in seconds and milliseconds. Click "Copy" to grab either value, or "Pause" to freeze the clock on a moment and "Resume" to start it again.
- Timestamp to date: paste a timestamp and the result appears straight away β local time, UTC, ISO 8601, a relative time such as "3 days ago", and the value in both seconds and milliseconds. The unit is detected from the number of digits, or you can set it yourself. Pick a zone under "Show time zone" to add that zone's clock time.
- Date to timestamp: choose a date and time (to the second), then the zone that clock time belongs to β for 9:00 in New York pick America/New_York β and click "Convert" to get the epoch value in seconds and milliseconds.
- Batch: paste one timestamp or date per line on the left and click "Convert all". Timestamps become dates, dates become timestamps in seconds, and the two can be mixed. Blank lines are kept so the output lines up with the input.
When it's useful
Reading logs and database rows that store time as numbers like created_at=1700000000. Debugging APIs: checking whether the client sends milliseconds while the server expects seconds, or whether a signed request's timestamp has expired. Working out the exact epoch value for a cron job, a cache expiry, a JWT exp claim or test fixtures. Translating one moment between offices in different zones so a release or meeting time isn't misread.
Tips
- Count the digits: 10 means seconds, 13 milliseconds, 16 microseconds and 19 nanoseconds. Every seconds timestamp between September 2001 and the year 2286 has exactly 10 digits.
- Decimals work too β Python's
time.time()output such as1700000000.123456is read as seconds and kept to the millisecond. - Negative values are dates before 1970:
-86400is 1969-12-31 00:00:00 UTC. - In batch mode, a date written as
2024-02-29 12:30:00is read in the selected zone, while one ending inZor an offset such as-05:00uses that offset. - Getting the current timestamp in code: JavaScript
Date.now()(ms), Pythonint(time.time()), JavaSystem.currentTimeMillis()(ms), Gotime.Now().Unix(), PHPtime(), MySQLUNIX_TIMESTAMP(), and on the command linedate +%s.
What is a Unix timestamp?
Unix time, also called epoch time or POSIX time, is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970. It is a single growing integer with no time zone attached: right now it is the same number everywhere on Earth, and only turning it into hours and minutes depends on where you are. Because it is compact, easy to sort and easy to subtract, databases, logs, APIs and file systems use it everywhere. This tool converts with the time-zone data built into your browser's Intl API, so daylight-saving rules are applied for each zone automatically.
Privacy
Every conversion runs in your browser. The timestamps, dates and batch lists you enter are never sent to a server, and nothing is kept once you close the tab. After the page has loaded it keeps working even offline.
FAQ
Q: How do I tell seconds from milliseconds?
A: Count the digits: current timestamps are 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The tool detects this automatically and shows what it chose, and you can override the unit.
Q: Why is my converted time off by several hours?
A: A timestamp has no time zone, so a gap of whole hours usually means one side shows UTC and the other shows local time. Compare the "Local time" and "UTC" rows in the result to see the difference.
Q: What does the time zone do in date to timestamp?
A: 9:00 on 1 January in Tokyo and 9:00 on 1 January in New York are different moments with different timestamps. Choosing the zone tells the tool whose clock time you typed, so the result is exact.
Q: What is the year 2038 problem?
A: Older systems store seconds in a signed 32-bit integer, which runs out at 2038-01-19 03:14:07 UTC and wraps to a negative number. Modern systems use 64-bit values, and this tool is not affected.
Q: Do leap seconds or daylight saving change the timestamp?
A: No. Unix time counts every day as exactly 86,400 seconds and ignores leap seconds. Daylight saving only changes how a timestamp reads as local clock time, which the tool applies per zone. When turning a date into a timestamp, a clock time that happens twice (clocks go back) uses the earlier one, and a skipped time such as 2:30 is read as 3:30, the same as Python and JavaScript.
Q: Is anything uploaded?
A: No. All conversion happens locally in your browser, and the page has no step that sends your data to a server.