Monday, November 2, 2026
🏠 Home 🛠 All Web Utilities 📰 Tech Blog & Guides 💬 WhatsApp Link Generator ⚡ WhatsApp Direct Chat ✨ Fancy Text Generator 🕒 World Clock & Timezone

Unix Timestamp Converter Guide: Epoch, UTC & Local Time

Convert Unix timestamps to dates and dates to epoch time. Understand seconds versus milliseconds, UTC, local time, timestamp 0 and common errors.

Unix timestamp converter illustration with epoch timeline, clocks and UTC globe

A Unix timestamp converter translates machine-friendly epoch values into readable dates and converts calendar dates back into timestamps. Developers, analysts, support teams, database administrators, and API users encounter these values in logs, webhooks, tokens, spreadsheets, analytics exports, and operating systems.

Use TechCord’s free epoch converter to convert a timestamp to a date or a date to a timestamp directly in the browser. The tool accepts timestamp zero, shows UTC and local time, and helps distinguish values stored in seconds from those stored in milliseconds.

What is a Unix timestamp?

A Unix timestamp counts elapsed time from the Unix epoch: January 1, 1970 at 00:00:00 UTC. A value of 0 represents the epoch itself. Positive values represent later instants; negative values represent supported dates before the epoch.

The timestamp identifies an instant, not a human timezone. A single instant can be displayed as different local clock times depending on the viewer’s timezone, but the underlying moment remains the same.

Seconds versus milliseconds

FormatTypical lengthCommon environments
Unix seconds10 digits for modern datesPHP, Python, Linux, many APIs
Unix milliseconds13 digits for modern datesJavaScript, browser events, some databases
Microseconds16 digitsHigh-resolution logs and databases
Nanoseconds19 digitsTelemetry and performance systems

Confusing seconds and milliseconds creates dates thousands of years away or close to January 1970. To convert seconds to milliseconds, multiply by 1,000. To convert milliseconds to seconds, divide by 1,000 and decide how to handle the fractional remainder.

How to convert a timestamp to a date

  1. Copy the epoch value from the source.
  2. Check whether it is measured in seconds or milliseconds.
  3. Paste it into the timestamp converter.
  4. Review both the UTC result and your local time.
  5. Copy the format required by your application or report.

If the input is 0, the UTC result should be Thursday, January 1, 1970 at midnight. Zero is a valid value and should not be treated as an empty field.

How to convert a date to a Unix timestamp

Select a calendar date and time, decide which timezone the input represents, and convert it. The timezone decision is essential. “June 15 at noon” is incomplete unless it is associated with UTC or a local timezone.

For a user’s local date-and-time input, parse it as local time. Adding a trailing Z tells many programming environments to interpret the value as UTC and may introduce an offset error.

UTC time versus local time

UTC is the stable reference used for timestamps. Local time is a display of that instant using a regional offset and daylight-saving rules. Store or transmit the instant in UTC, then format it for the user at the interface boundary.

For cross-region planning, pair the converter with TechCord’s World Clock and Timezone Converter. For arithmetic such as adding hours or days, use the Date and Time Calculator.

Common timestamp use cases

  • API requests: expiration times, created-at fields, pagination cursors, and webhook events.
  • Server logs: ordering events consistently across machines.
  • Databases: storing an instant independently of display format.
  • Authentication: token issue and expiry times.
  • Analytics: converting exported event times into local reporting dates.
  • Spreadsheets: transforming raw epoch columns into readable date-time values.

Unix timestamp examples

ValueInterpretation
0Unix epoch: 1970-01-01 00:00:00 UTC
86400Exactly one day after the epoch in seconds
1718452800A 10-digit timestamp measured in seconds
1718452800000The same scale represented in milliseconds

Do not identify the unit from length alone when historical or far-future dates are possible. Confirm the field documentation and use plausibility checks.

Troubleshooting incorrect dates

  • If the date is near 1970, a millisecond value may have been divided twice or a seconds value treated as milliseconds.
  • If the result is far in the future, seconds may have been interpreted as milliseconds incorrectly in the other direction.
  • If the result is off by several hours, check UTC versus local parsing.
  • If it is off by exactly one hour, investigate daylight saving time.
  • If the result never updates for zero, replace a falsy check with an explicit empty-value check.
  • If duplicate local-time lines appear, check for repeated DOM nodes or render calls.

Frequently asked questions

What is the current Unix timestamp?

It is the number of seconds elapsed since the Unix epoch at the current instant. It changes every second.

Is a Unix timestamp always UTC?

It represents an instant relative to UTC. The same value can be formatted in any local timezone.

Why does JavaScript use 13-digit timestamps?

JavaScript dates commonly use milliseconds since the epoch, while many server environments use seconds.

Can Unix timestamps represent dates before 1970?

Many systems support negative timestamps, although the supported range varies by language, database, and platform.

Unix timestamp conversion in common programming languages

Different languages expose different units. JavaScript commonly uses milliseconds in Date.now(), while PHP’s time() and Python’s time.time() are based on seconds. Database functions can return either a native date-time type or an epoch number. Read the documentation for the exact field rather than assuming the unit from the language alone.

When sending JSON, document the field name and unit explicitly. Names such as created_at do not reveal whether the value is seconds, milliseconds, or an ISO 8601 string. A clearer contract uses names such as created_at_ms or defines the format in the API schema.

ISO 8601 versus epoch time

Epoch values are compact and convenient for arithmetic. ISO 8601 strings are easier for people to inspect and can include an explicit offset, for example a UTC value ending in Z. Choose one canonical storage and exchange format, document it, and convert only at system boundaries.

Do not store a local clock string without a timezone when the event represents a real instant. Local-only values are appropriate for concepts such as “store opens at 09:00,” but a completed payment or server event should be tied to an unambiguous instant.

The Year 2038 problem

Older systems that store Unix seconds in a signed 32-bit integer can overflow in January 2038. Modern platforms commonly use wider integers, but legacy databases, embedded systems, and file formats may still have the limitation. If software must handle long-term schedules, certificates, archives, or birth dates, test the supported range.

Timestamp validation checklist

  • Confirm seconds, milliseconds, microseconds, or nanoseconds.
  • Confirm whether fractions are allowed.
  • Compare UTC and local output.
  • Test timestamp zero and a known reference value.
  • Check negative-value support if historical dates matter.
  • Test a daylight-saving boundary and the supported year range.

Safe spreadsheet conversion

Spreadsheet date systems use day counts rather than Unix seconds. Convert the unit first, divide seconds by 86,400, then add the spreadsheet’s epoch offset using the correct platform convention. Format the cell as a date-time and verify the result against the online converter before applying the formula to a large dataset.

Convert epoch time instantly

Paste seconds or milliseconds, compare UTC with local time, or generate a timestamp from a calendar date.

Open the Unix Timestamp Converter →

TE

Written by Tech Cord Editorial Team

Technical writer and software engineer passionate about developer utilities, automation, and productivity tools.