Skip to main content

Unix Timestamp Converter

Convert in either direction: enter a Unix timestamp (seconds or milliseconds) or a UTC date and time.

Enter a Unix timestamp or a UTC date and time to convert.

Next step: Date Format Converter

When to use this calculator

Use this calculator whenever you're working with a system, API, database, or log file that stores time as a Unix timestamp and need to convert it to a readable date, or the reverse.

  • Debugging API responses

    Convert a timestamp field from an API response into a readable date to verify it's correct.

  • Database timestamp inspection

    Check what date and time a stored Unix timestamp value actually represents.

  • Generating a timestamp

    Find the Unix timestamp for a specific future date, for use in a script or system configuration.

  • Multi-format output instead

    For ISO and local formatting of one instant alongside its timestamp, use the Date Format Converter.

Inputs

  • Unix timestamp

    A timestamp in seconds or milliseconds since 1 January 1970 UTC.

  • Date and time

    A UTC date and time to convert into a timestamp, used when the timestamp field is left blank.

How the calculation works

Timestamps with 10 digits are treated as seconds; 13 digits (or larger values) as milliseconds. Values may include a decimal fraction for sub-second precision when entered as milliseconds.

Date and time fields are combined as UTC. If you also enter a timestamp, the timestamp field takes precedence. For ISO and local formatting of one instant, use the Date Format Converter.

Worked example

Timestamp: 1735732800 (10 digits, treated as seconds).

Converted date: 1 January 2025, 12:00:00 PM UTC.

Entering the same instant in milliseconds instead would be 1735732800000 (13 digits)—both represent the identical moment.

Converting the other direction: entering date 1 January 2025 and time 12:00 produces the same timestamp, 1735732800 seconds.

Edge cases

  • Ambiguous digit counts

    A timestamp with exactly 10 digits is always treated as seconds and one with 13 or more digits as milliseconds—values in between are uncommon but follow the same 13-digit-or-larger rule for milliseconds.

  • Negative timestamps

    A negative timestamp represents a date before 1 January 1970 UTC and converts correctly to that earlier date.

  • Both timestamp and date entered

    When both the timestamp field and the date/time fields have values, the timestamp field takes precedence and the date/time fields are ignored for that conversion.

  • Sub-second precision

    A millisecond timestamp with a decimal fraction (for example, from a system that logs microsecond precision truncated to milliseconds) converts using only the millisecond-level value.

The Business Days vs Calendar Days Guide explains when weekends and holidays count and which day type applies to deadlines, invoices, and contracts.

The How Business Days Are Calculated Guide and Business Days Between Dates Guide cover the counting rules behind every business-day tool on this site.

The Business Days Calculator and Working Days Calculator count weekdays between two known dates, excluding weekends and optional US federal holidays.

The Add Business Days To Date, Subtract Business Days From Date, and Business Day Offset calculators move a single date forward or backward by a business-day count.

The Business Days Until Date Calculator counts business days remaining from today or a custom date to a target deadline.

The Days Between Dates Calculator counts every calendar day between two dates, including weekends—use it instead of the business-day tools when weekends should count.

The Date Range Calculator and Date Duration Calculator break a range into calendar-day totals or a years/months/days breakdown, with inclusive or exclusive boundary options.

The Add or Subtract Days Calculator shifts a single date forward or backward by days, weeks, or months.

The Age Calculator applies the same calendar breakdown used by Date Duration to a birth date, expressed as years, months, and days.

The Hours Between Dates and Date Difference calculators measure elapsed time between two date-times down to hours, minutes, and seconds.

The Date Format Converter, Unix Timestamp Converter, and Timezone Converter handle format and zone conversion for a single instant rather than a span between two dates.

FAQ

What is a Unix timestamp?
The number of seconds (or milliseconds) that have elapsed since 1 January 1970, 00:00:00 UTC—commonly called the Unix epoch. It's a compact, timezone-independent way to store a single instant.
How do I know if my timestamp is in seconds or milliseconds?
A 10-digit value is almost always seconds (covers roughly 2001–2286); a 13-digit value is almost always milliseconds (covers roughly the same range with more precision). This calculator detects which based on the digit count.
Can I convert a date to a timestamp?
Yes. Leave the timestamp field blank and enter a date and time instead—the calculator combines them as UTC and shows the resulting timestamp in both seconds and milliseconds.
How is this different from the Date Format Converter?
This calculator is bidirectional, converting from a timestamp to a date or a date to a timestamp. The Date Format Converter starts from a date only and shows several output formats at once, including the timestamp.