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
01 January 1970, 00:00
-8640031 December 1969, 00:00
14200704001 January 2015, 00:00 (Discord's epoch, see below)
179589966028 November 2026, 21:01
17987652001 January 2027, 01:00
9999999999916 November 5138, 09:46:39 (last value read as seconds here)
100000000000Read 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:

InputThis converterDiscord, as <t:INPUT:F>
1798765200Seconds: 1 January 2027, 01:00 UTCRenders
1798765200000Milliseconds, divided to 1798765200Renders as the year 58970
-8640031 December 1969Renders
0001798765200Same as without the zerosRenders
1798765200.5Rejected (whole seconds only)Raw text
+1798765200RejectedRaw text
1798765200000000000Rejected (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

LanguageCurrent Unix time (seconds)
JavaScriptMath.floor(Date.now() / 1000)
Pythonint(time.time())
PHPtime()
Bashdate +%s
MySQLSELECT UNIX_TIMESTAMP();
PostgreSQLSELECT 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's int(time.time()), or any language's standard epoch call.
  • REST APIs: fields like created_at, updated_at, or expires_at from 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.

Frequently asked questions

What is a Unix timestamp?

It's a single number counting whole seconds since January 1, 1970 UTC (the "Unix epoch"). Every modern system, including Discord's own <t:UNIX:FORMAT> markup, can represent any date or time as one of these numbers, which makes it a common interchange format between otherwise unrelated tools.

Why is my timestamp 13 digits instead of 10?

You have milliseconds, not seconds. JavaScript's Date.now() and many APIs return milliseconds since the epoch. This converter detects that automatically (any value of 100,000,000,000 or more can only be milliseconds) and divides by 1000 before converting. If you build the <t:UNIX:FORMAT> code by hand, use seconds: Discord doesn't reject milliseconds, it reads them as seconds, so <t:1798765200000:F> shows a date in the year 58970.

Does this convert a Discord snowflake ID?

Not directly. A Discord snowflake (a message, user, or server ID) encodes a timestamp, but relative to Discord's own epoch (January 1, 2015 UTC), not the Unix epoch, and it's packed into the high bits of a 64-bit integer rather than being a plain Unix timestamp. Pasting a snowflake here would produce the wrong date. Use the Discord snowflake decoder instead. It does the correct math and also shows the code table above.

Where do I get a Unix timestamp from?

Common sources: a REST API response field (created_at, timestamp, expires_at), a bot framework property like discord.js's message.createdTimestamp, a server log line, a database column, or Math.floor(Date.now() / 1000) / int(time.time()) in your own code.

How do I get the Unix time out of an existing Discord timestamp?

It's the number between t: and the second colon: <t:1798765200:F> is Unix time 1798765200. Paste that number above to see the date it stands for.

What is the largest Unix timestamp Discord accepts?

8640000000000 seconds, which is 13 September 275760, the last date JavaScript can represent. In our test one second more showed as raw text. Negative values (dates before 1970) and zero work.

Can I go the other direction and pick a date and get a Unix timestamp?

Yes, that's what the main Discord timestamp generator does: pick a date and time on a calendar/clock picker instead of typing a number, and it computes the Unix timestamp and Discord code for you.