Discord Unix Timestamp Converter

Already have a Unix timestamp — from an API response, a bot, or a log file — instead of a date to pick? Paste it below to see the date it represents and every Discord timestamp code built from it.

Human-readable

Enter a Unix timestamp above.

All 7 Discord codes

Renders asCode

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.

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 is the single most common reason a timestamp shows as raw text instead of rendering — see why a Discord timestamp might not be working.

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> — the table above already builds all seven 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, but if you're building the <t:UNIX:FORMAT> code by hand, remember Discord only accepts seconds.

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.

Can I go the other direction — 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.