Developer and Text Tools

How to Convert a Unix Timestamp to a Date (Seconds, Milliseconds and UTC)

Understand epoch time, tell seconds from milliseconds and convert any Unix timestamp to a readable date, or a date to a timestamp.

Saizul Amin
Saizul Amin10 Oct 2026 · 5 min read

You open a log file or an API response and find a number like 1700000000 where a date should be. This is a Unix timestamp, the most common way that computers store time. It is compact, easy to compare and the same everywhere in the world, but it is impossible to read by eye. The free Unix Timestamp Converter translates it.

Quick answer

Paste a timestamp to see the date in UTC and in your local time, or pick a date to get the timestamp in seconds and milliseconds. Timestamps with 13 digits are treated as milliseconds.

What is a Unix timestamp?

A Unix timestamp is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC, a moment called the Unix epoch. Because it is a plain number, it does not depend on time zones, daylight saving or date formats.

For example, 1700000000 is 14 November 2023, 22:13:20 UTC.

Seconds or milliseconds?

  • A 10-digit number such as 1700000000 is in seconds. This is the classic Unix timestamp.
  • A 13-digit number such as 1700000000000 is in milliseconds, common in JavaScript and many APIs.

If you treat milliseconds as seconds you will get a date thousands of years in the future, which is a quick clue that the unit is wrong. The converter treats 13-digit values as milliseconds automatically.

How to convert, step by step

  1. Open the Unix Timestamp Converter.
  2. To convert to a date, paste the timestamp. You will see the date in UTC and in your local time.
  3. To convert to a timestamp, pick a date and time. You get the value in seconds and milliseconds.

UTC and local time

UTC is the world's reference time, with no daylight saving. Your local time is UTC plus or minus your offset, for example UTC+6 in Bangladesh. When two people compare times from a log, always say which one they mean. To convert a time between cities, use the Time Zone Converter.

Where you meet timestamps

  • Server and application logs
  • API responses and database records
  • File metadata and backups
  • Authentication tokens, which often carry expiry times
  • Spreadsheets exported from systems

Common pitfalls

  • Wrong unit. Seconds versus milliseconds, as above.
  • Time zone confusion. The timestamp is UTC; a date shown without a zone may be local.
  • The year 2038 problem. Systems that store the value in a 32-bit signed number overflow in January 2038. Modern systems use 64 bits.
  • Negative values. Dates before 1970 are negative numbers.

Timestamps in the real world

You will meet timestamps in places that are not obvious:

  • Log files: each line begins with a time, often as epoch seconds.
  • APIs: fields such as created_at or expires_in.
  • JWT and login tokens: exp (expiry) and iat (issued at) claims.
  • Databases: columns storing times as integers for fast sorting.
  • Spreadsheets and exports: analytics and payment reports.

Converting by hand

For quick estimates you can reason with round numbers:

  • 1 day = 86,400 seconds
  • 1 hour = 3,600 seconds
  • 1 week = 604,800 seconds
  • 1 year is about 31,536,000 seconds

If one token expires at 1700003600 and was issued at 1700000000, the difference is 3,600 seconds, so it is valid for exactly one hour.

Time zones and daylight saving

A timestamp is always UTC, but people see local times. Bangladesh is UTC+6 with no daylight saving; the UK moves between UTC+0 and UTC+1; the US has several zones that also change in spring and autumn. When writing software, store UTC and convert to local time only for display, so that daylight saving shifts do not break calculations.

Common bugs

  • Treating seconds as milliseconds or the reverse.
  • Using local time when comparing, which breaks across time zones.
  • Storing time as text in inconsistent formats.
  • The 2038 limit in systems that use 32-bit integers.
  • Assuming a day always has 24 hours, which is false across a daylight saving change.

When in doubt, convert both values to UTC and compare numerically.

Quick checklist

  1. Check the number of digits.
  2. Convert and read UTC and local time.
  3. Compare in UTC.
  4. Store timestamps as numbers.

A worked example: finding when a login token expires

A developer receives a token with exp set to 1767225600. She pastes it into the converter and sees 1 January 2026, 00:00:00 UTC, which is 06:00 in Dhaka. The token was issued at 1767139200, so it was valid for exactly 86,400 seconds, or one day. When users complained of being logged out at 6 a.m. local time, she realised that the expiry was set to midnight UTC, not midnight local. She changed the server to issue tokens with a rolling 24-hour expiry instead, solving the complaint.

Tips for working with timestamps

  • Always label the unit in variable names, such as created_at_ms.
  • Store UTC and display local.
  • Convert only at the edges of your system: when reading input and when showing output.
  • Test around daylight saving changes if your users live where they occur.
  • Use a library for date maths rather than adding 86,400 seconds to represent a day.

Frequently asked questions

What is the Unix epoch? 1 January 1970 at 00:00:00 UTC.

How do I know if a timestamp is in milliseconds? It usually has 13 digits. The converter treats 13-digit values as milliseconds.

Does a timestamp have a time zone? No. It is always UTC; only the displayed date depends on a zone.

Can I convert a date to a timestamp? Yes. Pick a date and time to get the value in seconds and milliseconds.

Is it free? Yes, and it runs in your browser.

What is JavaScript's Date.now()? It returns the current time in milliseconds since the epoch.

Why is my converted date in 1970? You may have supplied a very small number, or a value in seconds where milliseconds were expected.

How do I get the current timestamp? Use your language's time function, or pick the current date and time in the converter.

Is a timestamp the same as a date? It identifies a moment in time. A date is one way of displaying it.

What is the maximum timestamp? For 32-bit signed storage it is 2,147,483,647, which is in January 2038.

Next step

Open the Unix Timestamp Converter below and read the date behind your number.

Completely freeNo cost, no sign-up
Files stay privateDeleted automatically after the job
Easy in BanglaIn both Bangla and English