Unix Timestamp Converter
Paste a Unix timestamp (epoch time) below: 10 digits is seconds, 13 digits is milliseconds and gets divided by 1000 for you. You get the date in your own time zone and in UTC, plus all nine Discord timestamp codes, ready to copy. To pick a date on a calendar instead, use the generator on the home page.
Human-readable
Enter a Unix timestamp above.
All 9 Discord codes
| Renders as | Code |
|---|---|
| — | |
| — | |
| — | |
| — | |
| — | |
| — | |
| — | |
| — | |
| — |
What counts as a Unix timestamp
A Unix timestamp is a count of seconds since January 1, 1970 UTC. For example 1735689600 is
January 1, 2025, midnight UTC. It carries no timezone of its own, which is exactly why Discord's <t:UNIX:FORMAT> markup uses it: the same number renders correctly in
every reader's own local time zone. For the full breakdown of the markup itself, see the format code reference.
The Unix number inside a Discord timestamp
In <t:1798765200:F> the Unix timestamp is the part between t: and the
second colon. Discord reads it as whole seconds since 1 January 1970 UTC and shows the moment in each
reader's own time zone. When we posted that exact code on 4 November 2026, a reader in UTC+5:30 saw
"Friday, January 1, 2027 at 6:30 AM". In UTC the same number is 01:00. Values we ran through the
converter's engine:
| Unix timestamp (seconds) | Date in UTC |
|---|---|
0 | 1 January 1970, 00:00 |
-86400 | 31 December 1969, 00:00 |
1420070400 | 1 January 2015, 00:00 (Discord's epoch, see below) |
1795899660 | 28 November 2026, 21:01 |
1798765200 | 1 January 2027, 01:00 |
99999999999 | 16 November 5138, 09:46:39 (last value read as seconds here) |
100000000000 | Read as milliseconds: 3 March 1973, 09:46:40 |
Discord epoch time vs. Unix epoch time
Discord uses two epochs. Timestamp markup counts from the Unix epoch (1970). Snowflake IDs count
milliseconds from Discord's own epoch, 1420070400000, which is 1 January 2015 00:00 UTC. In
Unix seconds that is 1420070400. To turn a snowflake into a Unix timestamp, shift it right by
22 bits and add that epoch. Our worked check: ID 175928847299117063, the example in Discord's
reference, decodes to 1462015105796 ms, so <t:1462015105:F>. The
snowflake decoder does this for you and also accepts message links.
Seconds vs. milliseconds
Discord's timestamp markup expects seconds (10 digits for any recent date), but plenty
of APIs and languages (JavaScript's Date.now() among them) return milliseconds (13 digits) instead. Paste either into the box above; the converter detects which one
you have and adjusts automatically. If you're pasting a raw code straight into Discord without this
tool, a stray millisecond value doesn't fail loudly: Discord reads it as seconds, so in our test
<t:1798765200000:F> rendered as a date in August of the year 58970. More on that in
why a Discord timestamp might not be working.
What the converter accepts, and what Discord accepts
We ran the same inputs through this converter and, on 4 November 2026, through Discord itself:
| Input | This converter | Discord, as <t:INPUT:F> |
|---|---|---|
1798765200 | Seconds: 1 January 2027, 01:00 UTC | Renders |
1798765200000 | Milliseconds, divided to 1798765200 | Renders as the year 58970 |
-86400 | 31 December 1969 | Renders |
0001798765200 | Same as without the zeros | Renders |
1798765200.5 | Rejected (whole seconds only) | Raw text |
+1798765200 | Rejected | Raw text |
1798765200000000000 | Rejected (too large) | Raw text |
The converter treats anything from 100,000,000,000 up as milliseconds. In seconds that would be the
year 5138, so no real date is misread. Discord's own ceiling is 8640000000000 seconds
(the year 275760). Full results: results.json.
Get the current Unix timestamp in code
| Language | Current Unix time (seconds) |
|---|---|
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | int(time.time()) |
| PHP | time() |
| Bash | date +%s |
| MySQL | SELECT UNIX_TIMESTAMP(); |
| PostgreSQL | SELECT EXTRACT(EPOCH FROM now())::bigint; |
| Excel (A1 holds Unix seconds, to date) | =A1/86400+DATE(1970,1,1) |
Each returns whole seconds since 1 January 1970 UTC, the value Discord expects. JavaScript's
Date.now() alone is milliseconds, hence the division. The Excel formula gives a UTC date;
format the cell as date and time to read it.
Common sources of a Unix timestamp
- Bot frameworks: discord.js's
message.createdTimestamp, Python'sint(time.time()), or any language's standard epoch call. - REST APIs: fields like
created_at,updated_at, orexpires_atfrom a third-party service you're piping into Discord. - Server logs and databases: many systems store event times as raw epoch integers rather than formatted dates.
- Discord snowflake IDs: a message, user, or channel ID technically encodes a timestamp, but against Discord's own epoch (2015-01-01), not the Unix epoch, so a raw snowflake needs decoding first before it's a Unix timestamp this tool can use. See the Discord snowflake decoder for that conversion done correctly.
Turning it into a Discord code
Once you have the Unix timestamp, wrapping it for Discord is just <t:UNIX:FORMAT>, and the table above already builds all nine for you, so copy whichever one fits the message: R for a relative "in X" phrase, F for a full formal date and time, or any of the other five. If you'd rather generate the same codes from a script instead of pasting into a
page, the same computation is available as JSON over HTTP. See the developer portal & API.