LogoTOOLGENIE

How to Convert a Unix Timestamp to a Date (and Back)

Learn how to convert Unix epoch timestamps to readable UTC/local dates—and dates back to epoch seconds or milliseconds—with a free browser tool and code examples.

9 min read

A Unix timestamp is just a number counting time since the Unix epoch (1 January 1970, 00:00:00 UTC). Logs, APIs, databases, and analytics pipelines love that format because it is compact and timezone-agnostic. Humans do not. When you need to turn 1723200000 into a readable date—or turn a calendar date into epoch seconds—you need a reliable converter.

This guide shows the fastest browser workflow, how to avoid seconds-vs-milliseconds mistakes, and quick code snippets for common languages.

Convert a Unix timestamp to a date in your browser

  1. Open the free Epoch Converter.
  2. Paste a timestamp from a log line, JSON payload, or database field.
  3. Confirm whether the value is in seconds or milliseconds (10-digit vs 13-digit is a useful clue).
  4. Read the human-readable UTC and local results, plus ISO-style formats when you need them for docs or tickets.
  5. Copy the format you need, or reverse the flow to convert a date back into epoch time.

If you are debugging an incident across regions, pair this with the World Time Zone Converter so the same instant is easy to explain in each city.

Seconds vs milliseconds (the most common mistake)

Unit Typical length today Example JavaScript tip
Seconds ~10 digits 1723200000 new Date(ts * 1000)
Milliseconds ~13 digits 1723200000000 new Date(ts)

If a converted date jumps to the year 56000, you probably treated milliseconds as seconds (or forgot to multiply by 1000 in JavaScript). If the date lands near 1970 when you expected “today,” you likely divided when you should not have.

Convert a date back to Unix time

Use date → timestamp mode when you need:

  • an expiry time for a token or signed URL
  • a query filter like “events after Monday 09:00 UTC”
  • a seed value for tests and fixtures

Workflow:

  1. Enter the calendar date and time.
  2. Decide whether consumers expect seconds or milliseconds.
  3. Copy the integer into your API call, SQL filter, or config file.

Code cheatsheet

JavaScript

// Current Unix seconds
Math.floor(Date.now() / 1000);

// Timestamp (seconds) → Date
new Date(1723200000 * 1000).toISOString();

// Date → Unix seconds
Math.floor(new Date("2026-08-09T12:00:00Z").getTime() / 1000);

Python

from datetime import datetime, timezone

datetime.now(timezone.utc).timestamp()
datetime.fromtimestamp(1723200000, tz=timezone.utc).isoformat()

SQL (examples)

  • PostgreSQL: TO_TIMESTAMP(1723200000)
  • MySQL: FROM_UNIXTIME(1723200000)
  • SQLite: datetime(1723200000, 'unixepoch')

When to use an online converter vs writing code

Use a browser converter when you are debugging quickly, explaining a value to a teammate, or checking a one-off log line. Write code when conversion is part of an application path, batch job, or automated test suite.

For day-to-day debugging, ToolGenie’s Epoch Converter is enough: paste, confirm units, copy, move on.

Frequently Asked Questions (FAQ)

What is a Unix timestamp?

A Unix timestamp (epoch time) is the number of seconds—or sometimes milliseconds—since 00:00:00 UTC on 1 January 1970. It stores a single moment in time as an integer that works the same in every timezone.

How do I tell seconds from milliseconds?

Current second-based timestamps are about 10 digits (for example 1723200000). Millisecond timestamps are about 13 digits (for example 1723200000000). If your converted date looks far in the future or past, you likely mixed up units.

Does a Unix timestamp include a timezone?

No. The integer always represents a UTC instant. Timezone only matters when you display that instant as a local wall-clock time.

Can I convert a date back to epoch time?

Yes. Pick a date and time in an epoch converter, then copy the result as Unix seconds or milliseconds for APIs, databases, or logs.

Is ToolGenie’s epoch converter private?

Yes. Conversion runs in your browser. Your timestamps are not uploaded to a ToolGenie server for processing.

Related free tools

Related guides

Browse more guides on the ToolGenie Blog.