Unix Timestamp Converter
Convert Unix timestamps to readable dates and back, in any time zone, with the live epoch.
One timestamp or date per line, up to 500.
Paste the code into a Discord message; everyone sees it in their own time zone and language.
Convert this timestamp in your own code.
Unix Timestamp Converter - Epoch to Date and Date to Epoch
Logs, databases and APIs store time as a number, but people read time as a date. This free Unix timestamp converter closes that gap in both directions: paste an epoch value to see the human-readable date, or pick a date and time to get the number your code expects. The current timestamp is always shown at the top, ready to copy.
Everything is calculated in your browser, so you can convert values from production logs and internal systems without sending them anywhere.
What is a Unix timestamp?
A Unix timestamp - also called epoch time or POSIX time - is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC. Because it is a single integer with no time zone, no calendar and no formatting, it is unambiguous and easy to sort, compare and subtract. That simplicity is why almost every log file, database column and API response uses it internally, and why almost every developer needs to convert it back to something readable several times a week.
Seconds or milliseconds? Count the digits
This is the single most common source of confusion. A timestamp in seconds is currently 10 digits long; the same moment in milliseconds is 13 digits. Unix, PHP, Python and most databases work in seconds, while JavaScript's Date.now(), Java and many logging systems use milliseconds. If a converted date lands in 1970, you passed milliseconds to a tool expecting seconds. If it lands tens of thousands of years in the future, you did the opposite. This converter counts the digits for you: up to 11 digits are read as seconds, up to 14 as milliseconds, up to 17 as microseconds and anything longer as nanoseconds, and a line under the result says which unit it assumed. If it guesses wrong, for example for a millisecond value from the early 1970s, choose the unit yourself in the Unit menu instead of Auto-detect.
How to convert a timestamp
- To read an epoch value, paste it into the timestamp field and click Convert.
- To go the other way, enter a date and time and click Convert in the date section.
- Click Use Current to prefill the field with the present moment.
- Copy the live timestamp at the top whenever you need a value for a test, a token or a query.
- Choose a time zone from the selector to read the date in that zone, or to enter a date as that zone's local time.
- To convert many values at once, open the Batch tab, paste up to 500 timestamps or dates, one per line, and click Convert all. On Auto-detect, each line's unit is worked out separately, and Copy as CSV hands the table to a spreadsheet.
Timestamps you will recognise
| Value | Moment | Why it matters |
|---|---|---|
0 | 1 January 1970, 00:00:00 UTC | The epoch itself; a date of 1970 usually means a null or empty value |
1000000000 | 9 September 2001 | The first ten-digit timestamp |
1700000000 | 14 November 2023 | A handy modern reference point |
2147483647 | 19 January 2038 | The largest value a signed 32-bit integer can hold |
| Negative values | Before 1970 | Valid, but unsupported by some libraries and databases |
Where epoch time shows up
- The
exp,iatandnbfclaims inside a JWT - decode one with the JWT decoder. - Server and application log lines, where each entry is prefixed with an epoch value.
- Database columns such as
created_atstored as integers instead of datetime types. - Cache expiry, rate-limit windows and scheduled job triggers.
- Webhook payloads and API signatures that include a timestamp to prevent replay attacks.
- File modification times reported by the operating system.
Time zones and why your date looks wrong
A timestamp has no time zone - it is an absolute point in time. The date you see is a rendering of that point in some zone, so the same number reads as different local times in Tehran, Berlin and Tokyo. When a value looks a few hours off, the number is almost never wrong; the display zone is. Store and transmit in UTC, convert to local time only when showing it to a person, and keep the offset in mind when comparing a log line with a screenshot.
Pitfalls worth knowing
- The year 2038 problem. Systems still using a signed 32-bit time field overflow on 19 January 2038. Use 64-bit time types for anything with a long horizon.
- Daylight saving. Local wall-clock times can repeat or skip an hour; epoch values never do.
- Leap seconds. Unix time ignores them, so it is not a perfect count of elapsed physical seconds.
- String versus integer. A timestamp stored as text sorts alphabetically, which breaks the moment the digit count changes.
- Rounding. Converting milliseconds to seconds by truncation can shift an event into the previous second - use it consistently.
Discord timestamps
Discord renders a Unix timestamp as a live, time-zone-aware date when you write it as <t:1700000000:F>. Each style letter gives a different form: t short time, T medium time (with seconds), d short date, D long date, f long date with short time (the default), F full date with the weekday and short time, s short date with short time, S short date with medium time, and R for a relative form such as "in 3 hours". Every reader sees it in their own local time, which is the whole point.
The converter's Discord tab builds these codes for you: pick a date and time or press Use Current, and the table lists every style with its finished code under Code, a Copy button and a preview under Looks like. That tab reads the time in your device's own time zone and ignores the Time zone menu, so it is right only when the event is at a time on your own clock. For an event planned in another zone, choose that zone in the Time zone menu, enter the date and time in Date → Timestamp, click Convert and put the Seconds value into <t:...:F> yourself. The Batch tab shows its Selected zone column in the menu's zone, but it also reads a date typed without an offset in your device's zone, so for a schedule write the offset into each line, as in 2026-10-01T18:00-04:00.
Convert a timestamp in code, SQL and Excel
The converter's Code tab writes this conversion for the value in the timestamp field, or for the current time when the field is empty, in JavaScript, Python, PHP, SQL, Go, Java, C# and Bash, with a button to copy it. The table below is the short version to keep at hand.
| Where | Current timestamp | Timestamp to date |
|---|---|---|
| JavaScript | Math.floor(Date.now() / 1000) | new Date(ts * 1000) |
| Python | int(time.time()) | datetime.fromtimestamp(ts, tz=timezone.utc) |
| PHP | time() | date('Y-m-d H:i:s', $ts) |
| MySQL | UNIX_TIMESTAMP() | FROM_UNIXTIME(ts) |
| PostgreSQL | EXTRACT(EPOCH FROM now()) | to_timestamp(ts) |
| Linux shell | date +%s | date -d @1700000000 |
| Excel / Google Sheets | - | =A1/86400 + DATE(1970,1,1), then format the cell as a date (UTC; divide by 86400000 for milliseconds) |
Related tools
Time values rarely arrive alone. Inspect a token's expiry with the JWT decoder, tidy a log payload with the JSON formatter, match timestamp patterns in text with the regex tester, and create request identifiers with the UUID generator. To see when a scheduled job will run next, use the cron expression explainer.