Epoch & Unix Timestamp Converter
Online epoch converter — convert Unix timestamps to dates, generate Discord timestamp formats, and see code examples.
Free online Unix timestamp converter — paste any epoch to get a human-readable date in any timezone, generate Discord timestamp formats, convert dates back to Unix time, and copy ready-made code snippets for JavaScript, Python, PHP, and Go. Runs entirely in your browser — no data sent to a server.
Mode
Input unit
Auto: <13 digits = seconds, ≥13 = ms.
Timezone
Enter seconds or milliseconds — auto-detected by default.
Treated as the selected timezone.
Paste any of these into a Discord message — they render in each viewer's local timezone.
| Style | Markdown | Preview | |
|---|---|---|---|
|
What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC — a reference point known as the Unix epoch. It is a single integer, positive or negative, that represents any moment in history unambiguously and without timezone ambiguity.
Unix timestamps are used everywhere: API responses, database records, log files, JWT tokens, file system modification times, and more. Because they are timezone-agnostic, two servers in different countries can store the exact same integer and agree on the moment it represents.
Seconds vs. milliseconds — which do you have?
Traditional Unix timestamps count seconds. In mid-2026, a seconds timestamp is 10 digits (e.g., 1750000000). JavaScript's Date.now() and many modern APIs return milliseconds — a 13-digit number (e.g., 1750000000000).
| Unit | Digits (2026) | Common source |
|---|---|---|
| Seconds | 10 | C time(), Go time.Unix(), PHP time() |
| Milliseconds | 13 | JS Date.now(), Java System.currentTimeMillis() |
This converter's Auto mode detects which you have: numbers with 13 or more digits are treated as milliseconds; smaller numbers are treated as seconds.
Discord timestamps — the <t:UNIX:F> format
Discord supports dynamic timestamps in messages and embeds. Instead of displaying a fixed date string, Discord renders the timestamp in each user's local timezone. The syntax is <t:UNIX_SECONDS:STYLE> — where STYLE is one of seven format codes:
| Code | Style | Example output |
|---|---|---|
| d | Short Date | 11/28/2018 |
| D | Long Date | November 28, 2018 |
| t | Short Time | 9:01 AM |
| T | Long Time | 9:01:00 AM |
| f | Short Date/Time | November 28, 2018 9:01 AM |
| F | Long Date/Time (default) | Wednesday, November 28, 2018 9:01 AM |
| R | Relative | 3 years ago |
Use this converter to find the Unix timestamp for any date, then copy the Discord markdown from the table above. The relative (R) style is especially useful for event announcements since it counts down automatically.
Code examples for common languages
| Language | Current timestamp | Timestamp → date |
|---|---|---|
| JavaScript | Math.floor(Date.now()/1000) | new Date(ts*1000) |
| Python | int(time.time()) | datetime.fromtimestamp(ts) |
| PHP | time() | date('c', $ts) |
| Go | time.Now().Unix() | time.Unix(ts, 0) |
| Bash | date +%s | date -r $ts (macOS) |
The Year 2038 problem explained
Many older systems store Unix timestamps as a signed 32-bit integer. The maximum value is 2,147,483,647, which corresponds to January 19, 2038, 03:14:07 UTC. One second later the value wraps to -2,147,483,648, which most systems interpret as December 13, 1901.
Systems at risk include legacy embedded devices, some MySQL TIMESTAMP columns, and old 32-bit kernels. Modern 64-bit Linux/Windows/macOS and PostgreSQL (64-bit timestamps internally) are safe until approximately year 292 billion.
Frequently asked questions
Related tools: Base64 Converter · JWT Decoder · Cron Expression Generator