Skip to main content
Developer Tool

Unix Timestamp Converter (Epoch) Online

Turn a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds into a readable date, or a date into a timestamp, in any time zone.

Mode
Input

Current Unix Timestamp

0

Result

Enter a value to see results

Learn more

Unix timestamps: the essentials

Reading timestamps in logs and APIs

Logs, databases, JWT expiry fields and API responses store time as the number of seconds (or milliseconds) since 1 January 1970 UTC. Paste one to see the date it means in UTC and in your time zone; the unit is detected from the number of digits, so 1730000000 and 1730000000000 both come out right.

Time zones and the 2038 limit

A timestamp has no time zone: it is the same instant everywhere, only its display changes. Pick any zone to see the local time, daylight saving included, and copy the ISO 8601 form for code. Systems that store timestamps as signed 32-bit integers stop on 19 January 2038 at 03:14:07 UTC; 64-bit storage has no such limit.

Timestamps in APIs

REST APIs commonly use Unix timestamps instead of formatted date strings because they are timezone-agnostic, unambiguous, compact, and easy to compare mathematically. A timestamp like 1742045400 means exactly the same thing regardless of where the server or client is located.

Some APIs use seconds (Unix standard), others use milliseconds (JavaScript standard). Always check the API documentation. A quick way to tell: 10 digits = seconds, 13 digits = milliseconds.

Timezones and UTC: the source of bugs

Timezone-related bugs are among the most common in software development. A timestamp stored in UTC is absolute, but displaying it in a user's local timezone requires knowing their offset — which changes with daylight saving time.

Best practice: always store timestamps in UTC (or as Unix timestamps), and only convert to local time for display. Never store local times without timezone information.

Code examples

Getting the current timestamp: JavaScript — Date.now() returns milliseconds, use Math.floor(Date.now()/1000) for seconds. Python — time.time() returns a float in seconds. PHP — time() returns seconds. Java — System.currentTimeMillis() returns milliseconds.

Converting a timestamp to a date: JavaScript — new Date(timestamp * 1000). Python — datetime.fromtimestamp(timestamp). PHP — date('Y-m-d H:i:s', timestamp). SQL — FROM_UNIXTIME(timestamp) in MySQL, to_timestamp(timestamp) in PostgreSQL.

How it works

Unix Timestamp Converter in 3 steps

  1. Enter a timestamp or date

    Paste a Unix timestamp (seconds or milliseconds) to convert it to a readable date, or fill in a date to get the corresponding timestamp.

  2. Choose your timezone

    Select a timezone to see the date in the correct local time. The tool auto-detects your local timezone by default.

  3. Copy the results

    Results are displayed in multiple formats (local, ISO 8601, UTC, relative). Click the copy button on any format to copy it.

Practical guides

Get the most out of timestamp conversion

How it works

Convert a Unix timestamp (seconds, milliseconds, microseconds or nanoseconds) into a readable date, or a date and time into a timestamp.

Pick a time zone (your own, UTC, Paris, New York…): it applies to the date shown and to the date you type, summer time included.

Quick & easy

Privacy & security

Your files and data never leave your device. All processing is done client-side in the browser.

Timestamps copied from production logs are converted on your device and go nowhere else.

Runs in your browser
Frequently asked questions

Unix Timestamp Converter — FAQ

Everything you need to know about our unix timestamp converter