5 new job openings added this week

Unix Timestamp Converter

Developer Tools Runs in your browser

Convert Unix timestamp to date or date to timestamp. Supports seconds and milliseconds format.

Unix Timestamp Converter tool

Current Unix Timestamp

—
—

Timestamp → Date

Date → Timestamp

Quick Timestamps

About Unix Timestamp Converter

Paste a Unix timestamp to see it as local time, UTC, ISO 8601 and a plain "3 hours ago", or pick a date and time to get the epoch value back. Seconds and milliseconds are both handled — tell it which you have using the unit selector. The current timestamp ticks live at the top of the page, and everything is computed in your browser.

What this tool does

  • Timestamp to date, in seconds or milliseconds
  • Date and time back to a Unix timestamp
  • Results shown as local time, UTC, ISO 8601 and relative time
  • Live current Unix timestamp, updating every second
  • Quick presets for now, one hour, one day and one week ago
  • Copy buttons for the current and converted timestamps

Runs in your browser. This tool runs entirely in your browser using JavaScript. Nothing you enter or open here is uploaded to our servers.

How to use Unix Timestamp Converter

  1. Paste the timestamp

    Drop the number into the Unix Timestamp box. Conversion happens as you type.

  2. Set the unit to match your value

    Ten digits means seconds; thirteen means milliseconds. This is the step that matters — the tool does not detect it for you, and the wrong setting produces a plausible-looking but badly wrong date.

  3. Read the four outputs

    Local Time uses your machine's timezone. UTC and ISO 8601 do not. Relative gives you the "how long ago" reading at a glance.

  4. Or go the other way

    Pick a date and time in the second panel, choose whether you want seconds or milliseconds out, and press Convert.

Unix Timestamp Converter examples

Real input and the output this tool produces for it.

Example inputs and the results Unix Timestamp Converter returns
Example Input Result
Seconds to date 1638360000 (unit: seconds) 2021-12-01T12:00:00.000Z
Milliseconds to date 1638360000000 (unit: milliseconds) The same instant — set the unit to match
Wrong unit, wrong answer 1638360000000 with unit left on seconds A date around the year 53,879 — no error is shown
Date to timestamp 2026-09-05, 14:30 The epoch value for that local moment

Working with Unix time

What Unix time is

A Unix timestamp is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970 — the "Unix epoch". It is a single integer with no timezone, no calendar and no formatting, which is exactly why databases, logs and APIs use it: one number that means the same instant everywhere on earth.

The trade-off is that it is unreadable to people, which is what this converter is for. Negative values represent instants before 1970 and are handled correctly by the timestamp-to-date direction.

Seconds or milliseconds — check the digit count

This is the single most common source of wrong answers, and it is worth being deliberate about.

Unix time is conventionally counted in seconds, which gives a 10-digit number for any current date. JavaScript's Date.now(), Java's System.currentTimeMillis() and many JSON APIs use milliseconds, which gives 13 digits.

Count the digits before you convert. Ten means seconds; thirteen means milliseconds. This tool does not auto-detect, so a 13-digit value left on the seconds setting is multiplied by a thousand again and lands tens of thousands of years in the future — with no warning, because that is still a technically valid date.

Recognising the unit from the number
Digits Unit Where it comes from
10 Seconds PHP time(), Python time.time(), Unix date +%s, most SQL and most APIs
13 Milliseconds JavaScript Date.now(), Java currentTimeMillis(), many JSON payloads
16 Microseconds Some high-resolution logs — divide by 1,000 to use here
19 Nanoseconds Go UnixNano(), some tracing systems — divide by 1,000,000

Local time, UTC and ISO 8601

The same instant reads differently depending on how you write it, and the three outputs answer three different questions.

  • Local Time — the instant as it appears on the machine you are using now, in its timezone and locale format. Useful for "when did this happen for me", but it moves if you open the same timestamp on a machine set to another timezone.
  • UTC — the same instant on the global reference clock, with no daylight-saving. This is what to quote when you are talking to someone in another country.
  • ISO 8601 — the machine-readable form, always in UTC and always ending in Z (for example 2026-09-05T14:30:00.000Z). This is the format to put in an API payload, a config file or a log.
  • Relative — "3 hours ago". Good for a quick sense of recency; not something to paste into a record.

Getting the current timestamp in code

The live figure at the top of the page is handy for a quick check, but you will usually want it from the language you are working in.

Current Unix timestamp by language
Language Seconds Milliseconds
JavaScript Math.floor(Date.now() / 1000) Date.now()
PHP time() (int) (microtime(true) * 1000)
Python int(time.time()) int(time.time() * 1000)
Shell date +%s date +%s%3N (GNU date)
MySQL UNIX_TIMESTAMP() —
PostgreSQL EXTRACT(EPOCH FROM NOW()) —

The year 2038 problem

Systems that store Unix time in a signed 32-bit integer run out of room at 03:14:07 UTC on 19 January 2038, at timestamp 2147483647. One second later the value overflows to a negative number, which reads as December 1901.

Modern 64-bit systems are unaffected, but the constraint persists in embedded devices, older database columns and file formats. If you are designing storage now, use a 64-bit integer or a native timestamp type.

When people use this tool

Reading a timestamp out of a log

Turn the epoch value in a log line into a time you can compare against an incident report.

Debugging an API response

Check whether a returned timestamp is the moment you expected — and in the unit you expected.

Writing a database query

Get the epoch value for a specific date to use in a WHERE clause.

Setting an expiry

Convert a target date into the timestamp a token or cache entry needs.

Checking a JWT

The iat, nbf and exp claims are Unix timestamps in seconds.

Comparing events across timezones

Convert both to UTC so a difference is a real difference and not a timezone artefact.

More about Unix Timestamp Converter

Convert between Unix timestamps and human-readable dates with real-time current timestamp display that updates every second. Timestamp to Date converter supports both seconds (10 digits) and milliseconds (13 digits) with output showing local time, UTC time, ISO 8601 format, and relative time (e.g., "2 hours ago"). Date to Timestamp converter with date and time pickers, outputs in seconds or milliseconds format. Quick timestamp buttons for now, 1 hour ago, 1 day ago, and 1 week ago for instant conversion. Copy any timestamp with one click. Perfect for debugging, API testing, log analysis, database queries, and time-based calculations. Works entirely in browser with no server requests.

Unix Timestamp Converter — frequently asked questions

All Developer Tools

Share This Tool

Help others discover this tool by sharing it on social media

Embed Unix Timestamp Converter on your site

Paste this iframe into your own page to give your readers the working tool without sending them away. The embed carries a "Powered by TechBelievers" link and needs no API key.

Embed code
<iframe src="https://techbelievers.com/tools/unix-timestamp-converter/embed?theme=light" width="100%" height="600px" title="Unix Timestamp Converter by TechBelievers" style="border:1px solid #e2e8f0;border-radius:0.5rem"></iframe>

Report a problem or suggest an improvement

Only used to reply to you about this report.

Join Whatsapp