Unix Timestamp Converter

Turn an epoch timestamp into a readable date in any time zone — or a date into a timestamp. Seconds and milliseconds are recognized automatically.

  • Live epoch time
  • All time zones
  • Batch mode
  • Instant

Current Unix time

—

Timestamp to date

Seconds, milliseconds, microseconds or nanoseconds — or a date such as 2026-10-05T14:30:00Z.

Date to timestamp

Convert a list
Get the current timestamp in code

JavaScript

Math.floor(Date.now() / 1000)

Python

import time
          int(time.time())

PHP

time();

Java

System.currentTimeMillis() / 1000L

C#

DateTimeOffset.UtcNow.ToUnixTimeSeconds()

Go

time.Now().Unix()

Ruby

Time.now.to_i

Rust

SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs()

Swift

Int(Date().timeIntervalSince1970)

Kotlin

System.currentTimeMillis() / 1000

MySQL

SELECT UNIX_TIMESTAMP();

PostgreSQL

SELECT EXTRACT(EPOCH FROM now())::bigint;

SQLite

SELECT strftime('%s', 'now');

Bash

date +%s

PowerShell

[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()
How it works

How to convert a timestamp

Both directions on one page.

  1. 1

    Paste a timestamp

    For example 1760000000. The unit — seconds, milliseconds, microseconds or nanoseconds — is detected from its length.

  2. 2

    Pick a time zone

    Your own zone is preset. Choose any other to see the same moment there, daylight saving time included.

  3. 3

    Copy the format you need

    Local date, UTC, ISO 8601, RFC 2822, relative time, week number — each with a copy button.

Why ToolCMB

Everything about one moment in time

For logs, APIs, databases and tokens.

Detects the unit

10 digits are read as seconds, 13 as milliseconds, 16 as microseconds and 19 as nanoseconds. You can also set the unit yourself.

Any time zone

More than 400 IANA zones with their historical and future daylight-saving rules, straight from your browser’s database.

Date to timestamp

Enter a date and time in any zone and get seconds, milliseconds and ISO 8601 back.

Standard formats

ISO 8601 with offset, the UTC form ending in Z, and RFC 2822 as used in e-mail and HTTP headers.

Convert whole lists

Paste a column of timestamps from a log or spreadsheet and convert them all in one go.

Snippets for 15 languages

How to get the current Unix time in JavaScript, Python, PHP, Java, Go, SQL, Bash and more.

Instant results

The output updates while you type. There is no button to wait for and no page reload.

Private by design

Everything runs in your browser. What you type or open is not sent to a server.

What Unix time is

Unix time counts the seconds since 1 January 1970, 00:00:00 UTC — the “epoch”. It is a single number without time zone, which makes it ideal for storing and comparing moments: 1760000000 means the same instant in Tokyo and in New York. Only when a timestamp is shown to a person is it converted into a local date.

Different systems count in different units. Unix tools, PHP and most databases use seconds (10 digits today). JavaScript and Java use milliseconds (13 digits), Python’s time.time() returns seconds with decimals, and some databases and tracing tools store micro- or nanoseconds. Mixing them up is the classic bug behind dates in 1970 or in the year 57,000.

Two limits are worth knowing. Systems that store seconds in a signed 32-bit integer overflow on 19 January 2038 at 03:14:07 UTC — the “Year 2038 problem”; 64-bit timestamps do not have it. And Unix time ignores leap seconds: every day has exactly 86,400 seconds, which keeps date arithmetic simple at the cost of a one-second smear on the rare days a leap second is inserted.

Timestamps worth recognizing

Timestamp (seconds)Date (UTC)Why it matters
01 Jan 1970, 00:00:00The Unix epoch
10000000009 Sep 2001, 01:46:40The first ten-digit timestamp
170000000014 Nov 2023, 22:13:20A recent round number
200000000018 May 2033, 03:33:20The next big milestone
214748364719 Jan 2038, 03:14:07Largest signed 32-bit value (Year 2038)

Tips

  • Count the days or working days between two dates with the Date Calculator.
  • Read the exp and iat claims of a token with the JWT Decoder.
  • A version 7 UUID carries its creation time — decode it with the UUID Generator.
  • Store times in UTC and convert to local time only for display. Store the time zone name (for example Europe/Berlin), not a fixed offset, when future local times matter.
FAQ

Frequently asked questions

Can’t find your answer? Contact us — we reply quickly.

What is a Unix timestamp?

The number of seconds that have passed since 1 January 1970 at 00:00:00 UTC, not counting leap seconds. It identifies a moment in time independent of any time zone.

How do I know whether a timestamp is in seconds or milliseconds?

By its length: current timestamps have 10 digits in seconds and 13 in milliseconds. The converter detects this automatically and tells you how it read your value.

Does a timestamp have a time zone?

No. A timestamp is always based on UTC. The time zone only matters when the timestamp is displayed as a date — which is why the same number shows different clock times in different places.

What is the Year 2038 problem?

Software that stores Unix time as a signed 32-bit integer can count only up to 2,147,483,647, which is reached on 19 January 2038. One second later the value wraps to a date in 1901. Systems with 64-bit time are not affected.

Are negative timestamps valid?

Yes. They stand for moments before 1970: −86400 is 31 December 1969. The converter handles dates far into the past and future.

Is my data sent to a server?

No. The tool runs entirely in your browser. Your input is not uploaded, logged or stored on our servers.

More free developer tools

Encode, format, test, convert and generate — small tools that run in your browser and keep your data on your device.

Browse all tools