# Unix Timestamp Converter

> Paste a Unix timestamp in seconds or 13-digit milliseconds to see UTC, local time, and ISO 8601. Convert a local date back to epoch seconds or milliseconds.

- **Source:** DevDreaming (https://devdreaming.com)
- **Canonical URL:** https://devdreaming.com/tools/unix-timestamp-converter
- **Category:** JavaScript & Code
- **Price:** Free - no signup

---

## Unix timestamps in seconds and milliseconds

Unix time measures time from January 1, 1970 at 00:00:00 UTC. For example, 1704067200 seconds and 1704067200000 milliseconds represent the same instant, January 1, 2024 at 00:00:00 UTC.

The converter treats 13-digit values as milliseconds and shorter values such as 1704067200 as seconds. Compare the ISO 8601, UTC, and local results to check when an API event or log entry occurred. To get a timestamp for a calendar date, enter the date in your browser's local time zone.

## How to use it

1. Enter a timestamp, for example 1704067200 in seconds or 1704067200000 in milliseconds.
2. Use the Now, 1 Hour Ago, 1 Day Ago, or 1 Week Ago buttons to load a quick example timestamp.
3. To go the other way, pick a date and time in the right-hand Date and Time field.
4. Read the converted timestamp in seconds and milliseconds from that date.
5. Review the Formatted Output card for ISO 8601, UTC, local, and Unix representations.
6. Click the copy icon next to any value, or press Ctrl+L to reset both fields to the current time.

**[Open the Unix Timestamp Converter tool ->](https://devdreaming.com/tools/unix-timestamp-converter)**

This tool runs in your browser and cannot be operated from this Markdown copy - open the link above to use it.

## What you can use it for

- Decoding a Unix timestamp found in a database row, log line, or API response into a readable date.
- Converting a specific calendar date into a Unix timestamp for a query or API request.
- Checking whether a timestamp is in seconds or milliseconds before using it in code.
- Getting an ISO 8601 string for a given moment to store or pass between systems.
- Inspecting the year, month, day, and weekday for a timestamp during debugging.
- Generating a timestamp for a relative point in time, such as one week ago, for filtering data.

## Key features

- Automatic millisecond detection for 13-digit inputs.
- Two-way conversion between Unix timestamps and calendar dates.
- Multiple output formats including ISO 8601, UTC string, and local date and time.
- Year, month, day, and weekday breakdown for any converted timestamp.

## Frequently asked questions

### What is a Unix timestamp?

A Unix timestamp is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC, known as the Unix epoch. It is a timezone-independent way to represent a single point in time as a plain integer.

### How do I convert a Unix timestamp to a date?

Paste the number into the Unix Timestamp field. A 13-digit value is read as milliseconds. The Formatted Output card shows the date in ISO 8601, UTC, and local time.

### What is the difference between a 10-digit and 13-digit timestamp?

Modern Unix timestamps are commonly 10 digits in seconds and 13 digits in milliseconds. This converter uses that length to recognize milliseconds. Check the source format for historical dates or unusual values.

### Are Unix timestamps affected by timezones?

No. A Unix timestamp always represents a moment in UTC, so the integer itself is timezone-independent. Only the human-readable date depends on a timezone, which is why this tool shows both UTC and local formats.

### How do I convert a date to a Unix timestamp?

Use the Date to Unix Timestamp panel, pick a date and time, and the tool shows the equivalent timestamp in both seconds and milliseconds, ready to copy.

### What is the year 2038 problem?

Systems that store Unix time in a signed 32-bit integer can only count up to January 19, 2038, after which the value overflows. Modern 64-bit systems avoid this limit. It is a storage concern in legacy code, not something that affects this converter.

## Privacy

All tools on DevDreaming run entirely in your browser - your input is never uploaded to a server.

---

## Related on DevDreaming

- [All Free Developer Tools](https://devdreaming.com/tools)
- [JavaScript & Code Tools](https://devdreaming.com/tools/category/javascript-code)
- [Curl to Fetch Converter](https://devdreaming.com/tools/curl-to-fetch-converter)
- [Code Block Comparator](https://devdreaming.com/tools/code-block-comparator)
- [Binary/Decimal Converter](https://devdreaming.com/tools/binary-decimal-converter)
- [JSON Path Finder](https://devdreaming.com/tools/json-path-finder)
- [License Header Generator](https://devdreaming.com/tools/license-header-generator)
- [TODO Comment Extractor](https://devdreaming.com/tools/todo-comment-extractor)

---

_This is the Markdown twin of a page on **DevDreaming** - free developer tutorials, tools, and AI resources. Source of truth: the canonical HTML URL above._