Unix Timestamp Converter
Convert epoch time to a date, or a date to epoch time. Seconds, milliseconds and more are detected for you.
Runs in your browser · nothing is uploaded
How to use the Unix Timestamp Converter
- The current Unix time is shown at the top in seconds and milliseconds, updating every second. Click to copy.
- Paste a timestamp to convert it. The unit (seconds, milliseconds, microseconds or nanoseconds) is guessed from the number of digits, and you can change it.
- You get the date in UTC, in your own time zone, in ISO 8601 format and as a relative time such as "3 hours ago".
- To go the other way, pick a date and time and copy its timestamp in seconds or milliseconds.
About this tool
Unix time counts the seconds since 1 January 1970 at 00:00 UTC, known as the Unix epoch. It is how most databases, logs, APIs and programming languages store moments in time, because a single number is easy to sort, compare and send, and it is the same everywhere in the world regardless of time zone.
Different systems use different units. Unix, PHP, Python’s time.time() and JWTs use seconds (10 digits today); JavaScript’s Date.now() and Java’s currentTimeMillis() use milliseconds (13 digits); some databases and Go use microseconds or nanoseconds. Pasting a millisecond value into a seconds field gives a date thousands of years away, which is the most common timestamp bug, so this converter detects the unit from the length.
Systems that store Unix time in a signed 32-bit integer will overflow on 19 January 2038, the year 2038 problem. Modern systems use 64 bits and are safe for billions of years.
Frequently asked questions
›How do I get the current timestamp in code?
JavaScript: Math.floor(Date.now() / 1000) for seconds. Python: int(time.time()). C: time(NULL). SQL (SQLite): strftime('%s', 'now').
›Is a Unix timestamp in UTC?
Yes. A timestamp is the same instant everywhere; only its display changes with the time zone. That is why the tool shows both UTC and your local time.
›Why is my date in 1970 or in the far future?
The unit is probably wrong: a seconds value read as milliseconds lands in January 1970, and milliseconds read as seconds land tens of thousands of years ahead. Check the unit picker.
›Does Unix time include leap seconds?
No. Every Unix day is exactly 86,400 seconds, so leap seconds are not counted.
›Is my data sent anywhere?
No. The tool runs entirely in your browser with JavaScript. What you paste is never uploaded, logged or stored on our servers, so it is safe to use with internal data, though you should still treat secrets with care on shared computers.